nixos-config/users/simon/files/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