This commit is contained in:
catvayor 2024-09-11 18:14:39 +02:00
parent 9afc8660a2
commit 2aa531e9e2
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
3 changed files with 24 additions and 17 deletions

View file

@ -51,7 +51,6 @@
git
btop
ranger
colmena
tree
lazygit
nix-output-monitor

View file

@ -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 = {
networking = {
nftables = {
enable = true;
internalInterfaces = [ "enp2s0" ];
externalInterface = "wlp0s20f3";
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 ];
}

View file

@ -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 ]; }