b9a5ddfc95
... + changes
33 lines
965 B
Nix
33 lines
965 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
{
|
|
systemd.services.adventurelog = {
|
|
unitConfig = {
|
|
Description = "The ultimate travel companion.";
|
|
Documentation = "https://adventurelog.app/";
|
|
After = "podman.socket";
|
|
Wants = [
|
|
"podman.socket"
|
|
"caddy.service"
|
|
];
|
|
Upholds = [ "caddy.service" ];
|
|
};
|
|
serviceConfig = {
|
|
ExecStartPre = "/run/current-system/sw/bin/docker compose -f /etc/adventurelog/compose.yml down";
|
|
ExecStart = "/run/current-system/sw/bin/docker compose -f /etc/adventurelog/compose.yml up --remove-orphans";
|
|
ExecStop = "/run/current-system/sw/bin/docker compose -f /etc/adventurelog/compose.yml down";
|
|
Restart = "always";
|
|
RestartSec = 10;
|
|
Environment = [
|
|
"PATH=${pkgs.docker-compose}/bin:${pkgs.podman}/bin:$PATH"
|
|
"PODMAN_COMPOSE_PROVIDER=${pkgs.docker-compose}/bin/docker-compose"
|
|
];
|
|
};
|
|
wantedBy = [ "multi-user.target" ];
|
|
};
|
|
}
|