Revert "Switch to networkmanager for the desktop"
This reverts commit ce6c882435
.
This commit is contained in:
parent
ddccfd94fe
commit
70934dcf60
3 changed files with 41 additions and 21 deletions
|
@ -4,6 +4,7 @@
|
||||||
./amdgpu-sg-fix.nix
|
./amdgpu-sg-fix.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./irc.nix
|
./irc.nix
|
||||||
|
./network-vpns.nix
|
||||||
./network.nix
|
./network.nix
|
||||||
./secrets.nix
|
./secrets.nix
|
||||||
./zfs.nix
|
./zfs.nix
|
||||||
|
@ -35,7 +36,6 @@
|
||||||
"plugdev"
|
"plugdev"
|
||||||
"dialout"
|
"dialout"
|
||||||
"bluetooth"
|
"bluetooth"
|
||||||
"networkmanager"
|
|
||||||
];
|
];
|
||||||
group = "users";
|
group = "users";
|
||||||
home = "/home/grue";
|
home = "/home/grue";
|
||||||
|
@ -56,4 +56,5 @@
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,9 +82,10 @@
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
#networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
||||||
|
networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "toaster";
|
hostName = "toaster";
|
||||||
firewall.enable = true;
|
firewall.enable = true;
|
||||||
|
networkmanager.enable = false;
|
||||||
|
useNetworkd = true;
|
||||||
wireguard.enable = true;
|
wireguard.enable = true;
|
||||||
|
wireless.iwd.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.resolved = {
|
services.resolved = {
|
||||||
|
@ -18,22 +21,37 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# fixup the rpfilter fucking up the networkmanager wireguard
|
# workaround for networkd waiting for shit
|
||||||
networking.firewall = {
|
systemd.services.systemd-networkd-wait-online.serviceConfig.ExecStart = [
|
||||||
# if packets are still dropped, they will show up in dmesg
|
"" # clear old command
|
||||||
logReversePathDrops = true;
|
"${config.systemd.package}/lib/systemd/systemd-networkd-wait-online --any"
|
||||||
# wireguard trips rpfilter up
|
];
|
||||||
extraCommands = ''
|
|
||||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN
|
systemd.network = {
|
||||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN
|
enable = true;
|
||||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 1337 -j RETURN
|
|
||||||
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 1337 -j RETURN
|
networks."10-ether" = {
|
||||||
'';
|
matchConfig.MACAddress = "e8:80:88:2f:c6:70";
|
||||||
extraStopCommands = ''
|
networkConfig = {
|
||||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN || true
|
DHCP = "yes";
|
||||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true
|
IPv6AcceptRA = true;
|
||||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 1337 -j RETURN || true
|
};
|
||||||
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 1337 -j RETURN || true
|
};
|
||||||
'';
|
networks."10-dock" = {
|
||||||
|
matchConfig.Name = "enp5s0f4u1u1";
|
||||||
|
networkConfig = {
|
||||||
|
DHCP = "yes";
|
||||||
|
IPv6AcceptRA = true;
|
||||||
|
};
|
||||||
|
dhcpV4Config = { RouteMetric = 666; };
|
||||||
|
};
|
||||||
|
networks."10-wlan" = {
|
||||||
|
# matchConfig.MACAddress = "04:7b:cb:2a:aa:8c";
|
||||||
|
matchConfig.Name = "wlan0";
|
||||||
|
networkConfig = {
|
||||||
|
DHCP = "yes";
|
||||||
|
IPv6AcceptRA = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue