summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorWill Fancher <elvishjerricco@gmail.com>2022-11-15 17:50:20 -0500
committerWill Fancher <elvishjerricco@gmail.com>2022-11-15 17:54:32 -0500
commitb28ecff1e6ffc17c23314c528c77f082f2b88f4c (patch)
tree9e37f48d27db71ca4359713a443cf437a3cf1a19 /nixos
parentacecd1ec7bc009b644e9a6dc64d164583eb23860 (diff)
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
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/system/boot/systemd.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index d28e6ed0e2770..8f1086c9c539e 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