summary refs log tree commit diff
diff options
context:
space:
mode:
authorzzywysm <51676322+zzywysm@users.noreply.github.com>2023-11-14 15:37:50 -0500
committerzzywysm <51676322+zzywysm@users.noreply.github.com>2023-11-14 15:37:50 -0500
commit3f4c802d263989eb0a0327243a100ad3643be98e (patch)
tree7cf828a05ac13341551f0a23b6f4f3f0aa14117c
parentfc3626d3d3c46611e5fc802cc3c425bfce789b45 (diff)
downloadnixpkgs-3f4c802d263989eb0a0327243a100ad3643be98e.tar
nixpkgs-3f4c802d263989eb0a0327243a100ad3643be98e.tar.gz
nixpkgs-3f4c802d263989eb0a0327243a100ad3643be98e.tar.bz2
nixpkgs-3f4c802d263989eb0a0327243a100ad3643be98e.tar.lz
nixpkgs-3f4c802d263989eb0a0327243a100ad3643be98e.tar.xz
nixpkgs-3f4c802d263989eb0a0327243a100ad3643be98e.tar.zst
nixpkgs-3f4c802d263989eb0a0327243a100ad3643be98e.zip
initrd/autofs4: remove legacy references to autofs4 kernel module
Back in 2018, the kernel decided to remove the autofs4 module.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a2225d931f75ddd3c39f4d0d195fad99dfd68671

This caused immediate problems with systemd, so the kernel allowed autofs4 as a config option that would simply map back to autofs.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d02d21ea007b6b33cdaf15c2f84fb1fea996ecc2

Earlier this year, in July 2023, the kernel got tired of people not adapting to the autofs change, and forced the issue by fixing it within the kernel defconfigs, which NixOS uses as a starting point for their own kernel configs.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1f2190d6b7112d22d3f8dfeca16a2f6a2f51444e

This commit reflects the post-2018 reality by changing the remaining autofs4 references to autofs. Since this change initially happened in kernel 4.18 and we no longer support 4.x kernels, we don't need any backwards-compatibility tweaks.
-rw-r--r--nixos/modules/services/misc/autofs.nix2
-rw-r--r--nixos/modules/system/boot/systemd/initrd.nix2
2 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/misc/autofs.nix b/nixos/modules/services/misc/autofs.nix
index 55ab15ff003..723b67e8bb6 100644
--- a/nixos/modules/services/misc/autofs.nix
+++ b/nixos/modules/services/misc/autofs.nix
@@ -74,7 +74,7 @@ in
 
   config = mkIf cfg.enable {
 
-    boot.kernelModules = [ "autofs4" ];
+    boot.kernelModules = [ "autofs" ];
 
     systemd.services.autofs =
       { description = "Automounts filesystems on demand";
diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix
index e223451652b..0e7d59b3207 100644
--- a/nixos/modules/system/boot/systemd/initrd.nix
+++ b/nixos/modules/system/boot/systemd/initrd.nix
@@ -370,7 +370,7 @@ in {
 
     boot.initrd.availableKernelModules = [
       # systemd needs this for some features
-      "autofs4"
+      "autofs"
       # systemd-cryptenroll
     ] ++ lib.optional cfg.enableTpm2 "tpm-tis"
     ++ lib.optional (cfg.enableTpm2 && !(pkgs.stdenv.hostPlatform.isRiscV64 || pkgs.stdenv.hostPlatform.isArmv7)) "tpm-crb";