mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
Limit number of saved generations to 10
This commit is contained in:
parent
d5729dc447
commit
ad3f4782dd
1 changed files with 5 additions and 3 deletions
|
|
@ -6,10 +6,12 @@
|
||||||
options.myConfig.auto-gc.enable = lib.mkEnableOption "";
|
options.myConfig.auto-gc.enable = lib.mkEnableOption "";
|
||||||
|
|
||||||
config = lib.mkIf config.myConfig.auto-gc.enable {
|
config = lib.mkIf config.myConfig.auto-gc.enable {
|
||||||
nix.gc = {
|
myConfig.nix-helper.enable = true;
|
||||||
automatic = true;
|
|
||||||
|
nh.clean = {
|
||||||
|
enable = true;
|
||||||
dates = "weekly";
|
dates = "weekly";
|
||||||
options = "--delete-older-than 7d";
|
extraArgs = "--keep-since 7d --keep 10";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue