mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge pull request #291907 from SuperSandro2000/tailscaled-flags
This commit is contained in:
commit
5ad27da222
@ -66,6 +66,13 @@ in {
|
||||
default = [];
|
||||
example = ["--ssh"];
|
||||
};
|
||||
|
||||
extraDaemonFlags = mkOption {
|
||||
description = lib.mdDoc "Extra flags to pass to {command}`tailscaled`.";
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = ["--no-logs-no-support"];
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
@ -80,7 +87,7 @@ in {
|
||||
] ++ lib.optional config.networking.resolvconf.enable config.networking.resolvconf.package;
|
||||
serviceConfig.Environment = [
|
||||
"PORT=${toString cfg.port}"
|
||||
''"FLAGS=--tun ${lib.escapeShellArg cfg.interfaceName}"''
|
||||
''"FLAGS=--tun ${lib.escapeShellArg cfg.interfaceName} ${lib.concatStringsSep " " cfg.extraDaemonFlags}"''
|
||||
] ++ (lib.optionals (cfg.permitCertUid != null) [
|
||||
"TS_PERMIT_CERT_UID=${cfg.permitCertUid}"
|
||||
]);
|
||||
|
Loading…
Reference in New Issue
Block a user