mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
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
1 changed files with 2 additions and 3 deletions
|
@ -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