Add tailscale to nixos-server

This commit is contained in:
iFargle 2023-12-01 17:56:08 +09:00
parent 68d94952c7
commit 1765b80044

View file

@ -4,7 +4,6 @@
inputs.nixos-hardware.nixosModules.framework-13th-gen-intel inputs.nixos-hardware.nixosModules.framework-13th-gen-intel
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
./disks.nix ./disks.nix
# ../../common/modules/boot.nix
../../common/modules/secureboot.nix ../../common/modules/secureboot.nix
../../common/services/fwupd.nix ../../common/services/fwupd.nix
./builder.nix ./builder.nix
@ -31,4 +30,16 @@
# Set the networking hostname: # Set the networking hostname:
networking.hostName = "framework-server"; networking.hostName = "framework-server";
networking.firewall.allowedTCPPorts = [ 22 ]; networking.firewall.allowedTCPPorts = [ 22 ];
# Generic Tailscale configs are in /nixos/common/services/tailscale.nix
# Set up the secrets file:
sops.secrets."tailscale_keys/framework-server" = {
owner = "root";
sopsFile = ../../../secrets/tailscale.yaml;
restartUnits = [
"tailscaled.service"
"tailscaled-autoconnect.service"
];
};
services.tailscale.authKeyFile = "/run/secrets/tailscale_keys/framework-server";
} }