]> Git — Sourcephile - sourcephile-nix.git/commitdiff
losurdo: docker: enable service main
authorJulien Moutinho <julm+sourcephile-nix@sourcephile.fr>
Thu, 17 Oct 2024 18:42:17 +0000 (20:42 +0200)
committerJulien Moutinho <julm+sourcephile-nix@sourcephile.fr>
Thu, 17 Oct 2024 18:42:17 +0000 (20:42 +0200)
hosts/losurdo.nix
hosts/losurdo/docker.nix [new file with mode: 0644]

index f0d7d7b0f8f394efcbea4b1b7e01bdd2ca9a4710..7ff3757d656f223c5af74252f466ce1465eb2443 100644 (file)
@@ -18,6 +18,7 @@
     losurdo/hardware.nix
     losurdo/nebula.nix
     losurdo/networking.nix
     losurdo/hardware.nix
     losurdo/nebula.nix
     losurdo/networking.nix
+    losurdo/docker.nix
     losurdo/nginx.nix
     losurdo/postfix.nix
     losurdo/postgresql.nix
     losurdo/nginx.nix
     losurdo/postfix.nix
     losurdo/postgresql.nix
diff --git a/hosts/losurdo/docker.nix b/hosts/losurdo/docker.nix
new file mode 100644 (file)
index 0000000..1085c6f
--- /dev/null
@@ -0,0 +1,26 @@
+{ config, pkgs, lib, hostName, ... }:
+{
+  virtualisation.docker = {
+    enable = true;
+    storageDriver = "zfs";
+    daemon.settings = {
+      storage-opts = [
+        "zfs.fsname=${hostName}/var/lib/docker"
+      ];
+      data-root = "/var/lib/docker";
+      experimental = true;
+      fixed-cidr-v6 = "fd00::/80";
+      ipv6 = true;
+      metrics-addr = "0.0.0.0:9323";
+      # For Windows
+      userland-proxy = false;
+    };
+    /*
+      rootless = {
+      enable = true;
+      setSocketVariable = true;
+      };
+    */
+  };
+  users.users.julm.extraGroups = [ "docker" ];
+}