feat: schizo networking
This commit is contained in:
parent
92bb3f929b
commit
c5898e58d0
5 changed files with 116 additions and 42 deletions
|
@ -3,43 +3,55 @@
|
|||
in {
|
||||
imports = [
|
||||
./networkmanager.nix
|
||||
./dns.nix
|
||||
./firewall.nix
|
||||
];
|
||||
networking = {
|
||||
enableIPv6 = true;
|
||||
|
||||
# INFO: This disables wpa_supplicant,
|
||||
# I use nenetworkmanager instead.
|
||||
wireless.enable = false;
|
||||
wireless = {
|
||||
# INFO: This disables wpa_supplicant,
|
||||
# I use iwd instead.
|
||||
enable = false;
|
||||
|
||||
# use iwd over wpa_supplicant
|
||||
iwd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
IPv6 = {
|
||||
Enabled = true;
|
||||
};
|
||||
Settings = {
|
||||
AutoConnect = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dhcpcd = {
|
||||
# faster boot times
|
||||
wait = "background";
|
||||
extraConfig = "noarp";
|
||||
# do not edit resolv.conf
|
||||
extraConfig = ''
|
||||
nohook resolv.conf
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
nameservers = [
|
||||
# I have choosen Mullvad DNS as my standard DNS provider,
|
||||
# as Quad9 at some point stopped resolving my universitie's IP address.
|
||||
# Furthermore, Mullvad has a pretty good reputation when it comes to privacy
|
||||
"194.242.2.4"
|
||||
"2a07:e340::4"
|
||||
];
|
||||
};
|
||||
services.resolved = {
|
||||
# service discovery on a local network via the mDNS/DNS-SD protocol suite
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
dnssec = "false";
|
||||
dnsovertls = "opportunistic";
|
||||
fallbackDns = [
|
||||
"194.242.2.4"
|
||||
"2a07:e340::4"
|
||||
];
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
users.users.${username}.extraGroups = ["networkmanager"];
|
||||
|
||||
# systemd = {
|
||||
# network = {
|
||||
# enable = true;
|
||||
# wait-online.anyInterface = true;
|
||||
# };
|
||||
# };
|
||||
# faster boot
|
||||
systemd = {
|
||||
network = {
|
||||
enable = true;
|
||||
wait-online.enable = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue