Don't depend on the text of disabled units

This prevents pulling in unnecessary dependencies.
This commit is contained in:
Eelco Dolstra 2014-03-12 18:40:28 +01:00
parent 207c881df9
commit f198c40608

View File

@ -11,14 +11,18 @@ let
systemd = cfg.package; systemd = cfg.package;
makeUnit = name: unit: makeUnit = name: unit:
pkgs.runCommand "unit" { preferLocalBuild = true; inherit (unit) text; } if unit.enable then
(if !unit.enable then '' pkgs.runCommand "unit" { preferLocalBuild = true; inherit (unit) text; }
mkdir -p $out ''
ln -s /dev/null $out/${name} mkdir -p $out
'' else '' echo -n "$text" > $out/${name}
mkdir -p $out ''
echo -n "$text" > $out/${name} else
''); pkgs.runCommand "unit" { preferLocalBuild = true; }
''
mkdir -p $out
ln -s /dev/null $out/${name}
'';
upstreamUnits = upstreamUnits =
[ # Targets. [ # Targets.