From 80b4305e60c0295b9dd8ad6652aeb1a569705557 Mon Sep 17 00:00:00 2001 From: Jake Hillion Date: Fri, 1 Mar 2024 14:44:23 +0000 Subject: [PATCH] scripts: add update_nixpkgs 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. --- scripts/update_nixpkgs.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 scripts/update_nixpkgs.sh diff --git a/scripts/update_nixpkgs.sh b/scripts/update_nixpkgs.sh new file mode 100755 index 0000000..64d81c8 --- /dev/null +++ b/scripts/update_nixpkgs.sh @@ -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}"