nix(systemd): use var

This commit is contained in:
surtur 2023-11-20 22:07:19 +01:00
parent 8339b36882
commit 12b2ee2901
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -187,7 +187,9 @@ in {
}; };
}; };
nextcloud = { nextcloud = let
composeF = "%h/.nextcloud/docker-compose.yml";
in {
Unit = { Unit = {
Description = "Podman container Nextcloud"; Description = "Podman container Nextcloud";
PartOf = swayTgt; PartOf = swayTgt;
@ -204,9 +206,9 @@ in {
RestartSec = 5; RestartSec = 5;
TimeoutStartSec = 600; TimeoutStartSec = 600;
# TimeoutStopSec=10; # TimeoutStopSec=10;
ExecStartPre = "/usr/bin/podman-compose -f %h/.nextcloud/docker-compose.yml -p nextcloud down"; ExecStartPre = "/usr/bin/podman-compose -f ${composeF} -p nextcloud down";
ExecStart = "/usr/bin/podman-compose -f %h/.nextcloud/docker-compose.yml -p nextcloud up --remove-orphans"; ExecStart = "/usr/bin/podman-compose -f ${composeF} -p nextcloud up --remove-orphans";
ExecStop = "/usr/bin/podman-compose -f %h/.nextcloud/docker-compose.yml -p nextcloud down"; ExecStop = "/usr/bin/podman-compose -f ${composeF} -p nextcloud down";
Type = "simple"; Type = "simple";
Delegate = "no"; Delegate = "no";
ProtectSystem = "strict"; ProtectSystem = "strict";