From 9a921433378a5c57091e4370e87486dc283def27 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 24 May 2023 21:28:15 +0200 Subject: [PATCH] autounattend: disable forced password expiry in autounattended install stage already --- wfvm/autounattend.nix | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/wfvm/autounattend.nix b/wfvm/autounattend.nix index c3f6277..1f14b10 100644 --- a/wfvm/autounattend.nix +++ b/wfvm/autounattend.nix @@ -58,18 +58,16 @@ let assertCommand = c: builtins.typeOf c == "string" || builtins.typeOf c == "set" && builtins.hasAttr "Path" c && builtins.hasAttr "Description" c; commands = builtins.map (x: assert assertCommand x; if builtins.typeOf x == "string" then { Path = x; Description = x; } else x) ( - [ - { - Path = "powershell.exe Set-ExecutionPolicy -Force Unrestricted"; - Description = "Allow unsigned powershell scripts."; - } - ] - ++ [ - { - Path = ''powershell.exe ${driveLetter}\win-bundle-installer.exe''; - Description = "Install any declared packages."; - } - ] + [ { + Path = "powershell.exe Set-ExecutionPolicy -Force Unrestricted"; + Description = "Allow unsigned powershell scripts."; + } { + Path = ''powershell.exe ${driveLetter}\win-bundle-installer.exe''; + Description = "Install any declared packages."; + } { + Path = "net accounts /maxpwage:unlimited"; + Description = "Disable forced password expiry."; + } ] ++ setupCommands ++ [ {