configuration.nix/hosts/skipper/network.nix

49 lines
961 B
Nix
Raw Normal View History

2023-11-04 16:12:45 +05:30
{ lib, ... }: {
imports = [ ./wireguard.nix ];
2023-07-20 20:40:19 +05:30
networking = {
hostName = "Skipper";
2023-11-22 12:23:52 +05:30
extraHosts = ''
10.8.1.1 proxy
10.8.1.2 skipper
10.8.1.3 rico1
10.8.1.4 rico2
'';
2023-09-23 13:18:33 +05:30
networkmanager = {
enable = true;
dns = "systemd-resolved";
wifi = {
backend = "iwd";
powersave = false;
};
};
2023-07-20 23:33:31 +05:30
useDHCP = lib.mkDefault false;
2023-07-20 20:40:19 +05:30
wireless.iwd = {
enable = true;
settings = {
General = {
AddressRandomization = "network";
2023-07-20 23:36:49 +05:30
EnableNetworkConfiguration = false;
2023-07-20 20:40:19 +05:30
};
Settings = {
2023-07-20 23:36:49 +05:30
AutoConnect = "yes";
2023-07-20 20:40:19 +05:30
};
};
};
};
2023-11-22 12:23:52 +05:30
services.resolved = {
enable = true;
dnssec = "allow-downgrade";
extraConfig = ''
[Resolve]
DNS=9.9.9.11#dns11.quad9.net 2620:fe::11#dns11.quad9.net 149.112.112.11#dns11.quad9.net 2620:fe::fe:11#dns11.quad9.net
DNSOverTLS=yes
Domains=~.
'';
};
2023-07-20 20:40:19 +05:30
}