nixos-config/linux/blitzar/network.nix

24 lines
745 B
Nix
Raw Normal View History

2023-10-09 10:44:07 -07:00
{ config, ... }: {
2023-11-27 13:19:16 -08:00
networking = let const = config.constants; in {
domain = const.domain;
2023-10-09 10:44:07 -07:00
hostId = "30f8f777";
networkmanager = {
enable = true;
wifi.backend = "iwd";
};
nftables.enable = true;
2023-11-14 20:56:38 -08:00
wireguard.interfaces.wgb = {
ips = [ "10.32.54.2/32" ];
peers = [{
allowedIPs = [ "10.32.54.0/24" ];
2023-11-27 13:19:16 -08:00
endpoint = "${const.domain}:${toString const.port.wireguard-server}";
2023-11-15 14:51:46 -08:00
publicKey = "0j8+alXU/f2UgWN61R6+Wjs9xelGRwpSbe5NyOwWlF4=";
2023-11-14 20:56:38 -08:00
}];
privateKeyFile = config.sops.secrets."wireguard/${config.networking.hostName}".path;
};
2023-10-09 10:44:07 -07:00
wireless.iwd.enable = true;
};
services.resolved.enable = true;
2023-11-14 20:56:38 -08:00
sops.secrets."wireguard/${config.networking.hostName}" = { };
2023-10-09 10:44:07 -07:00
}