diff options
Diffstat (limited to 'nixos/modules/system/boot/systemd.nix')
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 826368e711a..211e0423216 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -179,8 +179,9 @@ let ]; makeJobScript = name: text: - let x = pkgs.writeTextFile { name = "unit-script"; executable = true; destination = "/bin/${shellEscape name}"; inherit text; }; - in "${x}/bin/${shellEscape name}"; + let mkScriptName = s: (replaceChars [ "\\" ] [ "-" ] (shellEscape s) ); + x = pkgs.writeTextFile { name = "unit-script"; executable = true; destination = "/bin/${mkScriptName name}"; inherit text; }; + in "${x}/bin/${mkScriptName name}"; unitConfig = { name, config, ... }: { config = { @@ -373,6 +374,7 @@ in systemd.package = mkOption { default = pkgs.systemd; + defaultText = "pkgs.systemd"; type = types.package; description = "The systemd package."; }; |