Stop losing tsnet state on redeploys

This commit is contained in:
bluepython508 committed 2024-11-01 18:06:24 +00:00
1 parent 5cdfab398d
commit f0641ffd6e
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -87,6 +87,7 @@
serviceConfig = {
DynamicUser = true;
RuntimeDirectory = name;
StateDirectory = name;
ExecStartPre = "!${pkgs.writeShellScript "get-authkey" ''
set -e
TS_API_CLIENT_ID=${cfg.clientId} TS_API_CLIENT_SECRET=$(cat ${cfg.clientSecretFile}) ${self.packages.${pkgs.system}.get-authkey}/bin/get-authkey -ephemeral -tags ${lib.concatStringsSep "," cfg.tags} > $RUNTIME_DIRECTORY/authkey