about summary refs log tree commit diff
path: root/nixos/modules/config
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2019-08-11 15:38:20 +0200
committerFlorian Klink <flokli@flokli.de>2019-08-18 17:54:26 +0200
commite5965bd4897310d1f99ad75f51ef99f1f0e2c274 (patch)
tree7270d85480d911fef9f6c5ea8e548a79a3f9b9d1 /nixos/modules/config
parent368be910fca1866635a6e452f5d19553e49fab6c (diff)
downloadnixlib-e5965bd4897310d1f99ad75f51ef99f1f0e2c274.tar
nixlib-e5965bd4897310d1f99ad75f51ef99f1f0e2c274.tar.gz
nixlib-e5965bd4897310d1f99ad75f51ef99f1f0e2c274.tar.bz2
nixlib-e5965bd4897310d1f99ad75f51ef99f1f0e2c274.tar.lz
nixlib-e5965bd4897310d1f99ad75f51ef99f1f0e2c274.tar.xz
nixlib-e5965bd4897310d1f99ad75f51ef99f1f0e2c274.tar.zst
nixlib-e5965bd4897310d1f99ad75f51ef99f1f0e2c274.zip
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-".
Diffstat (limited to 'nixos/modules/config')
-rw-r--r--nixos/modules/config/sysctl.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/config/sysctl.nix b/nixos/modules/config/sysctl.nix
index 0c6a7e2431aa..112e5e744d4c 100644
--- a/nixos/modules/config/sysctl.nix
+++ b/nixos/modules/config/sysctl.nix
@@ -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