Merge pull request #104785 from Xe/patch-3
nixos/modules/tailscale: add package as an option
This commit is contained in:
commit
96663ea477
@ -14,11 +14,18 @@ in {
|
|||||||
default = 41641;
|
default = 41641;
|
||||||
description = "The port to listen on for tunnel traffic (0=autoselect).";
|
description = "The port to listen on for tunnel traffic (0=autoselect).";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.tailscale;
|
||||||
|
defaultText = "pkgs.tailscale";
|
||||||
|
description = "The package to use for tailscale";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [ pkgs.tailscale ]; # for the CLI
|
environment.systemPackages = [ cfg.package ]; # for the CLI
|
||||||
systemd.packages = [ pkgs.tailscale ];
|
systemd.packages = [ cfg.package ];
|
||||||
systemd.services.tailscaled = {
|
systemd.services.tailscaled = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig.Environment = "PORT=${toString cfg.port}";
|
serviceConfig.Environment = "PORT=${toString cfg.port}";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user