Remove redundancies
This commit is contained in:
parent
690b33bd08
commit
467b2036a7
1 changed files with 19 additions and 18 deletions
|
@ -40,16 +40,17 @@
|
||||||
(item: { inherit (item) file value; }));
|
(item: { inherit (item) file value; }));
|
||||||
in
|
in
|
||||||
lib.mkForce (
|
lib.mkForce (
|
||||||
if (mergedSystem.mergedValue.vm.name == packageName)
|
with { inherit (mergedSystem.mergedValue) vm; };
|
||||||
|
if (vm.name == packageName)
|
||||||
then
|
then
|
||||||
mergedSystem.mergedValue.vm
|
vm
|
||||||
else
|
else
|
||||||
let
|
let
|
||||||
prefix = lib.concatStringsSep " " (lib.optional config.virtualisation.runAsRoot "sudo");
|
prefix = lib.concatStringsSep " " (lib.optional config.virtualisation.runAsRoot "sudo");
|
||||||
wrapped = pkgs.writeShellApplication {
|
wrapped = pkgs.writeShellApplication {
|
||||||
name = "run-${config.system.name}-vm";
|
name = "run-${config.system.name}-vm";
|
||||||
text = ''
|
text = ''
|
||||||
${prefix} ${mergedSystem.mergedValue.vm}/bin/run-${config.system.name}-vm
|
${prefix} ${vm}/bin/run-${config.system.name}-vm
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in a new issue