mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
nixos/tailscale: allow to set TS_PERMIT_CERT_UID
env variable
This setting was introduced with Tailscale 1.22.0, see https://github.com/tailscale/tailscale/releases/tag/v1.22.0 Co-authored-by: pennae <github@quasiparticle.net>
This commit is contained in:
parent
6a289abddd
commit
f89894e2e3
1 changed files with 9 additions and 1 deletions
|
@ -21,6 +21,12 @@ in {
|
|||
description = ''The interface name for tunnel traffic. Use "userspace-networking" (beta) to not use TUN.'';
|
||||
};
|
||||
|
||||
permitCertUid = mkOption {
|
||||
type = types.nullOr types.nonEmptyStr;
|
||||
default = null;
|
||||
description = "Username or user ID of the user allowed to to fetch Tailscale TLS certificates for the node.";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.tailscale;
|
||||
|
@ -38,7 +44,9 @@ in {
|
|||
serviceConfig.Environment = [
|
||||
"PORT=${toString cfg.port}"
|
||||
''"FLAGS=--tun ${lib.escapeShellArg cfg.interfaceName}"''
|
||||
];
|
||||
] ++ (lib.optionals (cfg.permitCertUid != null) [
|
||||
"TS_PERMIT_CERT_UID=${cfg.permitCertUid}"
|
||||
]);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue