mochi/nixos/profiles/global/system.nix
Joseph Hanson 2b6d062d16
All checks were successful
Build / nix-build (native-x86_64, telperion) (push) Successful in 2m13s
Build / nix-build (native-x86_64, gandalf) (push) Successful in 3m23s
Build / nix-build (native-x86_64, shadowfax) (push) Successful in 4m38s
reformat
2024-12-27 21:30:25 -06:00

24 lines
679 B
Nix

{ lib, pkgs, ... }:
{
system = {
# Enable printing changes on nix build etc with nvd
activationScripts.report-changes = ''
PATH=$PATH:${
lib.makeBinPath [
pkgs.nvd
pkgs.nix
]
}
profiles=$(${pkgs.coreutils}/bin/ls -dv /nix/var/nix/profiles/system-*-link | tail -2)
profile_count=$(echo "$profiles" | ${pkgs.coreutils}/bin/wc -l)
if [ $profile_count -gt 1 ]; then
nvd diff $profiles
else
echo "Not enough system configurations to compare. Found only $profile_count profile."
fi
'';
# Do not change unless you know what you are doing
stateVersion = "24.05";
};
}