add den pattern
This commit is contained in:
17
modules/system/garbage-collection.nix
Normal file
17
modules/system/garbage-collection.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.system or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.garbage-collection.enable or true)) {
|
||||
nix = {
|
||||
settings.auto-optimise-store = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user