diff options
author | Nikolay Amiantov <ab@fmap.me> | 2022-02-05 14:37:11 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2022-02-05 14:59:28 +0300 |
commit | cb18e6cd01166834d8b731fbe76d6ed4fd2e08c0 (patch) | |
tree | 365942b1206274d81acb1a7350824f5946767ea7 | |
parent | 1ce6ed1917edf1a31264e480f6bedebcfa9b5972 (diff) |
nixos/docker-rootless: disable for root
-rw-r--r-- | nixos/modules/virtualisation/docker-rootless.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/docker-rootless.nix b/nixos/modules/virtualisation/docker-rootless.nix index 0e7f050314208..d371f67ecdc84 100644 --- a/nixos/modules/virtualisation/docker-rootless.nix +++ b/nixos/modules/virtualisation/docker-rootless.nix @@ -76,7 +76,11 @@ in # needs newuidmap from pkgs.shadow path = [ "/run/wrappers" ]; environment = proxy_env; - unitConfig.StartLimitInterval = "60s"; + unitConfig = { + # docker-rootless doesn't support running as root. + ConditionUser = "!root"; + StartLimitInterval = "60s"; + }; serviceConfig = { Type = "notify"; ExecStart = "${cfg.package}/bin/dockerd-rootless --config-file=${daemonSettingsFile}"; |