diff --git a/artiq-fast/windows/autounattend.nix b/artiq-fast/windows/autounattend.nix index 5c360cc..a3a57d0 100644 --- a/artiq-fast/windows/autounattend.nix +++ b/artiq-fast/windows/autounattend.nix @@ -37,7 +37,11 @@ let # If we are running in impure mode we can also enable networked services impureSetupCommands = let makeDirs = lib.mapAttrsToList (n: v: ''mkdir C:\Users\${n}\.ssh'') users; - writeKeys = lib.flatten (lib.mapAttrsToList (n: v: builtins.map (key: ''echo "${key}" >> C:\Users\${n}\.ssh\authorized_keys'') (v.sshKeys or [])) users); + writeKeys = lib.flatten (lib.mapAttrsToList (n: v: builtins.map (key: let + commands = [ + ''echo "${key}" | Out-File -FilePath C:\Users\${n}\.ssh\authorized_keys'' + ]; + in lib.concatStringsSep "\n" commands) (v.sshKeys or [])) users); in makeDirs ++ writeKeys ++ [ # TODO: Figure out how to do this step with sandboxing enabled { @@ -45,7 +49,7 @@ let Description = "Local powershell repo import"; } { - Path = ''powershell.exe Install-Module -Repository ""bootstraprepo" -Force OpenSSHUtils -Scope AllUsers''; + Path = ''powershell.exe Install-Module -Repository "bootstraprepo" -Force OpenSSHUtils -Scope AllUsers''; Description = "Install Openssh."; } {