~
This commit is contained in:
parent
9afc8660a2
commit
2aa531e9e2
3 changed files with 24 additions and 17 deletions
|
@ -51,7 +51,6 @@
|
||||||
git
|
git
|
||||||
btop
|
btop
|
||||||
ranger
|
ranger
|
||||||
colmena
|
|
||||||
tree
|
tree
|
||||||
lazygit
|
lazygit
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
|
|
|
@ -10,28 +10,36 @@
|
||||||
systemd.network = {
|
systemd.network = {
|
||||||
enable = true;
|
enable = true;
|
||||||
networks = {
|
networks = {
|
||||||
"uplink" = {
|
# "uplink" = {
|
||||||
name = "wlp0s20f3";
|
# name = "wlp0s20f3";
|
||||||
DHCP = "ipv4";
|
# DHCP = "ipv4";
|
||||||
networkConfig.IPMasquerade = "ipv4";
|
# networkConfig.IPMasquerade = "ipv4";
|
||||||
};
|
# };
|
||||||
"10-enp2s0" = {
|
"10-enp2s0" = {
|
||||||
name = "enp2s0";
|
name = "enp2s0";
|
||||||
address = [ "192.168.2.1/24" ];
|
address = [ "192.168.2.1/24" ];
|
||||||
networkConfig.DHCPServer = "yes";
|
networkConfig.DHCPServer = "yes";
|
||||||
# dhcpServerConfig = {
|
dhcpServerConfig = {
|
||||||
# PoolOffset = 100;
|
PoolOffset = 100;
|
||||||
# PoolSize = 100;
|
PoolSize = 100;
|
||||||
# BootServerAddress = "192.168.222.1";
|
};
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.nat = {
|
networking = {
|
||||||
|
nftables = {
|
||||||
enable = true;
|
enable = true;
|
||||||
internalInterfaces = [ "enp2s0" ];
|
tables.nat = {
|
||||||
externalInterface = "wlp0s20f3";
|
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;
|
sources = import ./npins;
|
||||||
pkgs = import sources.nixpkgs { };
|
pkgs = import sources.nixpkgs { };
|
||||||
in
|
in
|
||||||
pkgs.mkShell { packages = with pkgs; [ npins ]; }
|
pkgs.mkShell { packages = with pkgs; [ npins colmena ]; }
|
||||||
|
|
Loading…
Reference in a new issue