summary refs log tree commit diff stats
path: root/user/settings
diff options
context:
space:
mode:
authorAlan Pearce2023-06-29 08:29:44 +0200
committerAlan Pearce2023-06-29 08:29:44 +0200
commitf14c2285e9a0213aa0beed894bfb94c837ced31f (patch)
tree322c7de1f8dba9eb722dccaf379350e9ee936bb4 /user/settings
parent200b52fdb263cb2cf77856a70dc5fa9d05a6ad51 (diff)
downloadnixfiles-f14c2285e9a0213aa0beed894bfb94c837ced31f.tar.lz
nixfiles-f14c2285e9a0213aa0beed894bfb94c837ced31f.tar.zst
nixfiles-f14c2285e9a0213aa0beed894bfb94c837ced31f.zip
nix: automatically pin nixpkgs to flake input
Diffstat (limited to 'user/settings')
-rw-r--r--user/settings/nix.nix3
-rw-r--r--user/settings/pin.nix11
2 files changed, 14 insertions, 0 deletions
diff --git a/user/settings/nix.nix b/user/settings/nix.nix
index ce68e158..b15f5c5d 100644
--- a/user/settings/nix.nix
+++ b/user/settings/nix.nix
@@ -2,6 +2,9 @@
 , pkgs
 , ...
 }: {
+  imports = [
+    ./pin.nix
+  ];
   nixpkgs.config = import ../config.nix;
   home.packages = with pkgs; [
     nil
diff --git a/user/settings/pin.nix b/user/settings/pin.nix
new file mode 100644
index 00000000..7ce0858b
--- /dev/null
+++ b/user/settings/pin.nix
@@ -0,0 +1,11 @@
+{ attrs, ... }:
+let
+  inherit (attrs) nixpkgs;
+in
+{
+  nix = {
+    registry = {
+      nixpkgs.flake = nixpkgs;
+    };
+  };
+}