Move diff-closures to nixos-modules
This commit is contained in:
parent
a0c72e8c49
commit
a261fbe165
|
@ -398,11 +398,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1695942940,
|
||||
"narHash": "sha256-uTDcudSWYvtXy+qZODSWhyMtbyky2hhX84HtGxfjw/o=",
|
||||
"lastModified": 1697468218,
|
||||
"narHash": "sha256-cv4Ijohh4SP5zELBxjNEwGdA3UV+B3POvH0YVkOpAZs=",
|
||||
"owner": "SuperSandro2000",
|
||||
"repo": "nixos-modules",
|
||||
"rev": "085931181b27b32d841965e0e31516556e7a2e88",
|
||||
"rev": "4880c21851651b14d091894fb94e9173b58fbf15",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -57,21 +57,14 @@
|
|||
startAt = "hourly";
|
||||
};
|
||||
|
||||
nix.gc = lib.mkIf config.c3d2.autoUpdate {
|
||||
automatic = true;
|
||||
randomizedDelaySec = "6h";
|
||||
options = "--delete-older-than 21d";
|
||||
};
|
||||
|
||||
# Show a diff when activating a new system except for microvms which handle this seperately
|
||||
system.activationScripts.diff-system = lib.mkIf (config.c3d2.deployment.server == "") {
|
||||
supportsDryActivation = true;
|
||||
text = ''
|
||||
if [ -e /run/current-system ] && [ -e $systemConfig ]; then
|
||||
echo System package diff:
|
||||
${config.nix.package}/bin/nix --extra-experimental-features nix-command store diff-closures /run/current-system $systemConfig || true
|
||||
fi
|
||||
'';
|
||||
nix = {
|
||||
# Show a diff when activating a new system except for microvms which handle this seperately
|
||||
diffSystem = config.c3d2.deployment.server == "";
|
||||
gc = lib.mkIf config.c3d2.autoUpdate {
|
||||
automatic = true;
|
||||
randomizedDelaySec = "6h";
|
||||
options = "--delete-older-than 21d";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ (
|
||||
|
|
Loading…
Reference in New Issue