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