aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs.nix
diff options
context:
space:
mode:
authorFrankie B <git@diskfloppy.me>2023-04-25 20:21:03 +0100
committerFrankie B <git@diskfloppy.me>2023-04-25 20:21:03 +0100
commit4b0c88736979fe2cb8e98e8e0ae12caf7e876141 (patch)
treea3ddb2df189c952758b7b84c593738c154869777 /nixpkgs.nix
Add config
Diffstat (limited to 'nixpkgs.nix')
-rw-r--r--nixpkgs.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/nixpkgs.nix b/nixpkgs.nix
new file mode 100644
index 0000000..041de40
--- /dev/null
+++ b/nixpkgs.nix
@@ -0,0 +1,8 @@
+# A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file
+# This is useful to avoid using channels when using legacy nix commands
+let lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
+in
+import (fetchTarball {
+ url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
+ sha256 = lock.narHash;
+})