systemd: include name of the unit when generating nix store path

This commit is contained in:
Domen Kožar 2014-10-19 15:49:08 +02:00
parent 36b981933f
commit 0854836fd2

View File

@ -12,13 +12,13 @@ let
makeUnit = name: unit:
if unit.enable then
pkgs.runCommand "unit" { preferLocalBuild = true; inherit (unit) text; }
pkgs.runCommand "unit-${name}" { preferLocalBuild = true; inherit (unit) text; }
''
mkdir -p $out
echo -n "$text" > $out/${shellEscape name}
''
else
pkgs.runCommand "unit" { preferLocalBuild = true; }
pkgs.runCommand "unit-${name}-disabled" { preferLocalBuild = true; }
''
mkdir -p $out
ln -s /dev/null $out/${shellEscape name}