From 9f3e515c01e35d013c58bc49aa42c7fed37dfc18 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Mon, 27 Jan 2020 10:23:53 +0000 Subject: [PATCH] windows: Add Anaconda to base windows install --- artiq-fast/windows/README.md | 4 ++-- artiq-fast/windows/autounattend.nix | 6 +++++- artiq-fast/windows/win.nix | 13 +++++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/artiq-fast/windows/README.md b/artiq-fast/windows/README.md index db8fce2..d1fb5bb 100644 --- a/artiq-fast/windows/README.md +++ b/artiq-fast/windows/README.md @@ -12,9 +12,9 @@ nix-build build.nix ``` Results in a file called c.img -If in "pure" mode +If in pure mode ```shell -nix-build --option sandbox false build.nix +nix-build ls -la ./result ``` Results in a symlink to the image in the nix store diff --git a/artiq-fast/windows/autounattend.nix b/artiq-fast/windows/autounattend.nix index a3a57d0..7d65667 100644 --- a/artiq-fast/windows/autounattend.nix +++ b/artiq-fast/windows/autounattend.nix @@ -54,7 +54,11 @@ let } { Path = "powershell.exe Start-Service sshd"; - Description = "Now start the sshd service"; + Description = "Now start the sshd service."; + } + { + Path = ''powershell.exe Set-Service -Name sshd -StartupType "Automatic"''; + Description = "Enable SSH by default."; } ]; diff --git a/artiq-fast/windows/win.nix b/artiq-fast/windows/win.nix index c4c2e33..b41971e 100644 --- a/artiq-fast/windows/win.nix +++ b/artiq-fast/windows/win.nix @@ -61,6 +61,18 @@ let ''; }; + anaconda = winPkgs.makePkg { + name = "Anaconda3"; + src = pkgs.fetchurl { + name = "Anaconda3.exe"; + url = "https://repo.anaconda.com/archive/Anaconda3-2019.03-Windows-x86_64.exe"; + sha256 = "1f9icm5rwab6l1f23a70dw0qixzrl62wbglimip82h4zhxlh3jfj"; + }; + installScript = '' + Anaconda3.exe /InstallationType=AllUsers /RegisterPython=0 /S /D="C:\Program Files\\Anaconda3" + ''; + }; + in runQemuCommand "bootstrap-win-pkgs.img" '' mkdir pkgs @@ -71,6 +83,7 @@ let cp ${bundleInstaller} pkgs/"$(stripHash "${bundleInstaller}")" cp ${nuget} pkgs/bootstrap/00_"$(stripHash "${nuget}")" cp ${opensshutils} pkgs/bootstrap/01_"$(stripHash "${opensshutils}")" + cp ${anaconda} pkgs/bootstrap/02_"$(stripHash "${anaconda}")" ${lib.concatStringsSep "\n" (builtins.map (x: ''cp ${x} pkgs/bootstrap/"$(stripHash "${x}")"'') packages)}