Delete old system profiles

This commit is contained in:
Sandro - 2023-05-16 18:49:51 +02:00
parent 1c60f462a1
commit cd15352890
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 5 additions and 0 deletions

View File

@ -212,6 +212,11 @@
};
};
system.activationScripts.deleteOldSystemProfiles = lib.mkIf config.nix.gc.automatic ''
echo "Deleting old system profiles..."
/run/current-system/sw/bin/nix-env --profile /nix/var/nix/profiles/system --delete-generations +10
'';
systemd = {
# Do not break the boot
enableEmergencyMode = false;