diff options
author | Silas Schöffel <sils@sils.li> | 2025-03-24 17:56:56 +0100 |
---|---|---|
committer | Silas Schöffel <sils@sils.li> | 2025-03-24 17:56:56 +0100 |
commit | 7bad1ed830d1ae92875c3191824abd748093c035 (patch) | |
tree | bda35a475a83a9d7be49762a7dc8fe262a8479f3 | |
parent | docker: init (diff) | |
download | nix-config-7bad1ed830d1ae92875c3191824abd748093c035.zip |
persist /var/lib/docker
-rw-r--r-- | modules/nixos/sils/docker.nix | 8 |
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"; + } + ]; }; } |