diff --git a/modules/system/boot/systemd.nix b/modules/system/boot/systemd.nix index 215f625467a6..c958433ff452 100644 --- a/modules/system/boot/systemd.nix +++ b/modules/system/boot/systemd.nix @@ -226,7 +226,7 @@ let Environment=PATH=${def.path} Environment=LD_LIBRARY_PATH= ${let env = cfg.globalEnvironment // def.environment; - in concatMapStrings (n: "Environment=${n}=${getAttr n env}\n") (attrNames env)} + in concatMapStrings (n: "Environment=\"${n}=${getAttr n env}\"\n") (attrNames env)} ${optionalString (!def.restartIfChanged) "X-RestartIfChanged=false"} ${optionalString (!def.stopIfChanged) "X-StopIfChanged=false"}