diff options
Diffstat (limited to 'app/drone-ci/build/build-qcow2.nix')
-rw-r--r-- | app/drone-ci/build/build-qcow2.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/drone-ci/build/build-qcow2.nix b/app/drone-ci/build/build-qcow2.nix new file mode 100644 index 0000000..266ba2c --- /dev/null +++ b/app/drone-ci/build/build-qcow2.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = + [ + <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix> + ./machine-config.nix + ]; + + system.build.qcow2 = import <nixpkgs/nixos/lib/make-disk-image.nix> { + inherit lib config; + pkgs = import <nixpkgs> { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package + diskSize = 8192; + format = "qcow2"; + configFile = pkgs.writeText "configuration.nix" + '' + { + imports = [ <./machine-config.nix> ]; + } + ''; + }; +} |