summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix5
-rw-r--r--home.nix2
-rw-r--r--templates/flake/.envrc4
-rw-r--r--templates/flake/flake.nix (renamed from flake-template/flake.nix)0
4 files changed, 10 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index 47d9179..976f346 100644
--- a/flake.nix
+++ b/flake.nix
@@ -50,5 +50,10 @@
home-manager = home-manager;
};
};
+
+ templates.default = {
+ path = ./templates/flake;
+ description = "nix flake new -t ~/flake";
+ };
};
}
diff --git a/home.nix b/home.nix
index 4c90e7c..2ce5ea5 100644
--- a/home.nix
+++ b/home.nix
@@ -58,7 +58,7 @@
V = "xrandr --output HDMI1 --auto --output eDP1 --off";
v = "xrandr --output eDP1 --auto --output HDMI1 --off";
vV = "xrandr --output eDP1 --auto --output HDMI1 --off";
- newflake = "nix flake new -t github:nix-community/nix-direnv ";
+ newflake = "nix flake new -t ~/flake ";
};
};
diff --git a/templates/flake/.envrc b/templates/flake/.envrc
new file mode 100644
index 0000000..1305de8
--- /dev/null
+++ b/templates/flake/.envrc
@@ -0,0 +1,4 @@
+if ! has nix_direnv_version || ! nix_direnv_version 2.2.0; then
+ source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.0/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc="
+fi
+use flake
diff --git a/flake-template/flake.nix b/templates/flake/flake.nix
index bd88f19..bd88f19 100644
--- a/flake-template/flake.nix
+++ b/templates/flake/flake.nix