]> Git — Sourcephile - sourcephile-nix.git/blob - nixpkgs/pkgs/installer/nixops-virtualbox/default.nix
mermet: dovecot: julm: increase mailQuota
[sourcephile-nix.git] / nixpkgs / pkgs / installer / nixops-virtualbox / default.nix
1 { nixos ? <nixpkgs/nixos>
2 , system ? builtins.currentSystem
3 }:
4
5 let
6
7 host-configuration = import ./host-configuration-nixops.nix;
8
9 host = import nixos {
10 inherit system;
11 configuration = host-configuration;
12 };
13
14 # TODO: Not yet sure if using the local packages is the best approach
15 pkgs = import <nixpkgs> { };
16
17 in
18 rec {
19
20 ova = host.config.system.build.virtualBoxOVA;
21
22 nixos-disk = pkgs.stdenv.mkDerivation rec {
23 name = "nixops-${version}.vmdk";
24 version = host.config.system.nixos.release;
25 phases = [ "installPhase" ];
26 nativeBuildInputs = [ ova ];
27 installPhase = ''
28 mkdir ova
29 tar -xf ${ova}/*.ova -C ova
30 mkdir -p $out
31 mv ova/nixos*.vmdk $out/nixops-${version}.vmdk
32 ln -s nixops-${version}.vmdk $out/nixops.vmdk
33 '';
34 };
35
36 }