mirror of
https://github.com/nix-community/home-manager
synced 2024-12-05 01:19:46 +01:00
podman-container: fix tests and failing podman 5.3.0 service
Co-authored-by: Dylan Wilson <dylan@bytepen.com>
This commit is contained in:
parent
d2e2bda6c0
commit
873e39d5f4
5 changed files with 23 additions and 10 deletions
|
@ -61,5 +61,12 @@ in {
|
|||
Install = { WantedBy = [ "timers.target" ]; };
|
||||
};
|
||||
})
|
||||
({
|
||||
xdg.configFile."systemd/user/podman-user-wait-network-online.service.d/50-exec-search-path.conf".text =
|
||||
''
|
||||
[Service]
|
||||
ExecSearchPath=${pkgs.bashInteractive}/bin:${pkgs.systemd}/bin:/bin
|
||||
'';
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -38,11 +38,11 @@ Delegate=yes
|
|||
Type=notify
|
||||
NotifyAccess=all
|
||||
SyslogIdentifier=%N
|
||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman run --name=my-container --cidfile=%t/%N.cid --replace --rm --cgroups=split --network=mynet --network-alias test-alias-1 --network-alias test-alias-2 --sdnotify=conmon -d --device=/dev/null:/dev/null --entrypoint=/sleep.sh --read-only-tmpfs -v /tmp:/tmp --label io.containers.autoupdate=registry --publish 8080:80 --env VAL_A=A --env VAL_B=2 --env VAL_C=false --label nix.home-manager.managed=true --security-opt=no-new-privileges docker.io/alpine:latest
|
||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman run --name my-container --cidfile=%t/%N.cid --replace --rm --cgroups=split --entrypoint /sleep.sh --network-alias test-alias-1 --network-alias test-alias-2 --read-only-tmpfs --network mynet --sdnotify=conmon -d --device /dev/null:/dev/null -v /tmp:/tmp --label io.containers.autoupdate=registry --publish 8080:80 --env VAL_A=A --env VAL_B=2 --env VAL_C=false --label nix.home-manager.managed=true --security-opt=no-new-privileges docker.io/alpine:latest
|
||||
|
||||
[Unit]
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
Wants=podman-user-wait-network-online.service
|
||||
After=podman-user-wait-network-online.service
|
||||
After=network.target
|
||||
Before=fake.target
|
||||
Description=home-manager test
|
||||
|
|
|
@ -28,11 +28,11 @@ Delegate=yes
|
|||
Type=notify
|
||||
NotifyAccess=all
|
||||
SyslogIdentifier=%N
|
||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman run --name=my-container --cidfile=%t/%N.cid --replace --rm --cgroups=split --network=my-net --network=externalnet --sdnotify=conmon -d --label nix.home-manager.managed=true docker.io/alpine:latest
|
||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman run --name my-container --cidfile=%t/%N.cid --replace --rm --cgroups=split --network my-net --network externalnet --sdnotify=conmon -d --label nix.home-manager.managed=true docker.io/alpine:latest
|
||||
|
||||
[Unit]
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
Wants=podman-user-wait-network-online.service
|
||||
After=podman-user-wait-network-online.service
|
||||
After=network.target
|
||||
After=podman-my-net-network.service
|
||||
Description=Service for container my-container
|
||||
|
|
|
@ -19,11 +19,14 @@ Environment=PATH=/run/wrappers/bin:/usr/bin:/bin:/usr/sbin:/sbin:/nix/store/0000
|
|||
ExecStartPre=/nix/store/00000000000000000000000000000000-await-podman-unshare
|
||||
RemainAfterExit=yes
|
||||
TimeoutStartSec=15
|
||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman network create --ignore --subnet=192.168.123.0/24 --gateway=192.168.123.1 --label nix.home-manager.managed=true my-net
|
||||
Type=oneshot
|
||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman network create --ignore --subnet 192.168.123.0/24 --gateway 192.168.123.1 --label nix.home-manager.managed=true my-net
|
||||
SyslogIdentifier=%N
|
||||
Type=oneshot
|
||||
|
||||
[Unit]
|
||||
Wants=podman-user-wait-network-online.service
|
||||
After=podman-user-wait-network-online.service
|
||||
After=network.target
|
||||
Description=Service for network my-net
|
||||
SourcePath=/nix/store/00000000000000000000000000000000-home-network-podman-my-net/quadlets/podman-my-net.network
|
||||
RequiresMountsFor=%t/containers
|
||||
|
|
|
@ -23,11 +23,14 @@ Environment=PATH=/run/wrappers/bin:/usr/bin:/bin:/usr/sbin:/sbin:/nix/store/0000
|
|||
ExecStartPre=/nix/store/00000000000000000000000000000000-await-podman-unshare
|
||||
RemainAfterExit=yes
|
||||
TimeoutStartSec=15
|
||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman network create --ignore --subnet=192.168.1.0/24 --gateway=192.168.1.1 --opt isolate=true --label nix.home-manager.managed=true --ipam-driver dhcp --dns=192.168.55.1 --log-level=debug my-net
|
||||
Type=oneshot
|
||||
ExecStart=/nix/store/00000000000000000000000000000000-podman/bin/podman network create --ignore --subnet 192.168.1.0/24 --gateway 192.168.1.1 --opt isolate=true --label nix.home-manager.managed=true --ipam-driver dhcp --dns=192.168.55.1 --log-level=debug my-net
|
||||
SyslogIdentifier=%N
|
||||
Type=oneshot
|
||||
|
||||
[Unit]
|
||||
Wants=podman-user-wait-network-online.service
|
||||
After=podman-user-wait-network-online.service
|
||||
After=network.target
|
||||
Description=Service for network my-net
|
||||
SourcePath=/nix/store/00000000000000000000000000000000-home-network-podman-my-net/quadlets/podman-my-net.network
|
||||
RequiresMountsFor=%t/containers
|
||||
|
|
Loading…
Reference in a new issue