From 1bc52438da3339dc7ad2c86171d787e5f7ca05c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Numbus?= Date: Sat, 10 Jan 2026 10:44:05 +0100 Subject: [PATCH] Get systemD services working. --- templates/nix-config/podman/frigate.nix | 8 ++++---- templates/nix-config/podman/gitea.nix | 8 ++++---- templates/nix-config/podman/home-assistant.nix | 8 ++++---- templates/nix-config/podman/immich.nix | 8 ++++---- templates/nix-config/podman/it-tools.nix | 8 ++++---- templates/nix-config/podman/nextcloud.nix | 8 ++++---- templates/nix-config/podman/passbolt.nix | 8 ++++---- templates/nix-config/podman/pi-hole.nix | 8 ++++---- templates/nix-config/podman/traefik.nix | 11 +++++------ 9 files changed, 37 insertions(+), 38 deletions(-) diff --git a/templates/nix-config/podman/frigate.nix b/templates/nix-config/podman/frigate.nix index ec61ba3..db4e3f0 100644 --- a/templates/nix-config/podman/frigate.nix +++ b/templates/nix-config/podman/frigate.nix @@ -58,18 +58,18 @@ in after = [ "network.target" ]; requires = [ "traefik.service" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.podman pkgs.podman-compose ]; + path = [ pkgs.podman ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "podman-compose -f /etc/${compose_file} down"; + ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; Restart = "on-failure"; RestartSec = "10m"; StartLimitBurst = "3"; diff --git a/templates/nix-config/podman/gitea.nix b/templates/nix-config/podman/gitea.nix index 6f65df0..42a40ac 100644 --- a/templates/nix-config/podman/gitea.nix +++ b/templates/nix-config/podman/gitea.nix @@ -71,18 +71,18 @@ in after = [ "network.target" ]; requires = [ "traefik.service" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.podman pkgs.podman-compose ]; + path = [ pkgs.podman ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "podman-compose -f /etc/${compose_file} down"; + ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; Restart = "on-failure"; RestartSec = "10m"; StartLimitBurst = "3"; diff --git a/templates/nix-config/podman/home-assistant.nix b/templates/nix-config/podman/home-assistant.nix index 3a9831e..b8587e5 100644 --- a/templates/nix-config/podman/home-assistant.nix +++ b/templates/nix-config/podman/home-assistant.nix @@ -57,18 +57,18 @@ in after = [ "network.target" ]; requires = [ "traefik.service" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.podman pkgs.podman-compose ]; + path = [ pkgs.podman ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "podman-compose -f /etc/${compose_file} down"; + ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; Restart = "on-failure"; RestartSec = "10m"; StartLimitBurst = "3"; diff --git a/templates/nix-config/podman/immich.nix b/templates/nix-config/podman/immich.nix index 19bff0d..ee5949e 100644 --- a/templates/nix-config/podman/immich.nix +++ b/templates/nix-config/podman/immich.nix @@ -94,18 +94,18 @@ in after = [ "network.target" ]; requires = [ "traefik.service" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.podman pkgs.podman-compose ]; + path = [ pkgs.podman ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "podman-compose -f /etc/${compose_file} down"; + ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; Restart = "on-failure"; RestartSec = "10m"; StartLimitBurst = "3"; diff --git a/templates/nix-config/podman/it-tools.nix b/templates/nix-config/podman/it-tools.nix index 8cab1a4..98b1720 100644 --- a/templates/nix-config/podman/it-tools.nix +++ b/templates/nix-config/podman/it-tools.nix @@ -37,18 +37,18 @@ in after = [ "network.target" ]; requires = [ "traefik.service" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.podman pkgs.podman-compose ]; + path = [ pkgs.podman ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "podman-compose -f /etc/${compose_file} down"; + ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; Restart = "on-failure"; RestartSec = "10m"; StartLimitBurst = "3"; diff --git a/templates/nix-config/podman/nextcloud.nix b/templates/nix-config/podman/nextcloud.nix index f8f5d4c..000e1fa 100644 --- a/templates/nix-config/podman/nextcloud.nix +++ b/templates/nix-config/podman/nextcloud.nix @@ -60,18 +60,18 @@ in after = [ "network.target" ]; requires = [ "traefik.service" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.podman pkgs.podman-compose ]; + path = [ pkgs.podman ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "podman-compose -f /etc/${compose_file} down"; + ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; Restart = "on-failure"; RestartSec = "10m"; StartLimitBurst = "3"; diff --git a/templates/nix-config/podman/passbolt.nix b/templates/nix-config/podman/passbolt.nix index 95455c6..00c5d09 100644 --- a/templates/nix-config/podman/passbolt.nix +++ b/templates/nix-config/podman/passbolt.nix @@ -89,18 +89,18 @@ in after = [ "network.target" ]; requires = [ "traefik.service" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.podman pkgs.podman-compose ]; + path = [ pkgs.podman ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "podman-compose -f /etc/${compose_file} down"; + ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; Restart = "on-failure"; RestartSec = "10m"; StartLimitBurst = "3"; diff --git a/templates/nix-config/podman/pi-hole.nix b/templates/nix-config/podman/pi-hole.nix index f803a63..034e317 100644 --- a/templates/nix-config/podman/pi-hole.nix +++ b/templates/nix-config/podman/pi-hole.nix @@ -65,18 +65,18 @@ in after = [ "network.target" ]; requires = [ "traefik.service" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.podman pkgs.podman-compose ]; + path = [ pkgs.podman ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "podman-compose -f /etc/${compose_file} down"; + ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; Restart = "on-failure"; RestartSec = "10m"; StartLimitBurst = "3"; diff --git a/templates/nix-config/podman/traefik.nix b/templates/nix-config/podman/traefik.nix index 5e3c493..0802a0e 100644 --- a/templates/nix-config/podman/traefik.nix +++ b/templates/nix-config/podman/traefik.nix @@ -44,21 +44,20 @@ TRAEFIK_REF_NETWORKS systemd.services.traefik = { description = "Podman container : ${container_name}"; - after = [ "network.target" ]; - requires = [ "numbus-activation-networked.service" "numbus-activation-chowned.service" ]; + after = [ "numbus-activation-networked.service" "numbus-activation-chowned.service" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.podman pkgs.podman-compose ]; + path = [ pkgs.podman ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "podman-compose -f /etc/${compose_file} down"; + ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; Restart = "on-failure"; RestartSec = "10m"; StartLimitBurst = "3";