lan: new lan for essen
This commit is contained in:
parent
308ba8463b
commit
df06d3225d
4 changed files with 54 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./tinc.nix
|
./tinc.nix
|
||||||
./wifi-access-point.nix
|
./wifi-access-point.nix
|
||||||
|
./lan.nix
|
||||||
./dms.nix
|
./dms.nix
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
26
configs/pepe/lan.nix
Normal file
26
configs/pepe/lan.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
|
||||||
|
interface = "enp0s25";
|
||||||
|
ipAddress = "10.1.0.2";
|
||||||
|
prefixLength = 24;
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
networking.extraHosts = ''
|
||||||
|
10.1.0.1 workout.lan
|
||||||
|
10.1.0.2 pepe.lan
|
||||||
|
'';
|
||||||
|
|
||||||
|
# todo only open needed ports
|
||||||
|
networking.firewall.trustedInterfaces = [ interface ];
|
||||||
|
|
||||||
|
networking.networkmanager.unmanaged = [ interface ];
|
||||||
|
networking.dhcpcd.denyInterfaces = [ interface ];
|
||||||
|
|
||||||
|
networking.interfaces."${interface}".ipv4.addresses = [{
|
||||||
|
address = ipAddress;
|
||||||
|
prefixLength = prefixLength;
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
|
@ -9,7 +9,7 @@
|
||||||
#./slack.nix
|
#./slack.nix
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./tinc.nix
|
./tinc.nix
|
||||||
|
./lan.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "workout";
|
networking.hostName = "workout";
|
||||||
|
|
26
configs/workout/lan.nix
Normal file
26
configs/workout/lan.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
|
||||||
|
interface = "eno1";
|
||||||
|
ipAddress = "10.1.0.1";
|
||||||
|
prefixLength = 24;
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
networking.extraHosts = ''
|
||||||
|
10.1.0.1 workout.lan
|
||||||
|
10.1.0.2 pepe.lan
|
||||||
|
'';
|
||||||
|
|
||||||
|
# todo only open needed ports
|
||||||
|
networking.firewall.trustedInterfaces = [ interface ];
|
||||||
|
|
||||||
|
networking.networkmanager.unmanaged = [ interface ];
|
||||||
|
networking.dhcpcd.denyInterfaces = [ interface ];
|
||||||
|
|
||||||
|
networking.interfaces."${interface}".ipv4.addresses = [{
|
||||||
|
address = ipAddress;
|
||||||
|
prefixLength = prefixLength;
|
||||||
|
}];
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue