udev service: make local rules apply after all others

This commit is contained in:
Nikolay Amiantov 2016-02-17 04:55:26 +03:00
parent 885acea1dd
commit 32df5ed4c2
2 changed files with 11 additions and 4 deletions

View File

@ -172,6 +172,13 @@ fileSystems."/example" = {
</para>
</listitem>
<listitem>
<para><literal>services.udev.extraRules</literal> option now writes rules
to <filename>99-local.rules</filename> instead of <filename>10-local.rules</filename>.
This makes all the user rules apply after others, so their results wouldn't be
overriden by anything else.</para>
</listitem>
</itemizedlist>

View File

@ -13,13 +13,13 @@ let
extraUdevRules = pkgs.writeTextFile {
name = "extra-udev-rules";
text = cfg.extraRules;
destination = "/etc/udev/rules.d/10-local.rules";
destination = "/etc/udev/rules.d/99-local.rules";
};
extraHwdbFile = pkgs.writeTextFile {
name = "extra-hwdb-file";
text = cfg.extraHwdb;
destination = "/etc/udev/hwdb.d/10-local.hwdb";
destination = "/etc/udev/hwdb.d/99-local.hwdb";
};
nixosRules = ''
@ -212,8 +212,8 @@ in
type = types.lines;
description = ''
Additional <command>udev</command> rules. They'll be written
into file <filename>10-local.rules</filename>. Thus they are
read before all other rules.
into file <filename>99-local.rules</filename>. Thus they are
read and applied after all other rules.
'';
};