forked from M-Labs/nix-scripts
windows: Remove impureMode from autounattend
It was always a hack to circumvent pure setup not being completed.
This commit is contained in:
parent
fc3b685167
commit
70562bcdfd
@ -13,7 +13,6 @@
|
|||||||
, setupCommands ? []
|
, setupCommands ? []
|
||||||
, timeZone ? "UTC"
|
, timeZone ? "UTC"
|
||||||
, services ? {}
|
, services ? {}
|
||||||
, impureMode ? false
|
|
||||||
, impureShellCommands ? []
|
, impureShellCommands ? []
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
@ -42,11 +41,11 @@ let
|
|||||||
in makeDirs ++ writeKeys ++ [
|
in makeDirs ++ writeKeys ++ [
|
||||||
# TODO: Figure out how to do this step with sandboxing enabled
|
# TODO: Figure out how to do this step with sandboxing enabled
|
||||||
{
|
{
|
||||||
Path = "powershell.exe Install-PackageProvider -Name nuget -MinimumVersion 2.8.5.201 -Force";
|
Path = ''Register-PSRepository -Name "bootstraprepo" -SourceLocation F:\files'';
|
||||||
Description = "Install Nuget (require to pull in openssh).";
|
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.";
|
Description = "Install Openssh.";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -64,16 +63,16 @@ let
|
|||||||
Description = "Allow unsigned powershell scripts.";
|
Description = "Allow unsigned powershell scripts.";
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
++ setupCommands
|
|
||||||
++ impureSetupCommands
|
|
||||||
++ serviceCommands
|
|
||||||
++ impureShellCommands
|
|
||||||
++ [
|
++ [
|
||||||
{
|
{
|
||||||
Path = ''powershell.exe F:\win-bundle-installer.exe'';
|
Path = ''powershell.exe F:\win-bundle-installer.exe'';
|
||||||
Description = "Install any declared packages.";
|
Description = "Install any declared packages.";
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
++ setupCommands
|
||||||
|
++ impureSetupCommands
|
||||||
|
++ serviceCommands
|
||||||
|
++ impureShellCommands
|
||||||
);
|
);
|
||||||
|
|
||||||
mkCommand = attrs: ''
|
mkCommand = attrs: ''
|
||||||
|
@ -55,8 +55,8 @@ let
|
|||||||
name = "nuget-dll";
|
name = "nuget-dll";
|
||||||
src = ./nuget/Microsoft.PackageManagement.NuGetProvider.dll;
|
src = ./nuget/Microsoft.PackageManagement.NuGetProvider.dll;
|
||||||
installScript = ''
|
installScript = ''
|
||||||
mkdir 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
|
cp "Microsoft.PackageManagement.NuGetProvider.dll" "C:\Program Files\PackageManagement\ProviderAssemblies\nuget\2.8.5.208"
|
||||||
Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201
|
Import-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@ -69,8 +69,8 @@ let
|
|||||||
mkdir pkgs/files
|
mkdir pkgs/files
|
||||||
|
|
||||||
cp ${bundleInstaller} pkgs/"$(stripHash "${bundleInstaller}")"
|
cp ${bundleInstaller} pkgs/"$(stripHash "${bundleInstaller}")"
|
||||||
cp ${nuget} pkgs/bootstrap/"$(stripHash "${nuget}")"
|
cp ${nuget} pkgs/bootstrap/00_"$(stripHash "${nuget}")"
|
||||||
cp ${opensshutils} pkgs/files/"$(stripHash "${opensshutils}")"
|
cp ${opensshutils} pkgs/bootstrap/01_"$(stripHash "${opensshutils}")"
|
||||||
|
|
||||||
${lib.concatStringsSep "\n" (builtins.map (x: ''cp ${x} pkgs/bootstrap/"$(stripHash "${x}")"'') packages)}
|
${lib.concatStringsSep "\n" (builtins.map (x: ''cp ${x} pkgs/bootstrap/"$(stripHash "${x}")"'') packages)}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user