~
This commit is contained in:
parent
9afc8660a2
commit
2aa531e9e2
3 changed files with 24 additions and 17 deletions
|
@ -51,7 +51,6 @@
|
|||
git
|
||||
btop
|
||||
ranger
|
||||
colmena
|
||||
tree
|
||||
lazygit
|
||||
nix-output-monitor
|
||||
|
|
|
@ -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 ];
|
||||
}
|
||||
|
|
|
@ -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 ]; }
|
||||
|
|
Loading…
Reference in a new issue