forked from M-Labs/wfvm
layers: add collapseLayers
This commit is contained in:
parent
78c9363b64
commit
4771cee64b
|
@ -41,7 +41,11 @@ wfvm.makeWindowsImage {
|
||||||
if impureMode
|
if impureMode
|
||||||
then []
|
then []
|
||||||
else with wfvm.layers; [
|
else with wfvm.layers; [
|
||||||
disable-autosleep disable-autolock disable-firewall
|
(collapseLayers [
|
||||||
|
disable-autosleep
|
||||||
|
disable-autolock
|
||||||
|
disable-firewall
|
||||||
|
])
|
||||||
anaconda3 msys2 msvc msvc-ide-unbreak
|
anaconda3 msys2 msvc msvc-ide-unbreak
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -154,4 +154,15 @@ in
|
||||||
win-exec "reg add HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization /v NoLockScreen /t REG_DWORD /d 1"
|
win-exec "reg add HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Personalization /v NoLockScreen /t REG_DWORD /d 1"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Chain together layers that are quick to run so that the VM does
|
||||||
|
# not have to be started/shutdown for each.
|
||||||
|
collapseLayers = scripts: {
|
||||||
|
name = pkgs.lib.concatMapStringsSep "-" ({ name, ... }: name) scripts;
|
||||||
|
script = builtins.concatStringsSep "\n" (
|
||||||
|
map ({ script, ... }: script) scripts
|
||||||
|
);
|
||||||
|
buildInputs =
|
||||||
|
builtins.concatMap ({ buildInputs ? [], ... }: buildInputs) scripts;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue