.dotfiles/pkgs/flake/project/default.nix
2026-03-06 00:51:55 +01:00

13 lines
242 B
Nix

{ name, writeShellApplication, ... }:
writeShellApplication {
inherit name;
text = ''
set -euo pipefail
if [ ! -d "$(pwd)/.git" ]; then
git init
fi
nix flake init --template "$FLAKE"#"$1"
direnv allow
'';
}