diff --git a/artiq-fast/windows/autounattend.nix b/artiq-fast/windows/autounattend.nix index 6bcdfad..5c360cc 100644 --- a/artiq-fast/windows/autounattend.nix +++ b/artiq-fast/windows/autounattend.nix @@ -13,7 +13,6 @@ , setupCommands ? [] , timeZone ? "UTC" , services ? {} -, impureMode ? false , impureShellCommands ? [] , ... }: @@ -42,11 +41,11 @@ let in makeDirs ++ writeKeys ++ [ # TODO: Figure out how to do this step with sandboxing enabled { - Path = "powershell.exe Install-PackageProvider -Name nuget -MinimumVersion 2.8.5.201 -Force"; - Description = "Install Nuget (require to pull in openssh)."; + Path = ''Register-PSRepository -Name "bootstraprepo" -SourceLocation F:\files''; + Description = "Local powershell repo import"; } { - Path = "powershell.exe Install-Module -Force OpenSSHUtils -Scope AllUsers"; + Path = ''powershell.exe Install-Module -Repository ""bootstraprepo" -Force OpenSSHUtils -Scope AllUsers''; Description = "Install Openssh."; } { @@ -64,16 +63,16 @@ let Description = "Allow unsigned powershell scripts."; } ] - ++ setupCommands - ++ impureSetupCommands - ++ serviceCommands - ++ impureShellCommands ++ [ { Path = ''powershell.exe F:\win-bundle-installer.exe''; Description = "Install any declared packages."; } ] + ++ setupCommands + ++ impureSetupCommands + ++ serviceCommands + ++ impureShellCommands ); mkCommand = attrs: '' diff --git a/artiq-fast/windows/win.nix b/artiq-fast/windows/win.nix index f9437dc..c4c2e33 100644 --- a/artiq-fast/windows/win.nix +++ b/artiq-fast/windows/win.nix @@ -55,8 +55,8 @@ let name = "nuget-dll"; src = ./nuget/Microsoft.PackageManagement.NuGetProvider.dll; installScript = '' - mkdir C:\Program Files\PackageManagement\ProviderAssemblies\nuget\2.8.5.208 - cp Microsoft.PackageManagement.NuGetProvider.dll C:\Program Files\PackageManagement\ProviderAssemblies\nuget\2.8.5.208 + mkdir -f "C:\Program Files\PackageManagement\ProviderAssemblies\nuget\2.8.5.208" + cp "Microsoft.PackageManagement.NuGetProvider.dll" "C:\Program Files\PackageManagement\ProviderAssemblies\nuget\2.8.5.208" Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201 ''; }; @@ -69,8 +69,8 @@ let mkdir pkgs/files cp ${bundleInstaller} pkgs/"$(stripHash "${bundleInstaller}")" - cp ${nuget} pkgs/bootstrap/"$(stripHash "${nuget}")" - cp ${opensshutils} pkgs/files/"$(stripHash "${opensshutils}")" + cp ${nuget} pkgs/bootstrap/00_"$(stripHash "${nuget}")" + cp ${opensshutils} pkgs/bootstrap/01_"$(stripHash "${opensshutils}")" ${lib.concatStringsSep "\n" (builtins.map (x: ''cp ${x} pkgs/bootstrap/"$(stripHash "${x}")"'') packages)}