nixos/modules/desktop/network.nix
Casper V. Kristensen 6a24fbfacf 23.11: remove workaround for network-online.target
network-online.target has been fixed to no longer time out for systems with
networking.useDHCP = true and networking.useNetworkd = true. Workarounds
for this can be removed.
2023-12-01 17:49:16 +01:00

21 lines
614 B
Nix

{ lib, ... }: {
networking = {
# It's a little too much to define every WiFi network declaratively.
# Instead, we enable NetworkManager and the nmtui interface.
networkmanager = {
enable = true;
dns = lib.mkForce "none";
};
};
# 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"; }
];
};
}