nixos: Fix fsck with systemd 251.6 and later

Version 251.6 of systemd introduced a small change[1] that now checks
whether the fsck command is available in *addition* to the filesystem
specific fsck.$fsname executable.

When bumping systemd to version 251.7 on our side[2], we introduced that
change. This subsequently caused our "fsck" test to fail and it looks
like this was an oversight during the pull request[3] introducing the
bump.

Since the fsck wrapper binary is in util-linux, I decided to address
this by adding util-linux to fsPackages because util-linux is already
part of the closure of any NixOS system so the impact should be pretty
low.

[1]: 73db7d9932
[2]: 844a08cc06
[3]: https://github.com/NixOS/nixpkgs/pull/199618

Signed-off-by: aszlig <aszlig@nix.build>
This commit is contained in:
aszlig 2022-11-15 02:02:17 +01:00
parent 84ead61b7a
commit d9b1bde390
No known key found for this signature in database
GPG Key ID: 684089CE67EBB691

View File

@ -300,7 +300,11 @@ in
boot.supportedFilesystems = map (fs: fs.fsType) fileSystems;
# Add the mount helpers to the system path so that `mount' can find them.
system.fsPackages = [ pkgs.dosfstools ];
system.fsPackages = [
pkgs.dosfstools
# This is needed for the main fsck utility wrapping the fs-specific ones.
pkgs.util-linux
];
environment.systemPackages = with pkgs; [ fuse3 fuse ] ++ config.system.fsPackages;