summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/common.nix5
-rw-r--r--modules/nix.nix11
2 files changed, 15 insertions, 1 deletions
diff --git a/modules/common.nix b/modules/common.nix
index 7d7f1cc..e7e101b 100644
--- a/modules/common.nix
+++ b/modules/common.nix
@@ -35,7 +35,10 @@
   services.envfs.enable = true;
 
   virtualisation = {
-    docker.enable = true;
+    docker = {
+      enable = true;
+      autoPrune.enable = true;
+    };
     oci-containers.backend = "docker";
   };
 
diff --git a/modules/nix.nix b/modules/nix.nix
index d98f64d..cde962a 100644
--- a/modules/nix.nix
+++ b/modules/nix.nix
@@ -2,6 +2,17 @@
 
 {
   nix = {
+    optimise = {
+      automatic = true;
+      dates = [ "06:00" ];
+    };
+
+    gc = {
+      automatic = true;
+      dates = "weekly";
+      options = "--delete-older-than 14d";
+    };
+
     # add compat scripts to the environment,
     # to allow nixos-option to find the configuration
     nixPath = [