mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
refactor(access): network interface config
This commit is contained in:
parent
ee3834d72a
commit
f2fddc1001
42 changed files with 466 additions and 189 deletions
|
|
@ -1,4 +1,7 @@
|
|||
_: {
|
||||
imports = [
|
||||
./proxmox.nix
|
||||
];
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
|
|
|
|||
|
|
@ -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
20
systems/aya/proxmox.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
15
systems/freeipa/default.nix
Normal file
15
systems/freeipa/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,3 +1,14 @@
|
|||
_: {
|
||||
type = null;
|
||||
proxmox = {
|
||||
vm = {
|
||||
id = 203;
|
||||
enable = true;
|
||||
};
|
||||
network.interfaces = {
|
||||
net0 = {
|
||||
macAddress = "BC:24:11:33:19:04";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
_: {
|
||||
imports = [
|
||||
./proxmox.nix
|
||||
];
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
16
systems/hakurei/proxmox.nix
Normal file
16
systems/hakurei/proxmox.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
_: {
|
||||
imports = [
|
||||
./proxmox.nix
|
||||
];
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
16
systems/keycloak/proxmox.nix
Normal file
16
systems/keycloak/proxmox.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
_: {
|
||||
imports = [
|
||||
./proxmox.nix
|
||||
];
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
17
systems/litterbox/proxmox.nix
Normal file
17
systems/litterbox/proxmox.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
_: {
|
||||
imports = [
|
||||
./proxmox.nix
|
||||
];
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
17
systems/mediabox/proxmox.nix
Normal file
17
systems/mediabox/proxmox.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
_: {
|
||||
imports = [
|
||||
./proxmox.nix
|
||||
];
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
|
|
|
|||
|
|
@ -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
17
systems/reimu/proxmox.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
_: {
|
||||
imports = [
|
||||
./proxmox.nix
|
||||
];
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
|
|
|
|||
|
|
@ -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
16
systems/tei/proxmox.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
_: {
|
||||
imports = [
|
||||
./proxmox.nix
|
||||
];
|
||||
arch = "x86_64";
|
||||
type = "NixOS";
|
||||
modules = [
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
16
systems/utsuho/proxmox.nix
Normal file
16
systems/utsuho/proxmox.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue