summary refs log tree commit diff
path: root/modules/nix.nix
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-11-14 20:13:15 +0100
committerMel <einebeere@gmail.com>2024-11-14 20:13:15 +0100
commit10322f9e9761a3178936eee3aa9c35fb46be9ab2 (patch)
tree8a238f85d890d9438567f53c1f474ec30b217131 /modules/nix.nix
parent227a29b06e09ce765da12e5cab74f9c539c1fe1e (diff)
downloadnetwork-10322f9e9761a3178936eee3aa9c35fb46be9ab2.tar.zst
network-10322f9e9761a3178936eee3aa9c35fb46be9ab2.zip
Automatically reclaim storage space
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'modules/nix.nix')
-rw-r--r--modules/nix.nix11
1 files changed, 11 insertions, 0 deletions
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 = [