From e2b96c6c4e833d57023b08a3fd0cc5dccd84b9a2 Mon Sep 17 00:00:00 2001 From: nikstur Date: Tue, 17 Feb 2026 23:03:11 +0100 Subject: [PATCH] nixos/systemd: re-add openssh to manager PATH Otherwise systemd-ssh-generator doesn't work. This can only be removed once 0013-inherit-systemd-environment-when-calling-generators.patch is dropped. --- nixos/modules/system/boot/systemd.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 467a5d04516f..4b7bb1271392 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -713,7 +713,12 @@ in systemd.managerEnvironment = { # Doesn't contain systemd itself - everything works so it seems to use the compiled-in value for its tools # util-linux is needed for the main fsck utility wrapping the fs-specific ones - PATH = lib.makeBinPath (config.system.fsPackages ++ [ cfg.package.util-linux ]); + PATH = lib.makeBinPath ( + config.system.fsPackages + ++ [ cfg.package.util-linux ] + # systemd-ssh-generator needs sshd in PATH + ++ lib.optional config.services.openssh.enable config.services.openssh.package + ); 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