2024-11-21 18:10:33 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-07-26 22:12:48 +02:00
|
|
|
{
|
2023-08-30 14:25:52 +02:00
|
|
|
networking = {
|
|
|
|
inherit (config.secrets.secrets.local.networking) hostId;
|
|
|
|
};
|
|
|
|
systemd.network.networks = {
|
|
|
|
"01-lan1" = {
|
2024-01-11 22:42:03 +01:00
|
|
|
DHCP = "yes";
|
2024-01-15 20:46:53 +01:00
|
|
|
matchConfig.MACAddress = config.secrets.secrets.local.networking.interfaces.lan01.mac;
|
2023-09-01 20:07:03 +02:00
|
|
|
networkConfig = {
|
|
|
|
IPv6PrivacyExtensions = "yes";
|
|
|
|
MulticastDNS = true;
|
|
|
|
};
|
2023-08-30 14:25:52 +02:00
|
|
|
};
|
2024-01-23 02:06:27 +01:00
|
|
|
"01-wlan1" = {
|
|
|
|
DHCP = "yes";
|
|
|
|
matchConfig.MACAddress = config.secrets.secrets.local.networking.interfaces.wlan01.mac;
|
|
|
|
networkConfig = {
|
|
|
|
IPv6PrivacyExtensions = "yes";
|
|
|
|
MulticastDNS = true;
|
|
|
|
};
|
|
|
|
};
|
2023-08-30 14:25:52 +02:00
|
|
|
};
|
2024-07-26 22:12:48 +02:00
|
|
|
networking.nftables.firewall.zones.untrusted.interfaces = [ "lan01" ];
|
2024-11-21 18:10:33 +01:00
|
|
|
services.mullvad-vpn = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.mullvad-vpn;
|
|
|
|
};
|
|
|
|
environment.persistence."/state".directories = [
|
|
|
|
"/etc/mullvad-vpn"
|
|
|
|
{
|
|
|
|
directory = "/var/lib/netbird-main";
|
2024-11-21 19:58:15 +01:00
|
|
|
user = "netbird-main";
|
2024-11-21 18:10:33 +01:00
|
|
|
}
|
|
|
|
];
|
|
|
|
services.netbird = {
|
|
|
|
clients.main = {
|
|
|
|
port = 51820;
|
|
|
|
environment = {
|
|
|
|
NB_MANAGEMENT_URL = "https://netbird.${config.secrets.secrets.global.domains.web}";
|
|
|
|
NB_ADMIN_URL = "https://netbird.${config.secrets.secrets.global.domains.web}";
|
|
|
|
NB_HOSTNAME = "desktopnix";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
users.users."patrick".extraGroups = [ "netbird-main" ];
|
2023-08-30 14:25:52 +02:00
|
|
|
}
|