Fix eval warning: stdenv.hostPlatform.system

This commit is contained in:
2026-02-19 10:17:53 +00:00
parent 6e637ecf77
commit 3530afb854

View File

@@ -80,7 +80,7 @@
value = {
inherit enable;
script = ''
TS_AUTHKEY=$(cat $RUNTIME_DIRECTORY/authkey) ${lib.getExe self.packages.${pkgs.system}.default} ${hostname} ${lib.concatMapStringsSep " " ({proto, port, dest}: "${proto}:${toString port}:${dest}") forwards}
TS_AUTHKEY=$(cat $RUNTIME_DIRECTORY/authkey) ${lib.getExe self.packages.${pkgs.stdenv.hostPlatform.system}.default} ${hostname} ${lib.concatMapStringsSep " " ({proto, port, dest}: "${proto}:${toString port}:${dest}") forwards}
'';
wantedBy = ["multi-user.target"];
wants = ["network-online.target"];
@@ -91,7 +91,7 @@
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
TS_API_CLIENT_ID=${cfg.clientId} TS_API_CLIENT_SECRET=$(cat ${cfg.clientSecretFile}) ${self.packages.${pkgs.stdenv.hostPlatform.system}.get-authkey}/bin/get-authkey -ephemeral -tags ${lib.concatStringsSep "," cfg.tags} > $RUNTIME_DIRECTORY/authkey
chown ${name}:${name} $RUNTIME_DIRECTORY/authkey
''}";
};