mochi/nixos/profiles/global/system.nix

20 lines
635 B
Nix
Raw Permalink Normal View History

2024-06-20 08:59:56 -05:00
{ 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
2024-06-20 08:59:56 -05:00
'';
# Do not change unless you know what you are doing
2024-07-03 17:45:35 -05:00
stateVersion = "24.05";
2024-06-20 08:59:56 -05:00
};
}