From a210cd622fc56f50ff4d3954876ef3cb182e7e0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Numbus?= Date: Sat, 10 Jan 2026 08:49:50 +0100 Subject: [PATCH] Update systemD services --- templates/nix-config/misc/activation.nix | 19 ++++++++++--------- templates/nix-config/podman/frigate.nix | 8 ++++---- templates/nix-config/podman/gitea.nix | 8 ++++---- .../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 | 8 ++++---- 10 files changed, 46 insertions(+), 45 deletions(-) diff --git a/templates/nix-config/misc/activation.nix b/templates/nix-config/misc/activation.nix index 4eca75d..63e1ceb 100644 --- a/templates/nix-config/misc/activation.nix +++ b/templates/nix-config/misc/activation.nix @@ -5,6 +5,7 @@ description = "Numbus-Server activation : Correct permissions"; wantedBy = [ "multi-user.target" "traefik.service" ]; after = [ "network.target" "local-fs.target" ]; + path = [ pkgs.coreutils ]; serviceConfig = { Type = "oneshot"; RemainAfterExit = true; @@ -16,12 +17,12 @@ exit 0 fi - ${pkgs.coreutils}/bin/mkdir -p /mnt/config/ /mnt/data/ /home/numbus-admin/.numbus-server/ - ${pkgs.coreutils}/bin/chown -R numbus-admin:users /mnt/config/ - ${pkgs.coreutils}/bin/chown -R numbus-admin:users /mnt/data/ - ${pkgs.coreutils}/bin/chown -R numbus-admin:users /home/numbus-admin/.numbus-server/ + mkdir -p /mnt/config/ /mnt/data/ /home/numbus-admin/.numbus-server/ + chown -R numbus-admin:users /mnt/config/ + chown -R numbus-admin:users /mnt/data/ + chown -R numbus-admin:users /home/numbus-admin/.numbus-server/ - ${pkgs.coreutils}/bin/touch /home/numbus-admin/.numbus-server/chowned.true + touch /home/numbus-admin/.numbus-server/chowned.true ''; }; @@ -29,7 +30,8 @@ description = "Numbus-Server activation : Create podman networks"; wantedBy = [ "multi-user.target" "traefik.service" ]; before = [ "traefik.service" ]; - after = [ "network.target" "local-fs.target" ]; + after = [ "network.target" "local-fs.target" "numbus-activation-chowned.service" ]; + path = [ pkgs.podman pkgs.coreutils ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; @@ -44,9 +46,8 @@ fi PODMAN_NETWORKS - - ${pkgs.coreutils}/bin/mkdir -p /home/numbus-admin/.numbus-server/ - ${pkgs.coreutils}/bin/touch /home/numbus-admin/.numbus-server/networked.true + mkdir -p /home/numbus-admin/.numbus-server/ + touch /home/numbus-admin/.numbus-server/networked.true ''; }; } \ No newline at end of file diff --git a/templates/nix-config/podman/frigate.nix b/templates/nix-config/podman/frigate.nix index db4e3f0..ec61ba3 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 ]; + path = [ pkgs.podman pkgs.podman-compose ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; + ExecStop = "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 42a40ac..6f65df0 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 ]; + path = [ pkgs.podman pkgs.podman-compose ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; + ExecStop = "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 b8587e5..3a9831e 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 ]; + path = [ pkgs.podman pkgs.podman-compose ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; + ExecStop = "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 ee5949e..19bff0d 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 ]; + path = [ pkgs.podman pkgs.podman-compose ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; + ExecStop = "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 98b1720..8cab1a4 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 ]; + path = [ pkgs.podman pkgs.podman-compose ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; + ExecStop = "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 000e1fa..f8f5d4c 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 ]; + path = [ pkgs.podman pkgs.podman-compose ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; + ExecStop = "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 00c5d09..95455c6 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 ]; + path = [ pkgs.podman pkgs.podman-compose ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; + ExecStop = "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 034e317..f803a63 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 ]; + path = [ pkgs.podman pkgs.podman-compose ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; + ExecStop = "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 db1a0e8..5e3c493 100644 --- a/templates/nix-config/podman/traefik.nix +++ b/templates/nix-config/podman/traefik.nix @@ -47,18 +47,18 @@ TRAEFIK_REF_NETWORKS after = [ "network.target" ]; requires = [ "numbus-activation-networked.service" "numbus-activation-chowned.service" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.podman ]; + path = [ pkgs.podman pkgs.podman-compose ]; serviceConfig = { User = "numbus-admin"; Environment = [ "XDG_RUNTIME_DIR=/run/user/1000" ]; Type = "exec"; # Pull the latest image before running - ExecStartPre = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} pull"; + ExecStartPre = "podman-compose -f /etc/${compose_file} pull"; # Bring the service up - ExecStart = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} up --remove-orphans"; + ExecStart = "podman-compose -f /etc/${compose_file} up --remove-orphans"; # Take it down gracefully - ExecStop = "${pkgs.podman-compose}/bin/podman-compose -f /etc/${compose_file} down"; + ExecStop = "podman-compose -f /etc/${compose_file} down"; Restart = "on-failure"; RestartSec = "10m"; StartLimitBurst = "3";