move networking to options

This commit is contained in:
jacekpoz 2024-02-29 00:58:00 +01:00
parent 1fb97e7272
commit f545992742
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C
5 changed files with 29 additions and 34 deletions

View file

@ -24,23 +24,6 @@
];
};
networking = {
networkmanager = {
enable = true;
dns = "systemd-resolved";
};
firewall.checkReversePath = "loose";
};
services.resolved.enable = true;
# 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" ]
};
time.timeZone = "Europe/Warsaw";
nix = {

View file

@ -2,6 +2,7 @@ _: {
imports = [
../../options/boot/systemd-boot.nix
../../options/common/docs.nix
../../options/common/networking.nix
../../options/common/oomd.nix
../../options/common/pin-registry.nix
../../options/common/preserve-system.nix

View file

@ -31,23 +31,6 @@
];
};
networking = {
networkmanager = {
enable = true;
dns = "systemd-resolved";
};
firewall.checkReversePath = "loose";
};
services.resolved.enable = true;
# 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" ]
};
time.timeZone = "Europe/Warsaw";
nix = {

View file

@ -4,6 +4,7 @@ _: {
../../options/common/cpu/amd.nix
../../options/common/docs.nix
../../options/common/gpu/amd.nix
../../options/common/networking.nix
../../options/common/oomd.nix
../../options/common/pin-registry.nix
../../options/common/preserve-system.nix

View file

@ -0,0 +1,27 @@
{
lib,
...
}: {
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" ]
};
}