nixos/modules/desktop/network.nix

21 lines
614 B
Nix
Raw Normal View History

2023-08-12 02:13:50 +02:00
{ lib, ... }: {
networking = {
2023-08-25 00:57:42 +02:00
# It's a little too much to define every WiFi network declaratively.
# Instead, we enable NetworkManager and the nmtui interface.
2023-08-12 02:13:50 +02:00
networkmanager = {
enable = true;
dns = lib.mkForce "none";
};
};
2023-08-25 00:59:39 +02:00
# Allow our user to configure the network
users.extraGroups.networkmanager.members = [ "caspervk" ];
# Persist WiFi passwords and other network configuration
environment.persistence."/nix/persist" = {
directories = [
{ directory = "/etc/NetworkManager/system-connections"; user = "root"; group = "root"; mode = "0700"; }
];
};
2023-08-12 02:13:50 +02:00
}