From d36ca2b8398cf420c5343824764e463ff3da4fa6 Mon Sep 17 00:00:00 2001 From: Moraxyc Date: Wed, 18 Mar 2026 19:43:05 +0800 Subject: [PATCH] nixos/pocket-id: fix force close on shutdown --- nixos/modules/services/security/pocket-id.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nixos/modules/services/security/pocket-id.nix b/nixos/modules/services/security/pocket-id.nix index 23673f54d981..9396185c2469 100644 --- a/nixos/modules/services/security/pocket-id.nix +++ b/nixos/modules/services/security/pocket-id.nix @@ -213,15 +213,16 @@ in settingsFile ]; + script = '' + ${exportAllCredentials cfg.credentials} + exec ${getExe cfg.package} + ''; + serviceConfig = { Type = "simple"; User = cfg.user; Group = cfg.group; WorkingDirectory = cfg.dataDir; - ExecStart = pkgs.writeShellScript "pocket-id-start" '' - ${exportAllCredentials cfg.credentials} - ${getExe cfg.package} - ''; Restart = "always"; RestartSec = 1; EnvironmentFile = [