niksos/options/common/networking.nix
jacekpoz 81f9c0dc3e
add the user to the networkmanager group in the option-module
still IDK how else to call these might change the name later
2024-02-29 01:04:51 +01:00

31 lines
842 B
Nix

{
lib,
...
}: let
username = config.myOptions.other.system.username;
in {
networking = {
networkmanager = {
enable = true;
dns = "systemd-resolved";
};
firewall.checkReversePath = "loose";
};
services.resolved = {
enable = true;
fallbackDns = [
"9.9.9.9"
"2620:fe::fe"
];
};
# don't wait for network to boot faster
# https://old.reddit.com/r/NixOS/comments/vdz86j/how_to_remove_boot_dependency_on_network_for_a
systemd = {
targets.network-online.wantedBy = lib.mkForce []; # default is [ "multi-user.target" ]
services.NetworkManager-wait-online.wantedBy = lib.mkForce []; # default is [ "network-online.target" ]
};
users.users.${username}.extraGroups = [ "networkmanager" ];
}