From fde313902ff035649e34924abef80470ffe7cd1b Mon Sep 17 00:00:00 2001 From: Daniel Barter Date: Wed, 26 Oct 2022 21:53:32 -0700 Subject: [PATCH] networkd: allow setting RouteMetric in Address section of a network config file --- nixos/modules/system/boot/networkd.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index a9b81dd116bb..28abf820ec09 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -584,6 +584,7 @@ let "Label" "PreferredLifetime" "Scope" + "RouteMetric" "HomeAddress" "DuplicateAddressDetection" "ManageTemporaryAddress" @@ -592,6 +593,7 @@ let ]) (assertHasField "Address") (assertValueOneOf "PreferredLifetime" ["forever" "infinity" "0" 0]) + (assertInt "RouteMetric") (assertValueOneOf "HomeAddress" boolValues) (assertValueOneOf "DuplicateAddressDetection" ["ipv4" "ipv6" "both" "none"]) (assertValueOneOf "ManageTemporaryAddress" boolValues)