Add basic networking
This commit is contained in:
parent
fb0d508a94
commit
99560ea408
2 changed files with 129 additions and 8 deletions
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
{config, ...}: {
|
||||
imports = [
|
||||
./disko.nix
|
||||
../../users/jalr
|
||||
|
|
@ -18,7 +14,75 @@
|
|||
|
||||
networking = {
|
||||
hostName = "pbx";
|
||||
useDHCP = lib.mkDefault true;
|
||||
useDHCP = false;
|
||||
vlans = {
|
||||
weinturm = {
|
||||
id = 7;
|
||||
interface = "enp0s25";
|
||||
};
|
||||
public-event = {
|
||||
id = 6;
|
||||
interface = "enp0s25";
|
||||
};
|
||||
voice = {
|
||||
id = 8;
|
||||
interface = "enp0s25";
|
||||
};
|
||||
jugendtreff = {
|
||||
id = 2;
|
||||
interface = "enp0s25";
|
||||
};
|
||||
};
|
||||
interfaces = {
|
||||
weinturm = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.96.1";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
public-event = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "10.10.0.1";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
voice = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.98.1";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
jugendtreff = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.100.11";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
nat = {
|
||||
enable = true;
|
||||
externalInterface = "jugendtreff";
|
||||
internalInterfaces = [
|
||||
"weinturm"
|
||||
"public-event"
|
||||
"voice"
|
||||
];
|
||||
};
|
||||
defaultGateway.address = "192.168.100.1";
|
||||
nameservers = [
|
||||
"9.9.9.9"
|
||||
"149.112.112.112"
|
||||
"2620:fe::fe"
|
||||
"2620:fe::9"
|
||||
];
|
||||
};
|
||||
|
||||
boot = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue