From 94ca43da4bc621a95401a57db4b3aaf2abd0f176 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Tue, 22 Feb 2022 11:27:28 +0800 Subject: [PATCH] flake: fix passing additional args to makeWindowsImage --- flake.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 48e6363..4b833e3 100644 --- a/flake.nix +++ b/flake.nix @@ -21,11 +21,13 @@ ''; # makeWindowsImage - makeWindowsImage = attrs: ( import wfvm/win.nix { inherit pkgs bundleInstaller; } // attrs ); + makeWindowsImage = attrs: import wfvm/win.nix ({ inherit pkgs bundleInstaller; } // attrs ); build-demo-image = { impureMode ? false }: makeWindowsImage { # Build install script & skip building iso + inherit impureMode; + # Custom base iso # windowsImage = pkgs.requireFile rec { # name = "Win10_21H1_English_x64.iso"; @@ -57,14 +59,14 @@ # administratorPassword = "12345"; # Imperative installation commands, to be installed incrementally - installCommands = with layers; [ + installCommands = pkgs.lib.optional (!impureMode) (with layers; [ (collapseLayers [ disable-autosleep disable-autolock disable-firewall ]) anaconda3 msys2 msvc msvc-ide-unbreak - ]; + ]); # services = { # # Enable remote management @@ -113,7 +115,7 @@ packages.x86_64-linux = { demo-image = build-demo-image {}; - demo-image-impure = build-demo-image { impureMode = true; }; + demo-image-impure = makeWindowsImage { impureMode = true; }; make-msys-packages = utils.wfvm-run { name = "get-msys-packages";