From 25795102c6b646fa165fc6d43b40d0b7a983f2c6 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 17 Oct 2024 20:42:17 +0200 Subject: [PATCH] losurdo: docker: enable service --- hosts/losurdo.nix | 1 + hosts/losurdo/docker.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 hosts/losurdo/docker.nix diff --git a/hosts/losurdo.nix b/hosts/losurdo.nix index f0d7d7b..7ff3757 100644 --- a/hosts/losurdo.nix +++ b/hosts/losurdo.nix @@ -18,6 +18,7 @@ losurdo/hardware.nix losurdo/nebula.nix losurdo/networking.nix + losurdo/docker.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 index 0000000..1085c6f --- /dev/null +++ b/hosts/losurdo/docker.nix @@ -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" ]; +} -- 2.47.0