From ea3e518de35c20edfeedd8a5974457d950dd5d14 Mon Sep 17 00:00:00 2001 From: xinyangli Date: Sun, 30 Mar 2025 18:48:52 +0800 Subject: [PATCH] weilite/immich: fix auto stack timer --- machines/weilite/services/immich.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/machines/weilite/services/immich.nix b/machines/weilite/services/immich.nix index f2aa406..25e403f 100644 --- a/machines/weilite/services/immich.nix +++ b/machines/weilite/services/immich.nix @@ -82,7 +82,7 @@ in sops.templates."immich/auto_stack.env" = { owner = "immich_auto_stack"; content = '' - API_KEY=${config.sops.placeholder."immich/auto_stack_apikey"}; + API_KEY=${config.sops.placeholder."immich/auto_stack_apikey"} ''; }; @@ -113,8 +113,8 @@ in ] ); immich_auto_stack = pkgs.fetchurl { - url = "https://gist.github.com/xinyangli/39de5979e72d81af6fe9ddb7d1805df4"; - hash = "sha256-izbzP+330tZUGPTfS3SdJnGS5uSn5uf8WmXd6ep8SQg="; + url = "https://gist.githubusercontent.com/xinyangli/39de5979e72d81af6fe9ddb7d1805df4/raw/7798ed8cef7bcd3d06ed005feb0dd01b4b603684/immich_auto_stack.py"; + hash = "sha256-qE7TRJ+TLFdSJanBiuKP6fgijdE1NqAeSXWSzsfyEO0="; }; in { @@ -126,6 +126,8 @@ in serviceConfig = { ExecStart = "${lib.getExe python} ${immich_auto_stack}"; EnvironmentFile = config.sops.templates."immich/auto_stack.env".path; + WorkingDirectory = "%t/immich-auto-stack"; + RuntimeDirectory = "immich-auto-stack"; User = "immich_auto_stack"; Group = "immich_auto_stack"; };