feat(hosts/potksed): add temporary host for my desktop

This commit is contained in:
oddlama 2023-09-04 16:19:55 +02:00
parent 9a1a7be247
commit cc3463b8f7
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
7 changed files with 144 additions and 0 deletions

44
hosts/potksed/net.nix Normal file
View file

@ -0,0 +1,44 @@
{
config,
lib,
...
}: {
networking = {
inherit (config.repo.secrets.local.networking) hostId;
wireless.iwd.enable = true;
};
boot.initrd.systemd.network = {
enable = true;
networks = {inherit (config.systemd.network.networks) "10-lan1";};
};
systemd.network.networks = {
"10-lan1" = {
DHCP = "yes";
matchConfig.MACAddress = config.repo.secrets.local.networking.interfaces.lan1.mac;
networkConfig = {
IPv6PrivacyExtensions = "yes";
MulticastDNS = true;
};
dhcpV4Config.RouteMetric = 10;
dhcpV6Config.RouteMetric = 10;
};
"10-wlan1" = {
DHCP = "yes";
matchConfig.MACAddress = config.repo.secrets.local.networking.interfaces.wlan1.mac;
networkConfig = {
IPv6PrivacyExtensions = "yes";
MulticastDNS = true;
};
dhcpV4Config.RouteMetric = 40;
dhcpV6Config.RouteMetric = 40;
};
};
networking.nftables.firewall = {
zones = lib.mkForce {
untrusted.interfaces = ["lan1" "wlan1"];
};
};
}