forked from mirrors/nixpkgs
systemd: improve unit script drv naming
Also store scripts directly in the nix store rather than having the superfluous /bin/ tree.
This commit is contained in:
parent
bfa01320ee
commit
adba92b5ef
|
@ -189,9 +189,8 @@ let
|
|||
];
|
||||
|
||||
makeJobScript = name: text:
|
||||
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}";
|
||||
let mkScriptName = s: "unit-script-" + (replaceChars [ "\\" "@" ] [ "-" "_" ] (shellEscape s) );
|
||||
in pkgs.writeTextFile { name = mkScriptName name; executable = true; inherit text; };
|
||||
|
||||
unitConfig = { config, ... }: {
|
||||
config = {
|
||||
|
|
Loading…
Reference in a new issue