Skip to content

Instantly share code, notes, and snippets.

@Ethorbit
Last active September 30, 2025 02:57
Show Gist options
  • Select an option

  • Save Ethorbit/97da561da6ad58bc7c4af1fa047681a0 to your computer and use it in GitHub Desktop.

Select an option

Save Ethorbit/97da561da6ad58bc7c4af1fa047681a0 to your computer and use it in GitHub Desktop.
NixOS systemd user service to start Docker container
[Unit]
Description=Start Docker ComfyUI
[Service]
Type=simple
RemainAfterExit=yes
ExecStart=%h/.nix-profile/bin/bash -c "/run/current-system/sw/bin/docker compose -f /home/ai/comfyui/docker-compose.yaml up"
ExecStop=%h/.nix-profile/bin/bash -c "/run/current-system/sw/bin/docker compose -f /home/ai/comfyui/docker-compose.yaml stop"
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment