diff --git a/machines/kat-probook/default.nix b/machines/kat-probook/default.nix index 11e8ad5..f8b9d93 100644 --- a/machines/kat-probook/default.nix +++ b/machines/kat-probook/default.nix @@ -51,7 +51,6 @@ git btop ranger - colmena tree lazygit nix-output-monitor diff --git a/machines/kat-probook/router.nix b/machines/kat-probook/router.nix index ed97725..683aa5a 100644 --- a/machines/kat-probook/router.nix +++ b/machines/kat-probook/router.nix @@ -10,28 +10,36 @@ systemd.network = { enable = true; networks = { - "uplink" = { - name = "wlp0s20f3"; - DHCP = "ipv4"; - networkConfig.IPMasquerade = "ipv4"; - }; + # "uplink" = { + # name = "wlp0s20f3"; + # DHCP = "ipv4"; + # networkConfig.IPMasquerade = "ipv4"; + # }; "10-enp2s0" = { name = "enp2s0"; address = [ "192.168.2.1/24" ]; networkConfig.DHCPServer = "yes"; - # dhcpServerConfig = { - # PoolOffset = 100; - # PoolSize = 100; - # BootServerAddress = "192.168.222.1"; - # }; + dhcpServerConfig = { + PoolOffset = 100; + PoolSize = 100; + }; }; }; }; - networking.nat = { - enable = true; - internalInterfaces = [ "enp2s0" ]; - externalInterface = "wlp0s20f3"; + networking = { + nftables = { + enable = true; + tables.nat = { + family = "ip"; + content = '' + chain postrouting { + type nat hook postrouting priority 100; + ip saddr 192.168.2.0/24 masquerade + } + ''; + }; + }; + firewall.allowedUDPPorts = [ 67 ]; }; - networking.firewall.allowedUDPPorts = [ 67 ]; } diff --git a/shell.nix b/shell.nix index 2bc598c..821bdac 100644 --- a/shell.nix +++ b/shell.nix @@ -2,4 +2,4 @@ let sources = import ./npins; pkgs = import sources.nixpkgs { }; in -pkgs.mkShell { packages = with pkgs; [ npins ]; } +pkgs.mkShell { packages = with pkgs; [ npins colmena ]; }