scripts: add update_nixpkgs
All checks were successful
continuous-integration/drone/push Build is passing

add simple script to update nix shell/run nixpkgs to match flake
nixpkgs-unstable input. this avoids having it set to the default of
nixpkgs-unstable and downloading 30MB tarballs all the time.
This commit is contained in:
Jake Hillion 2024-03-01 14:44:23 +00:00
parent 90cbec88db
commit 80b4305e60

5
scripts/update_nixpkgs.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
set -xe
VERSION=`curl https://gitea.hillion.co.uk/JakeHillion/nixos/raw/branch/main/flake.lock | nix run nixpkgs#jq -- -r '.nodes."nixpkgs-unstable".locked.rev'`
nix registry add nixpkgs "github:NixOS/nixpkgs/${VERSION}"