Update tailscale module

Allow me to configure the hostname that tailscale reports
This commit is contained in:
Greg Hellings
2025-10-22 15:41:04 -05:00
parent 0bb96abdbe
commit 9e8e9aa514
2 changed files with 17 additions and 2 deletions
+13 -1
View File
@@ -5,7 +5,15 @@ let
in
{
options = {
greg.tailscale.enable = lib.mkEnableOption "Enable Tailscale";
greg.tailscale = {
enable = lib.mkEnableOption "Enable Tailscale";
hostname = lib.mkOption {
description = "Name on the tailnet to use";
default = config.networking.hostName;
type = lib.types.str;
};
};
};
config = lib.mkIf cfg.enable {
@@ -20,6 +28,10 @@ in
enable = true;
authKeyFile = config.age.secrets.tailscale-key.path;
authKeyParameters.preauthorized = true;
extraUpFlags = [
"--hostname"
cfg.hostname
];
useRoutingFeatures = "both";
};
systemd.services.tailscaled.partOf = [ "network-online.target" ];