From acecd1ec7bc009b644e9a6dc64d164583eb23860 Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Tue, 15 Nov 2022 17:45:38 -0500 Subject: [PATCH 1/2] Revert "nixos: Fix fsck with systemd 251.6 and later" This reverts commit d9b1bde390eb133a3da66c8abd902ea2b754938c. --- nixos/modules/tasks/filesystems.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix index 97f02a8c963a..399ea9eabe08 100644 --- a/nixos/modules/tasks/filesystems.nix +++ b/nixos/modules/tasks/filesystems.nix @@ -300,11 +300,7 @@ 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 - # This is needed for the main fsck utility wrapping the fs-specific ones. - pkgs.util-linux - ]; + system.fsPackages = [ pkgs.dosfstools ]; environment.systemPackages = with pkgs; [ fuse3 fuse ] ++ config.system.fsPackages; From b28ecff1e6ffc17c23314c528c77f082f2b88f4c Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Tue, 15 Nov 2022 17:50:20 -0500 Subject: [PATCH 2/2] nixos: Add util-linux to systemd PATH to fix fsck with systemd 251.6 This is an alternative to the reverted d9b1bde390eb133a3da66c8abd902ea2b754938c, which broke systemd stage 1 --- nixos/modules/system/boot/systemd.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index d28e6ed0e277..8f1086c9c539 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -558,7 +558,8 @@ in # Environment of PID 1 systemd.managerEnvironment = { # Doesn't contain systemd itself - everything works so it seems to use the compiled-in value for its tools - PATH = lib.makeBinPath config.system.fsPackages; + # util-linux is needed for the main fsck utility wrapping the fs-specific ones + PATH = lib.makeBinPath (config.system.fsPackages ++ [cfg.package.util-linux]); LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive"; TZDIR = "/etc/zoneinfo"; # If SYSTEMD_UNIT_PATH ends with an empty component (":"), the usual unit load path will be appended to the contents of the variable