diff --git a/outputs/system.nix b/outputs/system.nix index bb219ed..fb74b6d 100644 --- a/outputs/system.nix +++ b/outputs/system.nix @@ -7,6 +7,7 @@ with inputs; modules = [ dedsec-grub-theme.nixosModule ../system/configuration.nix + ../system/garbage-collector.nix ../system/machine/home ]; }; diff --git a/system/configuration.nix b/system/configuration.nix index 363dcb4..5bb5528 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -124,23 +124,10 @@ in }; virtualisation = { - docker = { - enable = true; - autoPrune = { - enable = true; - dates = "weekly"; - }; - }; + docker.enable = true; }; nix = { - # Automate garbage collection - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; - settings = { auto-optimise-store = true; diff --git a/system/garbage-collector.nix b/system/garbage-collector.nix new file mode 100644 index 0000000..47b2bd8 --- /dev/null +++ b/system/garbage-collector.nix @@ -0,0 +1,14 @@ +{ ... }: + +{ + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + + virtualisation.docker.autoPrune = { + enable = true; + dates = "weekly"; + }; +}