aboutsummaryrefslogblamecommitdiff
path: root/app/drone-ci/build/build-qcow2.nix
blob: 3ad45f4adc9852da4552b592735814202754dc9e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                                                    
                     








                                                   
{ 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 = 32768;
    format = "qcow2";
    configFile = pkgs.writeText "configuration.nix"
      ''
        {
          imports = [ <./machine-config.nix> ];
        }
      '';
  };
}