refactor: static networking

This commit is contained in:
arcnmx 2024-01-18 13:51:13 -08:00
parent 1a4b5ee8b2
commit 91d4895c6f
13 changed files with 155 additions and 16 deletions

View file

@ -31,6 +31,17 @@
};
};
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

@ -54,6 +54,15 @@
};
};
systemd.network.networks.eth0 = {
name = "eth0";
matchConfig = {
MACAddress = "BC:24:11:49:FE:DC";
Type = "ether";
};
DHCP = "ipv4";
};
sops.defaultSopsFile = ./secrets.yaml;
system.stateVersion = "23.11";

View file

@ -72,6 +72,15 @@
extraPackages = with pkgs; [ mesa.drivers vaapiVdpau libvdpau-va-gl ];
};
systemd.network.networks.eth0 = {
name = "eth0";
matchConfig = {
MACAddress = "BC:24:11:34:F4:A8";
Type = "ether";
};
DHCP = "ipv4";
};
sops.defaultSopsFile = ./secrets.yaml;
system.stateVersion = "21.05";

View file

@ -1,18 +1,15 @@
{
meta,
access,
config,
lib,
...
}: let
inherit (lib.modules) mkIf mkMerge;
inherit (lib.attrsets) listToAttrs nameValuePair;
inherit (access) systemFor;
inherit (config.networking) hostName;
cfg = config.services.cloudflared;
apartment = "5e85d878-c6b2-4b15-b803-9aeb63d63543";
systemFor = hostName:
if hostName == config.networking.hostName
then config
else meta.network.nodes.${hostName};
accessHostFor = {
hostName,
system ? systemFor hostName,

View file

@ -1,6 +1,5 @@
{
meta,
lib,
...
}: {
imports = let
@ -25,7 +24,17 @@
];
sops.defaultSopsFile = ./secrets.yaml;
networking.access.static.ipv4 = "10.1.1.39";
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";
}