Skip to content

Commit

Permalink
nixos/udev: switch networking.usePredicatableInterfaceNames to a ke…
Browse files Browse the repository at this point in the history
…rnel param

The udev rules we are shipping no longer work with systemd v242 and were
remove upstream some time ago. It seems like the entire renaming is now
done in C and not in the udev rules.
  • Loading branch information
andir committed Jun 3, 2019
1 parent 8c7e588 commit 1f03f6f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
13 changes: 0 additions & 13 deletions nixos/modules/services/hardware/80-net-setup-link.rules

This file was deleted.

6 changes: 2 additions & 4 deletions nixos/modules/services/hardware/udev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ let
exit 1
fi
${optionalString config.networking.usePredictableInterfaceNames ''
cp ${./80-net-setup-link.rules} $out/80-net-setup-link.rules
''}
# If auto-configuration is disabled, then remove
# udev's 80-drivers.rules file, which contains rules for
# automatically calling modprobe.
Expand Down Expand Up @@ -282,6 +278,8 @@ in

services.udev.path = [ pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.utillinux udev ];

boot.kernelParams = mkIf (!config.networking.usePredictableInterfaceNames) [ "net.ifnames=0" ];

environment.etc =
[ { source = udevRules;
target = "udev/rules.d";
Expand Down

1 comment on commit 1f03f6f

@nixos-discourse
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/predictable-network-interface-names-in-initrd/4055/1

Please sign in to comment.