Update tailscale module
Allow me to configure the hostname that tailscale reports
This commit is contained in:
@@ -16,7 +16,10 @@
|
||||
home = true;
|
||||
proxies."jellyfin.home".target = "http://localhost:8096/";
|
||||
proxies."jellyfin.thehellings.lan".target = "http://localhost:8096/";
|
||||
tailscale.enable = true;
|
||||
tailscale = {
|
||||
enable = true;
|
||||
hostname = "jellyfin";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
@@ -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" ];
|
||||
|
||||
Reference in New Issue
Block a user