forked from poz/niksos
move networking to options
This commit is contained in:
parent
1fb97e7272
commit
f545992742
5 changed files with 29 additions and 34 deletions
|
@ -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 = {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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
|
||||
|
|
27
options/common/networking.nix
Normal file
27
options/common/networking.nix
Normal 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" ]
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue