summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorTino Breddin <tino@daogames.com>2014-11-30 10:37:18 +0100
committerTino Breddin <tino@daogames.com>2014-12-01 09:32:41 +0100
commitd0327c052cb7c5c685bb392e658e25e918fca535 (patch)
treeb974cd7f08de6f5cebe64b68ac48a0fa833b90eb /nixos/modules
parent48c483a894869424a0c559ab1e67ce1d1842acf3 (diff)
downloadnixlib-d0327c052cb7c5c685bb392e658e25e918fca535.tar
nixlib-d0327c052cb7c5c685bb392e658e25e918fca535.tar.gz
nixlib-d0327c052cb7c5c685bb392e658e25e918fca535.tar.bz2
nixlib-d0327c052cb7c5c685bb392e658e25e918fca535.tar.lz
nixlib-d0327c052cb7c5c685bb392e658e25e918fca535.tar.xz
nixlib-d0327c052cb7c5c685bb392e658e25e918fca535.tar.zst
nixlib-d0327c052cb7c5c685bb392e658e25e918fca535.zip
Fix filename for udev network interface rules
From http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

You disable the assignment of fixed names, so that the unpredictable
kernel names are used again. For this, simply mask udev's rule file for
the default policy: ln -s /dev/null
/etc/udev/rules.d/80-net-setup-link.rules (since v209: this file was
called 80-net-name-slot.rules in release v197 through v208)
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/hardware/80-net-setup-link.rules (renamed from nixos/modules/services/hardware/80-net-name-slot.rules)0
-rw-r--r--nixos/modules/services/hardware/udev.nix4
2 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/hardware/80-net-name-slot.rules b/nixos/modules/services/hardware/80-net-setup-link.rules
index 18547f170a3f..18547f170a3f 100644
--- a/nixos/modules/services/hardware/80-net-name-slot.rules
+++ b/nixos/modules/services/hardware/80-net-setup-link.rules
diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix
index 2a6f4cfb4e37..c9e3b8a855a6 100644
--- a/nixos/modules/services/hardware/udev.nix
+++ b/nixos/modules/services/hardware/udev.nix
@@ -87,8 +87,8 @@ let
         grep -l '\(RUN+\|IMPORT{program}\)="\(/usr\)\?/s\?bin' $i/*/udev/rules.d/* || true
       done
 
-      ${optionalString config.networking.usePredictableInterfaceNames ''
-        cp ${./80-net-name-slot.rules} $out/80-net-name-slot.rules
+      ${optionalString (! config.networking.usePredictableInterfaceNames) ''
+        cp ${./80-net-setup-link.rules} $out/80-net-setup-link.rules
       ''}
 
       # If auto-configuration is disabled, then remove