Merge pull request #242191 from tie/systemd-required-for-online-range

authored by

Ryan Lahfa and committed by
GitHub
3c3ef901 7eddaf49

+18 -11
+18 -11
nixos/modules/system/boot/networkd.nix
··· 517 517 (assertValueOneOf "Unmanaged" boolValues) 518 518 (assertInt "Group") 519 519 (assertRange "Group" 0 2147483647) 520 - (assertValueOneOf "RequiredForOnline" (boolValues ++ [ 521 - "missing" 522 - "off" 523 - "no-carrier" 524 - "dormant" 525 - "degraded-carrier" 526 - "carrier" 527 - "degraded" 528 - "enslaved" 529 - "routable" 530 - ])) 520 + (assertValueOneOf "RequiredForOnline" (boolValues ++ ( 521 + let 522 + # https://freedesktop.org/software/systemd/man/networkctl.html#missing 523 + operationalStates = [ 524 + "missing" 525 + "off" 526 + "no-carrier" 527 + "dormant" 528 + "degraded-carrier" 529 + "carrier" 530 + "degraded" 531 + "enslaved" 532 + "routable" 533 + ]; 534 + operationalStateRanges = concatLists (imap0 (i: min: map (max: "${min}:${max}") (drop i operationalStates)) operationalStates); 535 + in 536 + operationalStates ++ operationalStateRanges 537 + ))) 531 538 (assertValueOneOf "RequiredFamilyForOnline" [ 532 539 "ipv4" 533 540 "ipv6"