summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorAlan Pearce2024-04-04 17:57:58 +0200
committerAlan Pearce2024-04-04 17:57:58 +0200
commitd41b386aaf7172fb2d220399e5975269ab79a8cb (patch)
tree30054d9bfb1b977059f2479afa72a7b724d557e2 /system
parentc0e1054c66c49423e69de686955c3671b39d1888 (diff)
downloadnixfiles-d41b386aaf7172fb2d220399e5975269ab79a8cb.tar.lz
nixfiles-d41b386aaf7172fb2d220399e5975269ab79a8cb.tar.zst
nixfiles-d41b386aaf7172fb2d220399e5975269ab79a8cb.zip
Enable rootless docker
Diffstat (limited to 'system')
-rw-r--r--system/prefect.nix1
-rw-r--r--system/settings/programs/docker.nix23
2 files changed, 24 insertions, 0 deletions
diff --git a/system/prefect.nix b/system/prefect.nix
index e38f6533..86406e5a 100644
--- a/system/prefect.nix
+++ b/system/prefect.nix
@@ -27,6 +27,7 @@
     ./settings/programs/gnupg.nix
     ./settings/programs/kde.nix
     ./settings/programs/shell.nix
+    ./settings/programs/docker.nix
     ./settings/gaming.nix
   ];
 
diff --git a/system/settings/programs/docker.nix b/system/settings/programs/docker.nix
new file mode 100644
index 00000000..d7c6a88e
--- /dev/null
+++ b/system/settings/programs/docker.nix
@@ -0,0 +1,23 @@
+{ ... }: {
+  virtualisation.docker = {
+    enable = false;
+    storageDriver = "overlay2";
+    rootless = {
+      enable = true;
+      setSocketVariable = true;
+      daemon.settings = {
+        fixed-cidr-v6 = "fd0c::/80";
+        ipv6 = true;
+        dns = [
+          "1.0.0.1"
+          "1.1.1.1"
+        ];
+      };
+    };
+  };
+  # TODO: autoPrune doesn't affect rootless
+  # systemd.timers.docker-prune.timerConfig = {
+  #   Persistent = true;
+  #   RandomizedDelaySec = 1800;
+  # };
+}