···
effectiveUser = container.podman.user or "root";
437
+
inherit (config.users.users.${effectiveUser}) uid;
cfg.backend == "podman" && effectiveUser != "root" && config.users.users.${effectiveUser}.linger;
···
wantedBy = [ ] ++ optional (container.autoStart) "multi-user.target";
lib.optional (container.imageFile == null && container.imageStream == null) "network-online.target"
444
-
++ lib.optional dependOnLingerService "linger-users.service";
445
+
++ lib.optionals dependOnLingerService [ "linger-users.service" ];
lib.optionals (cfg.backend == "docker") [
···
455
-
++ lib.optional dependOnLingerService "linger-users.service";
456
-
requires = dependsOn;
456
+
++ lib.optionals dependOnLingerService [ "linger-users.service" ]
457
+
++ lib.optionals (effectiveUser != "root" && container.podman.sdnotify == "healthy") [
458
+
"user@${toString uid}.service"
462
+
++ lib.optionals (effectiveUser != "root" && container.podman.sdnotify == "healthy") [
463
+
"user@${toString uid}.service"
environment = lib.mkMerge [
(mkIf (cfg.backend == "podman" && container.podman.user != "root") {
···
"${cfg.backend} rm -f ${name} || true";
534
+
unitConfig = mkIf (effectiveUser != "root") {
535
+
RequiresMountsFor = "/run/user/${toString uid}/containers";
### There is no generalized way of supporting `reload` for docker
···
assertion = cfg.backend == "docker" -> podman == null;
message = "virtualisation.oci-containers.containers.${name}: Cannot set `podman` option if backend is `docker`.";
633
+
cfg.backend == "podman" && podman.sdnotify == "healthy" && podman.user != "root"
634
+
-> config.users.users.${podman.user}.uid != null;
636
+
Rootless container ${name} (with podman and sdnotify=healthy)
637
+
requires that its running user ${podman.user} has a statically specified uid.