summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2025-03-24 17:56:56 +0100
committerSilas Schöffel <sils@sils.li>2025-03-24 17:56:56 +0100
commit7bad1ed830d1ae92875c3191824abd748093c035 (patch)
treebda35a475a83a9d7be49762a7dc8fe262a8479f3
parentdocker: init (diff)
downloadnix-config-7bad1ed830d1ae92875c3191824abd748093c035.zip
persist /var/lib/docker
-rw-r--r--modules/nixos/sils/docker.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/nixos/sils/docker.nix b/modules/nixos/sils/docker.nix
index 91155b2..1723353 100644
--- a/modules/nixos/sils/docker.nix
+++ b/modules/nixos/sils/docker.nix
@@ -9,5 +9,13 @@ in {
   config = lib.mkIf cfg.enable {
     virtualisation.docker.enable = true;
     users.users.sils.extraGroups = ["docker"];
+    environment.persistence."/srv".directories = [
+      {
+        directory = "/var/lib/docker";
+        user = "docker";
+        group = "docker";
+        mode = "0700";
+      }
+    ];
   };
 }