summary refs log tree commit diff
path: root/nixos/modules/system/boot/networkd.nix
diff options
context:
space:
mode:
authorDustin Frisch <fooker@lab.sh>2019-11-05 23:22:03 +0100
committerLassulus <github@lassul.us>2019-11-19 22:13:17 +0100
commit943508a7fa95ce6aa8f14a9a717881e436b3816e (patch)
treea1a4a327bbe8dc32b35f116282856da074ff3b7b /nixos/modules/system/boot/networkd.nix
parent3de2aeb519b931c389e1ea232c9346f5d923bb66 (diff)
downloadnixpkgs-943508a7fa95ce6aa8f14a9a717881e436b3816e.tar
nixpkgs-943508a7fa95ce6aa8f14a9a717881e436b3816e.tar.gz
nixpkgs-943508a7fa95ce6aa8f14a9a717881e436b3816e.tar.bz2
nixpkgs-943508a7fa95ce6aa8f14a9a717881e436b3816e.tar.lz
nixpkgs-943508a7fa95ce6aa8f14a9a717881e436b3816e.tar.xz
nixpkgs-943508a7fa95ce6aa8f14a9a717881e436b3816e.tar.zst
nixpkgs-943508a7fa95ce6aa8f14a9a717881e436b3816e.zip
nixos/networkd: add `Name` as valid option to `Link`
This has been there since v209 [1]

```
The interface name to use. This option has lower precedence than NamePolicy=, so for this setting to take effect, NamePolicy= must either be unset, empty, disabled, or all policies configured there must fail. Also see the example below with "Name=dmz0".

Note that specifying a name that the kernel might use for another interface (for example "eth0") is dangerous because the name assignment done by udev will race with the assignment done by the kernel, and only one interface may use the name. Depending on the order of operations, either udev or the kernel will win, making the naming unpredictable. It is best to use some different prefix, for example "internal0"/"external0" or "lan0"/"lan1"/"lan3".
```

[1] https://github.com/systemd/systemd/commit/43b3a5ef61859f06cdbaf26765cab8e1adac4296
Diffstat (limited to 'nixos/modules/system/boot/networkd.nix')
-rw-r--r--nixos/modules/system/boot/networkd.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix
index 85a106527fe..c091d863034 100644
--- a/nixos/modules/system/boot/networkd.nix
+++ b/nixos/modules/system/boot/networkd.nix
@@ -10,7 +10,7 @@ let
 
   checkLink = checkUnitConfig "Link" [
     (assertOnlyFields [
-      "Description" "Alias" "MACAddressPolicy" "MACAddress" "NamePolicy" "OriginalName"
+      "Description" "Alias" "MACAddressPolicy" "MACAddress" "NamePolicy" "Name" "OriginalName"
       "MTUBytes" "BitsPerSecond" "Duplex" "AutoNegotiation" "WakeOnLan" "Port"
       "TCPSegmentationOffload" "TCP6SegmentationOffload" "GenericSegmentationOffload"
       "GenericReceiveOffload" "LargeReceiveOffload" "RxChannels" "TxChannels"