summaryrefslogtreecommitdiff
path: root/modules
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
parent227a29b06e09ce765da12e5cab74f9c539c1fe1e (diff)
downloadnetwork-10322f9e9761a3178936eee3aa9c35fb46be9ab2.tar.zst
network-10322f9e9761a3178936eee3aa9c35fb46be9ab2.zip
Automatically reclaim storage space
Signed-off-by: Mel <einebeere@gmail.com>
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 = [