2024-02-29 00:58:00 +01:00
|
|
|
{
|
2024-02-29 01:05:41 +01:00
|
|
|
config,
|
2024-02-29 00:58:00 +01:00
|
|
|
lib,
|
|
|
|
...
|
2024-02-29 01:04:51 +01:00
|
|
|
}: let
|
2024-04-14 18:49:29 +02:00
|
|
|
inherit (config.myOptions.other.system) username;
|
2024-02-29 01:04:51 +01:00
|
|
|
in {
|
2024-02-29 00:58:00 +01:00
|
|
|
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" ]
|
|
|
|
};
|
2024-02-29 01:04:51 +01:00
|
|
|
|
|
|
|
users.users.${username}.extraGroups = [ "networkmanager" ];
|
2024-02-29 00:58:00 +01:00
|
|
|
}
|