wfvm/demo-image: make buildable from flake

This commit is contained in:
Astro 2022-10-13 21:41:03 +02:00
parent abd67ce2e6
commit 6542c37863
2 changed files with 16 additions and 2 deletions

View File

@ -16,5 +16,9 @@
lib = import ./wfvm { lib = import ./wfvm {
inherit pkgs; inherit pkgs;
}; };
packages.${system}.demoImage = import ./wfvm/demo-image.nix {
inherit self;
};
}; };
} }

View File

@ -1,7 +1,17 @@
{ pkgs ? import <nixpkgs> {}, impureMode ? false }: { pkgs ? import <nixpkgs> {}
# Whether to generate just a script to start and debug the windows installation
, impureMode ? false
# Flake input `self`
, self ? null
}:
let let
wfvm = (import ./default.nix { inherit pkgs; }); wfvm =
if self == null
# nix-build
then (import ./default.nix { inherit pkgs; })
# built from flake.nix
else self.lib;
in in
wfvm.makeWindowsImage { wfvm.makeWindowsImage {
# Build install script & skip building iso # Build install script & skip building iso