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.
This commit is contained in:
zzywysm 2023-11-14 15:37:50 -05:00
parent fc3626d3d3
commit 3f4c802d26
2 changed files with 2 additions and 2 deletions

View file

@ -74,7 +74,7 @@ in
config = mkIf cfg.enable {
boot.kernelModules = [ "autofs4" ];
boot.kernelModules = [ "autofs" ];
systemd.services.autofs =
{ description = "Automounts filesystems on demand";

View file

@ -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";