diff options
author | Linus Heckemann <git@sphalerite.org> | 2018-08-07 09:00:52 +0200 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2018-08-08 14:29:41 +0200 |
commit | adba92b5ef37e2fb873c29a07d7760119c8701b7 (patch) | |
tree | e315ac2d32b54ed6716e6fdf9c10a2166dedf791 /nixos | |
parent | bfa01320ee8265ece404b715a8d148a89d33ec85 (diff) | |
download | nixlib-adba92b5ef37e2fb873c29a07d7760119c8701b7.tar nixlib-adba92b5ef37e2fb873c29a07d7760119c8701b7.tar.gz nixlib-adba92b5ef37e2fb873c29a07d7760119c8701b7.tar.bz2 nixlib-adba92b5ef37e2fb873c29a07d7760119c8701b7.tar.lz nixlib-adba92b5ef37e2fb873c29a07d7760119c8701b7.tar.xz nixlib-adba92b5ef37e2fb873c29a07d7760119c8701b7.tar.zst nixlib-adba92b5ef37e2fb873c29a07d7760119c8701b7.zip |
systemd: improve unit script drv naming
Also store scripts directly in the nix store rather than having the superfluous /bin/ tree.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 951da797fe5c..2d3d80a91bc6 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -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 = { |