diff options
author | Soispha <soispha@vhack.eu> | 2023-04-18 16:29:27 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-04-18 16:29:27 +0200 |
commit | 58e3d0b4911642aac80c536b072311e22cb4686a (patch) | |
tree | 3e868978b8bcfe86b73422bf8480f02737ee48b5 /update | |
parent | Build(flake): Enable direnv integration (diff) | |
download | nixos-server-58e3d0b4911642aac80c536b072311e22cb4686a.tar.gz nixos-server-58e3d0b4911642aac80c536b072311e22cb4686a.zip |
Build: Add update script
This allows to group different update commands together and to raise awareness of the update task. The `grep '[^0-9]_[0-9] flake.lock'` is needed to check if multiple imports exists for the same input as nix will name them 'nixpkgs_1' 'nixpkgs_2' and so on. Having multiple inputs for the same thing just increases the needed storage space, if no other inputs are set to follow, but can break a flake's evaluation because of a partial update e.g., nixpkgs follows our version, but we leave rust-overlay unfollowed. This example would result in a newer cargo version (rust-overlay) getting combined with old packages (nixpkgs), which introduces the aforementioned partial update.
Diffstat (limited to 'update')
-rwxr-xr-x | update | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/update b/update new file mode 100755 index 0000000..6e76b0e --- /dev/null +++ b/update @@ -0,0 +1,5 @@ +#!/bin/sh +# shellcheck disable=SC2086 +nix flake update + +! grep '[^0-9]_[0-9]' flake.lock |