0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

Merge pull request #318604 from jmbaur/pref64-networkd

nixos/systemd-networkd: add PREF64 related options
This commit is contained in:
Florian Klink 2024-06-12 22:09:54 +03:00 committed by GitHub
commit eabd9c36d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 95 additions and 25 deletions

View file

@ -952,6 +952,7 @@ let
"UseGateway"
"UseRoutePrefix"
"Token"
"UsePREF64"
])
(assertValueOneOf "UseDNS" boolValues)
(assertValueOneOf "UseDomains" (boolValues ++ ["route"]))
@ -962,6 +963,7 @@ let
(assertValueOneOf "UseMTU" boolValues)
(assertValueOneOf "UseGateway" boolValues)
(assertValueOneOf "UseRoutePrefix" boolValues)
(assertValueOneOf "UsePREF64" boolValues)
];
sectionDHCPServer = checkUnitConfig "DHCPServer" [
@ -1033,6 +1035,14 @@ let
(assertValueOneOf "EmitDomains" boolValues)
];
sectionIPv6PREF64Prefix = checkUnitConfigWithLegacyKey "ipv6PREF64PrefixConfig" "IPv6PREF64Prefix" [
(assertOnlyFields [
"Prefix"
"LifetimeSec"
])
(assertInt "LifetimeSec")
];
sectionIPv6Prefix = checkUnitConfigWithLegacyKey "ipv6PrefixConfig" "IPv6Prefix" [
(assertOnlyFields [
"AddressAutoconfiguration"
@ -2013,6 +2023,16 @@ let
'';
};
ipv6PREF64Prefixes = mkOption {
default = [];
example = [ { Prefix = "64:ff9b::/96"; } ];
type = types.listOf (mkSubsectionType "ipv6PREF64PrefixConfig" check.network.sectionIPv6PREF64Prefix);
description = ''
A list of IPv6PREF64Prefix sections to be added to the unit. See
{manpage}`systemd.network(5)` for details.
'';
};
dhcpServerStaticLeases = mkOption {
default = [];
example = [ { MACAddress = "65:43:4a:5b:d8:5f"; Address = "192.168.1.42"; } ];