diff --git a/nixos/lib/systemd-lib.nix b/nixos/lib/systemd-lib.nix index fdf5525c5385..b8848f56a6c0 100644 --- a/nixos/lib/systemd-lib.nix +++ b/nixos/lib/systemd-lib.nix @@ -579,7 +579,8 @@ in rec { '' else "") + optionalString (def ? stopIfChanged && !def.stopIfChanged) '' X-StopIfChanged=false - '' + optionalString (def ? notSocketActivated && def.notSocketActivated) '' + '' + + optionalString (def ? notSocketActivated && def.notSocketActivated) '' X-NotSocketActivated=true '' + attrsToSection def.serviceConfig); }; diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index 1ea001fcc26a..f46c845c0848 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -434,10 +434,9 @@ in ''; systemd.services.systemd-udevd = { - restartTriggers = [ config.environment.etc."udev/rules.d".source ]; - notSocketActivated = true; - }; - + restartTriggers = [ config.environment.etc."udev/rules.d".source ]; + notSocketActivated = true; + }; }; imports = [