2022-10-22 22:18:32 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
{
|
2022-11-20 20:29:49 +00:00
|
|
|
config.system.stateVersion = "22.05";
|
2022-10-22 22:18:32 +01:00
|
|
|
|
2022-11-20 20:29:49 +00:00
|
|
|
config.networking.hostName = "microserver";
|
|
|
|
config.networking.domain = "home.ts.hillion.co.uk";
|
2022-11-13 16:37:00 +00:00
|
|
|
|
2022-10-22 22:18:32 +01:00
|
|
|
imports = [
|
|
|
|
../../modules/common/default.nix
|
|
|
|
];
|
|
|
|
|
2022-11-20 20:29:49 +00:00
|
|
|
# Networking
|
|
|
|
## Tailscale
|
|
|
|
config.tailscaleAdvertiseRoutes = "10.64.50.0/24,10.239.19.0/24";
|
|
|
|
config.age.secrets."tailscale/microserver.home.ts.hillion.co.uk".file = ../../secrets/tailscale/microserver.home.ts.hillion.co.uk.age;
|
|
|
|
config.tailscalePreAuth = config.age.secrets."tailscale/microserver.home.ts.hillion.co.uk".path;
|
2022-10-22 22:18:32 +01:00
|
|
|
|
2022-11-20 20:29:49 +00:00
|
|
|
## Enable IoT VLAN
|
|
|
|
config.networking.vlans = {
|
2022-10-22 22:18:32 +01:00
|
|
|
vlan2 = {
|
|
|
|
id = 2;
|
|
|
|
interface = "eth0";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-11-20 20:29:49 +00:00
|
|
|
## Enable IP forwarding for Tailscale
|
|
|
|
config.boot.kernel.sysctl = {
|
2022-10-22 22:18:32 +01:00
|
|
|
"net.ipv4.ip_forward" = true;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|