mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-31 04:04:32 +00:00
Podman uses systemd-run to setup transient systemd timers, e.g. for healthchecks. On systems where systemd is not present in /run/current-system/sw/bin or ~/.nix-profile/bin (like one of my Ubuntu hosts), setting up the transient timers will fail. For containers with healthchecks configured, this results in the container being stuck in starting state. Relevant issue here: containers/podman#25034
45 lines
1.8 KiB
Desktop File
45 lines
1.8 KiB
Desktop File
# Automatically generated by /nix/store/00000000000000000000000000000000-podman/lib/systemd/user-generators/podman-user-generator
|
|
#
|
|
# Automatically generated by home-manager podman container configuration
|
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
#
|
|
# my-container.container
|
|
[X-Container]
|
|
ContainerName=my-container
|
|
Environment=
|
|
Image=podman-my-img.image
|
|
Label=nix.home-manager.managed=true
|
|
Network=podman-my-app.network
|
|
Network=externalnet
|
|
Volume=podman-my-app.volume:/data
|
|
|
|
[Install]
|
|
WantedBy=default.target
|
|
WantedBy=multi-user.target
|
|
|
|
[Service]
|
|
Environment=PATH=/run/wrappers/bin:/run/current-system/sw/bin:/home/hm-user/.nix-profile/bin:@systemd@/bin
|
|
Restart=always
|
|
TimeoutStopSec=30
|
|
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
KillMode=mixed
|
|
ExecStop=/nix/store/00000000000000000000000000000000-podman/bin/podman rm -v -f -i --cidfile=%t/%N.cid
|
|
ExecStopPost=-/nix/store/00000000000000000000000000000000-podman/bin/podman rm -v -f -i --cidfile=%t/%N.cid
|
|
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-app --network externalnet --sdnotify=conmon -d -v my-app:/data --label nix.home-manager.managed=true docker.io/alpine:latest
|
|
|
|
[Unit]
|
|
Wants=podman-user-wait-network-online.service
|
|
After=podman-user-wait-network-online.service
|
|
Description=Service for container my-container
|
|
SourcePath=/nix/store/00000000000000000000000000000000-home-container-podman-my-container/quadlets/podman-my-container.container
|
|
Requires=podman-my-img-image.service
|
|
After=podman-my-img-image.service
|
|
RequiresMountsFor=%t/containers
|
|
Requires=podman-my-app-network.service
|
|
After=podman-my-app-network.service
|
|
Requires=podman-my-app-volume.service
|
|
After=podman-my-app-volume.service
|