nixos-config/users/simon/modules/scripts/nixify

17 lines
274 B
Bash
Executable file

#!/usr/bin/env bash
if [ ! -e ./.envrc ]; then
echo "use nix" > .envrc
direnv allow
fi
if [[ ! -e shell.nix ]] && [[ ! -e default.nix ]]; then
cat > shell.nix << EOF
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
];
}
EOF
vim shell.nix
fi