Update nuc-server

This commit is contained in:
iFargle 2024-01-12 16:45:55 +09:00
parent e7793cb1b3
commit 1296097809

View file

@ -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;
};
}