forked from c3d2/nix-config
Move diff-closures to nixos-modules
This commit is contained in:
parent
a0c72e8c49
commit
a261fbe165
|
@ -398,11 +398,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695942940,
|
"lastModified": 1697468218,
|
||||||
"narHash": "sha256-uTDcudSWYvtXy+qZODSWhyMtbyky2hhX84HtGxfjw/o=",
|
"narHash": "sha256-cv4Ijohh4SP5zELBxjNEwGdA3UV+B3POvH0YVkOpAZs=",
|
||||||
"owner": "SuperSandro2000",
|
"owner": "SuperSandro2000",
|
||||||
"repo": "nixos-modules",
|
"repo": "nixos-modules",
|
||||||
"rev": "085931181b27b32d841965e0e31516556e7a2e88",
|
"rev": "4880c21851651b14d091894fb94e9173b58fbf15",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -57,21 +57,14 @@
|
||||||
startAt = "hourly";
|
startAt = "hourly";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.gc = lib.mkIf config.c3d2.autoUpdate {
|
nix = {
|
||||||
automatic = true;
|
# Show a diff when activating a new system except for microvms which handle this seperately
|
||||||
randomizedDelaySec = "6h";
|
diffSystem = config.c3d2.deployment.server == "";
|
||||||
options = "--delete-older-than 21d";
|
gc = lib.mkIf config.c3d2.autoUpdate {
|
||||||
};
|
automatic = true;
|
||||||
|
randomizedDelaySec = "6h";
|
||||||
# Show a diff when activating a new system except for microvms which handle this seperately
|
options = "--delete-older-than 21d";
|
||||||
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
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ (
|
environment.systemPackages = [ (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user