nix flake template

This commit is contained in:
♥ Minnie ♥ 2023-04-03 22:41:22 +08:00
commit 5a491e5f7c
11 changed files with 401 additions and 0 deletions

8
nixpkgs.nix Normal file
View file

@ -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;
})