mob next [ci-skip] [ci skip] [skip ci]

lastFile:machines/rigel/networking.nix
This commit is contained in:
2025-10-21 16:16:47 +07:00
parent 219027a0f1
commit 238f449a47

View File

@@ -1,5 +1,9 @@
{ lib, config, ... }:
let let
ata-interface = "enp2s0"; ata-interface = "enp2s0";
ipv6Subnet = lib.elemAt (lib.splitString "/" config.clan.core.vars.generators.yggdrasil.files.yggdrasil-subnet.value) 0;
ipv6Prefix = lib.elemAt (lib.splitString "/" config.clan.core.vars.generators.yggdrasil.files.yggdrasil-subnet.value) 1;
in in
{ {
# clan.core.vars.generators.networking.files.ata-interface.secret = false; # clan.core.vars.generators.networking.files.ata-interface.secret = false;
@@ -15,17 +19,14 @@ in
]; ];
ipv6.addresses = [ ipv6.addresses = [
{ {
address = "fdab:c002:36cb::1"; address = ipv6Subnet + "1";
prefixLength = 64; prefixLength = lib.toInt ipv6Prefix;
} }
]; ];
ipv6.routes = [ ipv6.routes = [
{ {
address = "fdab:c002:36cb::"; address = ipv6Subnet;
prefixLength = 64; prefixLength = lib.toInt ipv6Prefix;
}
{
address = "";
} }
]; ];
}; };
@@ -45,7 +46,7 @@ in
domain = "localhost"; domain = "localhost";
dhcp-range = [ dhcp-range = [
"192.168.254.10,192.168.254.240,255.255.255.0,24h" "192.168.254.10,192.168.254.240,255.255.255.0,24h"
"fdab:c002:36cb::10,fdab:c002:36cb::240,slaac" "${ipv6Subnet}10,${ipv6Subnet}240,slaac"
]; ];
dhcp-option = [ dhcp-option = [
"3,192.168.254.1" "3,192.168.254.1"