nixos/sysctl: rename /etc/sysctl.d/nixos.conf -> 60-nixos.conf
sysctl.d(5) recommends prefixing all filenames in /etc/sysctl.d with a two-digit number and a dash, to simplify the ordering of the files. Some packages provide custom files, often with "50-" prefix. To ensure user-supplied configuration takes precedence over the one specified via `boot.kernel.sysctl`, prefix the file generated there with "60-".
This commit is contained in:
@@ -42,14 +42,14 @@ in
|
||||
|
||||
config = {
|
||||
|
||||
environment.etc."sysctl.d/nixos.conf".text =
|
||||
environment.etc."sysctl.d/60-nixos.conf".text =
|
||||
concatStrings (mapAttrsToList (n: v:
|
||||
optionalString (v != null) "${n}=${if v == false then "0" else toString v}\n"
|
||||
) config.boot.kernel.sysctl);
|
||||
|
||||
systemd.services.systemd-sysctl =
|
||||
{ wantedBy = [ "multi-user.target" ];
|
||||
restartTriggers = [ config.environment.etc."sysctl.d/nixos.conf".source ];
|
||||
restartTriggers = [ config.environment.etc."sysctl.d/60-nixos.conf".source ];
|
||||
};
|
||||
|
||||
# Enable hardlink and symlink restrictions. See
|
||||
|
||||
Reference in New Issue
Block a user