refactor(access): network interface config

This commit is contained in:
arcnmx 2024-03-23 21:13:01 -07:00
parent ee3834d72a
commit f2fddc1001
42 changed files with 466 additions and 189 deletions

View file

@ -1,4 +1,7 @@
_: {
imports = [
./proxmox.nix
];
arch = "x86_64";
type = "NixOS";
modules = [

View file

@ -31,26 +31,6 @@
};
interfaces.eth1 = {};
};
systemd.network.networks.eth0 = {
name = "eth0";
matchConfig = {
MACAddress = "BC:24:11:C4:66:A9";
Type = "ether";
};
address = ["10.1.1.47/24"];
gateway = ["10.1.1.1"];
DHCP = "no";
};
systemd.network.networks.eth1 = {
name = "eth1";
matchConfig = {
MACAddress = "BC:24:11:C4:66:AA";
Type = "ether";
};
DHCP = "no";
slaac.enable = false;
mdns.enable = false;
};
sops.defaultSopsFile = ./secrets.yaml;

20
systems/aya/proxmox.nix Normal file
View file

@ -0,0 +1,20 @@
_: {
proxmox = {
vm.id = 105;
container = {
enable = true;
lxc.configJsonFile = ./lxc.json;
};
network.interfaces = {
net0 = {
macAddress = "BC:24:11:C4:66:A9";
address4 = "10.1.1.47/24";
address6 = "auto";
};
net1 = {
macAddress = "BC:24:11:C4:66:AA";
networkd.networkSettings.linkConfig.RequiredForOnline = false;
};
};
};
}

View file

@ -0,0 +1,15 @@
_: {
type = null;
proxmox = {
vm = {
id = 202;
enable = true;
};
network.interfaces = {
net0 = {
name = "ens18";
macAddress = "BC:24:11:3D:39:91";
};
};
};
}

View file

@ -1,3 +1,14 @@
_: {
type = null;
proxmox = {
vm = {
id = 203;
enable = true;
};
network.interfaces = {
net0 = {
macAddress = "BC:24:11:33:19:04";
};
};
};
}

View file

