dotfiles/common/users/homeModules/scripts/flakeify.sh
2024-12-18 18:54:34 -05:00

7 lines
185 B
Bash

if [ ! -e flake.nix ]; then
nix flake new -t github:nix-community/nix-direnv .
elif [ ! -e .envrc ]; then
echo "use flake" > .envrc
direnv allow
fi
${EDITOR:-vim} flake.nix