# Tip: names that can be given using ID_NET_NAME_* envvars
# can be checked before hand with:
# udevadm test-builtin net_id /sys/class/net/*
-
-{ pkgs, lib, config, ... }:
-let udevNetSetupLinkRules = pkgs.writeTextDir "etc/udev/rules.d/79-net-setup-link.rules" ''
+{ pkgs, ... }:
+let
+ udevNetSetupLinkRules = pkgs.writeTextDir "etc/udev/rules.d/79-net-setup-link.rules" ''
SUBSYSTEM!="net", GOTO="net_setup_link_end"
IMPORT{builtin}="path_id"
/* Useless block, only here for explanations.
- # NixOS put this .link only in the root filesystem, not in the initrd
- # hence it's only active in stage-2, not stage-1.
- # And even in stage-2, the 80-net-setup-link.rules has priority.
- # DOC: https://www.freedesktop.org/software/systemd/man/systemd.link.html
- environment.etc."systemd/network/79-net-setup.link".text = ''
+ # NixOS put this .link only in the root filesystem, not in the initrd
+ # hence it's only active in stage-2, not stage-1.
+ # And even in stage-2, the 80-net-setup-link.rules has priority.
+ # DOC: https://www.freedesktop.org/software/systemd/man/systemd.link.html
+ environment.etc."systemd/network/79-net-setup.link".text = ''
[Match]
OriginalName=*
#NamePolicy=keep kernel database onboard slot path
NamePolicy=mac
MACAddressPolicy=persistent
- '';
+ '';
*/
}