1 { pkgs, lib, config, ... }:
4 inherit (config) virtualbox;
5 virtualbox-init = pkgs.writeShellScriptBin "virtualbox-init" ''
8 time ${pkgs.nix}/bin/nix build \
9 -I nixpkgs=${toString pkgs.path} \
10 --out-link .cache/nixops/virtualbox \
11 --argstr system ${virtualbox.system} \
12 -f pkgs/installer/nixops-virtualbox
16 options.virtualbox = {
17 enable = lib.mkEnableOption "VirtualBox image for NixOps";
18 system = lib.mkOption {
20 example = "x86_64-linux";
21 default = pkgs.stdenv.hostPlatform.system;
24 config = lib.mkIf virtualbox.enable {
25 nix-shell.buildInputs = [
28 nix-shell.shellHook = ''