modules/nixos/common: set narinfo-cache-negative-ttl for update

also drop booted-system check
This commit is contained in:
zowoq 2024-11-25 09:48:27 +10:00
parent b01db30564
commit 25e81d251e

View file

@ -2,14 +2,11 @@ arch=$(uname -m)
hostname=$(uname -n)
p=$(curl -L https://buildbot.nix-community.org/nix-outputs/nix-community/infra/master/"$arch"-linux.host-"$hostname")
if [[ "$(readlink /run/booted-system)" == "$p" ]]; then
exit 0
fi
if [[ "$(readlink /run/current-system)" == "$p" ]]; then
exit 0
fi
nix-store --realise "$p"
nix-store --option narinfo-cache-negative-ttl 0 --realise "$p"
nix-env --profile /nix/var/nix/profiles/system --set "$p"
booted="$(readlink /run/booted-system/{initrd,kernel,kernel-modules} && cat /run/booted-system/kernel-params)"