Stop losing tsnet state on redeploys
This commit is contained in:
@@ -87,6 +87,7 @@
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
RuntimeDirectory = name;
|
RuntimeDirectory = name;
|
||||||
|
StateDirectory = name;
|
||||||
ExecStartPre = "!${pkgs.writeShellScript "get-authkey" ''
|
ExecStartPre = "!${pkgs.writeShellScript "get-authkey" ''
|
||||||
set -e
|
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
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user