Add a few Windows settings #10

Merged
sb10q merged 1 commits from astro/wfvm:settings into master 2024-08-17 17:37:23 +08:00
2 changed files with 16 additions and 1 deletions
Showing only changes of commit 4771cee64b - Show all commits

View File

@ -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
]; ];

View File

@ -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;
};
} }