diff --git a/modules/base/network.nix b/modules/base/network.nix index 41c9959..da4fad5 100644 --- a/modules/base/network.nix +++ b/modules/base/network.nix @@ -1,14 +1,10 @@ -{ lib, pkgs, ... }: { +{ ... }: { networking = { firewall = { allowedTCPPorts = [ 1234 1337 8000 8080 ]; allowedUDPPorts = [ 1234 1337 8000 8080 ]; }; nameservers = [ "127.0.0.53" ]; # resolved stub resolver - networkmanager = { - enable = true; - dns = lib.mkForce "none"; - }; }; # TODO: these systemd networkd settings will be the default once diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index acddb14..d311cb1 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -1,6 +1,7 @@ { pkgs, ... }: { imports = [ ./firefox.nix + ./network.nix ./ssh.nix ./sway.nix ]; diff --git a/modules/desktop/network.nix b/modules/desktop/network.nix new file mode 100644 index 0000000..6dffac8 --- /dev/null +++ b/modules/desktop/network.nix @@ -0,0 +1,15 @@ +{ lib, ... }: { + networking = { + networkmanager = { + enable = true; + dns = lib.mkForce "none"; + }; + }; + + # systemd-networkd-wait-online can timeout and fail if there are no + # network interfaces available for it to manage. When systemd-networkd is + # enabled but a different service is responsible for managing the system’s + # internet connection (for example, NetworkManager), this service is unnecessary and can be disabled. + # https://search.nixos.org/options?channel=23.05&show=systemd.network.wait-online.enable + systemd.network.wait-online.enable = false; +}