@ -1,4 +1,7 @@
_: {
imports = [
./proxmox.nix
];
arch = "x86_64";
type = "NixOS";
modules = [

View file

@ -292,17 +292,6 @@ in {
services.samba.openFirewall = true;
systemd.network.networks.eth0 = {
name = "eth0";
matchConfig = {
MACAddress = "BC:24:11:C4:66:A7";
Type = "ether";
};
address = ["10.1.1.41/24"];
gateway = ["10.1.1.1"];
DHCP = "no";
};
sops.defaultSopsFile = ./secrets.yaml;
system.stateVersion = "23.11";

View file

@ -0,0 +1,16 @@
_: {
proxmox = {
vm.id = 103;
container = {
enable = true;
lxc.configJsonFile = ./lxc.json;
};
network.interfaces = {
net0 = {
macAddress = "BC:24:11:C4:66:A7";
address4 = "10.1.1.41/24";
address6 = "auto";
};
};
};
}

View file

@ -1,4 +1,7 @@
_: {
imports = [
./proxmox.nix
];
arch = "x86_64";
type = "NixOS";
modules = [

View file

@ -38,16 +38,5 @@
sops.defaultSopsFile = ./secrets.yaml;
systemd.network.networks.eth0 = {
name = "eth0";
matchConfig = {
MACAddress = "BC:24:11:C4:66:AC";
Type = "ether";
};
address = ["10.1.1.48/24"];
gateway = ["10.1.1.1"];
DHCP = "no";
};
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,16 @@
_: {
proxmox = {
vm.id = 107;
container = {
enable = true;
lxc.configJsonFile = ./lxc.json;
};
network.interfaces = {
net0 = {
macAddress = "BC:24:11:C4:66:AC";
address4 = "10.1.1.48/24";
address6 = "auto";
};
};
};
}

View file

@ -4,4 +4,19 @@ _: {
modules = [
./nixos.nix
];
proxmox = {
vm = {
id = 201;
enable = true;
};
network.interfaces = {
net0 = {
mdns.enable = false;
name = "ens18";
macAddress = "BC:24:11:49:FE:DC";
address4 = "10.1.1.42/24";
address6 = "auto";
};
};
};
}

View file

@ -1,4 +1,7 @@
_: {
imports = [
./proxmox.nix
];
arch = "x86_64";
type = "NixOS";
modules = [

View file

@ -11,14 +11,5 @@
sops.defaultSopsFile = ./secrets.yaml;
systemd.network.networks.eth0 = {
name = "eth0";
matchConfig = {
MACAddress = "BC:24:11:C4:66:AB";
Type = "ether";
};
DHCP = "yes";
};
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,17 @@
_: {
proxmox = {
vm.id = 106;
container = {
enable = true;
lxc.configJsonFile = ./lxc.json;
};
network.interfaces = {
net0 = {
mdns.enable = true;
macAddress = "BC:24:11:C4:66:AB";
address4 = "auto";
address6 = "auto";
};
};
};
}

View file

@ -1,4 +1,7 @@
_: {
imports = [
./proxmox.nix
];
arch = "x86_64";
type = "NixOS";
modules = [

View file

@ -106,22 +106,6 @@ in {
unitConfig.RequiresMountsFor = mapAttrsToList (path: _: path) plexLibrary;
};
systemd.network.networks.eth0 = {
name = "eth0";
matchConfig = {
MACAddress = "BC:24:11:34:F4:A8";
Type = "ether";
};
address = ["10.1.1.44/24"];
gateway = ["10.1.1.1"];
DHCP = "no";
};
access.internal = {
enable = true;
macAddress = "BC:24:19:34:F4:A8";
vmid = 102;
};
sops.defaultSopsFile = ./secrets.yaml;
system.stateVersion = "21.05";

View file

@ -0,0 +1,17 @@
_: {
proxmox = {
vm.id = 102;
container = {
enable = true;
lxc.configJsonFile = ./lxc.json;
};
network.interfaces = {
net0 = {
macAddress = "BC:24:11:34:F4:A8";
address4 = "10.1.1.44/24";
address6 = "auto";
};
net1.internal.enable = true;
};
};
}

View file

@ -1,4 +1,7 @@
_: {
imports = [
./proxmox.nix
];
arch = "x86_64";
type = "NixOS";
modules = [

View file

@ -19,19 +19,6 @@
beatsaber.enable = false;
};
proxmoxLXC.privileged = true;
systemd.network.networks.eth0 = {
name = "eth0";
matchConfig = {
MACAddress = "BC:24:11:C4:66:A8";
Type = "ether";
};
address = ["10.1.1.45/24"];
gateway = ["10.1.1.1"];
DHCP = "no";
};
sops.defaultSopsFile = ./secrets.yaml;
system.stateVersion = "23.11";

17
systems/reimu/proxmox.nix Normal file
View file

@ -0,0 +1,17 @@
_: {
proxmox = {
vm.id = 104;
container = {
enable = true;
privileged = true;
lxc.configJsonFile = ./lxc.json;
};
network.interfaces = {
net0 = {
macAddress = "BC:24:11:C4:66:A8";
address4 = "10.1.1.45/24";
address6 = "auto";
};
};
};
}

View file

@ -1,4 +1,7 @@
_: {
imports = [
./proxmox.nix
];
arch = "x86_64";
type = "NixOS";
modules = [

View file

@ -51,16 +51,5 @@ in {
];
};
systemd.network.networks.eth0 = {
name = "eth0";
matchConfig = {
MACAddress = "BC:24:11:CC:66:57";
Type = "ether";
};
address = ["10.1.1.39/24"];
gateway = ["10.1.1.1"];
DHCP = "no";
};
system.stateVersion = "23.11";
}

16
systems/tei/proxmox.nix Normal file
View file

@ -0,0 +1,16 @@
_: {
proxmox = {
vm.id = 101;
container = {
enable = true;
lxc.configJsonFile = ./lxc.json;
};
network.interfaces = {
net0 = {
macAddress = "BC:24:11:CC:66:57";
address4 = "10.1.1.39/24";
address6 = "auto";
};
};
};
}

View file

@ -1,4 +1,7 @@
_: {
imports = [
./proxmox.nix
];
arch = "x86_64";
type = "NixOS";
modules = [

View file

@ -43,16 +43,5 @@ in {
sops.defaultSopsFile = ./secrets.yaml;
systemd.network.networks.eth0 = {
name = "eth0";
matchConfig = {
MACAddress = "BC:24:11:C4:66:A6";
Type = "ether";
};
address = ["10.1.1.38/24"];
gateway = ["10.1.1.1"];
DHCP = "no";
};
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,16 @@
_: {
proxmox = {
vm.id = 108;
container = {
enable = true;
lxc.configJsonFile = ./lxc.json;
};
network.interfaces = {
net0 = {
macAddress = "BC:24:11:C4:66:A6";
address4 = "10.1.1.38/24";
address6 = "auto";
};
};
};
}