systemd: include name of the unit when generating nix store path
This commit is contained in:
parent
36b981933f
commit
0854836fd2
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue