diff --git a/nixos/hosts/nuc-server/default.nix b/nixos/hosts/nuc-server/default.nix index 8b7dc389..d781b0cc 100644 --- a/nixos/hosts/nuc-server/default.nix +++ b/nixos/hosts/nuc-server/default.nix @@ -1,6 +1,7 @@ -{ inputs, config, lib, pkgs, modulesPath, desktop, username, platform, ... }: { +{ inputs, config, lib, pkgs, modulesPath, hostname, username, platform, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") + ../../common/services/tailscale-autoconnect.nix ../../common/modules/secureboot.nix ../../common/modules/ssh-luks.nix ../../common/services/podman.nix @@ -32,24 +33,10 @@ # Set the networking hostname: networking.hostName = "nuc-server"; networking.firewall.allowedTCPPorts = [ 22 ]; - - # Generic Tailscale configs are in /nixos/common/services/tailscale.nix - # Set up the secrets file: - sops.secrets."tailscale_keys/nuc-server" = { - owner = "root"; - sopsFile = ../../../secrets/tailscale.yaml; - restartUnits = [ - "tailscaled.service" - "tailscaled-autoconnect.service" - ]; - }; + services.tailscale.authKeyFile = "/run/secrets/tailscale_keys/nuc-server"; services.tailscale.extraUpFlags = [ "--advertise-exit-node" "--advertise-routes=10.2.0.0/24,192.168.1.13/32,192.168.1.14/32" ]; - - boot.kernel.sysctl = { - "net.ipv4.ip_forward" = true; - }; }