Enable rootless docker
Alan Pearce alan@alanpearce.eu
Thu, 04 Apr 2024 17:57:58 +0200
2 files changed, 24 insertions(+), 0 deletions(-)
M system/prefect.nix → system/prefect.nix
@@ -27,6 +27,7 @@ ./settings/programs/base.nix ./settings/programs/gnupg.nix ./settings/programs/kde.nix ./settings/programs/shell.nix + ./settings/programs/docker.nix ./settings/gaming.nix ];
A 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; + # }; +}