diff options
| author | Grigory Shipunov | 2022-10-29 20:38:12 +0200 |
|---|---|---|
| committer | Grigory Shipunov | 2022-10-29 20:38:12 +0200 |
| commit | 3884eb2f82b93ebd9112f6a04c62a8a7d26662dd (patch) | |
| tree | 72e5f323d6a2fb220c10beb4964b3b31a5f837d2 /hosts | |
| parent | 96095790cdbf2760e63a19c7f7d6cae98433db15 (diff) | |
yolo
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/microwave/configuration.nix | 3 | ||||
| -rw-r--r-- | hosts/microwave/default.nix | 2 | ||||
| -rw-r--r-- | hosts/microwave/stateful-networking.nix | 30 |
3 files changed, 33 insertions, 2 deletions
diff --git a/hosts/microwave/configuration.nix b/hosts/microwave/configuration.nix index 8b7dd9b..305e6be 100644 --- a/hosts/microwave/configuration.nix +++ b/hosts/microwave/configuration.nix @@ -18,7 +18,7 @@ kicad gimp inkscape - (xfce.thunar.override { thunarPlugins = with xfce; [ thunar-volman thunar-archive-plugin ];}) + #(xfce.thunar.override { thunarPlugins = with xfce; [ thunar-volman thunar-archive-plugin ];}) ]; @@ -73,6 +73,7 @@ "plugdev" "dialout" "bluetooth" + "networkmanager" ]; group = "users"; home = "/home/grue"; diff --git a/hosts/microwave/default.nix b/hosts/microwave/default.nix index 53ff03b..5b1f235 100644 --- a/hosts/microwave/default.nix +++ b/hosts/microwave/default.nix @@ -3,7 +3,7 @@ ./configuration.nix ./hardware-configuration.nix - ./network.nix + ./stateful-networking.nix ./secrets.nix ]; } diff --git a/hosts/microwave/stateful-networking.nix b/hosts/microwave/stateful-networking.nix new file mode 100644 index 0000000..1c89ae3 --- /dev/null +++ b/hosts/microwave/stateful-networking.nix @@ -0,0 +1,30 @@ +{ pkgs, config, ... }: { + networking = { + hostName = "microwave"; # Define your hostname. + hostId = "7da4f1e6"; + firewall.enable = true; + wireguard.enable = true; + # wireless.iwd.enable = true; + # networkmanager.wifi.backend = "iwd"; + }; + + # fix networkmanager wireguard + networking.firewall = { + # if packets are still dropped, they will show up in dmesg + logReversePathDrops = true; + # wireguard trips rpfilter up + extraCommands = '' + ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN + ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN + ''; + extraStopCommands = '' + ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN || true + ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true + ''; + }; + + services.resolved = { + enable = true; + dnssec = "allow-downgrade"; + }; +} |
