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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue