diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-30 14:57:05 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-30 14:57:05 +0200 |
commit | d47d4e93ab8682710e80eec8c7c9d6a7d2f14202 (patch) | |
tree | a0039fb674a7150c0338707606a20c9d62ced1e5 /app/drone-ci/build/build-qcow2.nix | |
parent | 2d9adf82d04261f420af4cc5482e442297741a5d (diff) | |
download | nixcfg-d47d4e93ab8682710e80eec8c7c9d6a7d2f14202.tar.gz nixcfg-d47d4e93ab8682710e80eec8c7c9d6a7d2f14202.zip |
Work on drone runner as VM
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> ]; + } + ''; + }; +} |