From 12960978099fe18675156daf6d293cb4e5e7f2d9 Mon Sep 17 00:00:00 2001 From: iFargle Date: Fri, 12 Jan 2024 16:45:55 +0900 Subject: [PATCH] Update nuc-server --- nixos/hosts/nuc-server/default.nix | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) 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; - }; }