]> Git — Sourcephile - sourcephile-nix.git/blob - install/physical/virtualbox.nix
redmine: disable
[sourcephile-nix.git] / install / physical / virtualbox.nix
1 {
2 network.rollBack = false;
3 friot = {pkgs, lib, config, options, ...}:
4 let ipv4 = if options.networking.privateIPv4.isDefined
5 then config.networking.privateIPv4
6 else "X.X.X.X";
7 in {
8 config = {
9 deployment.targetEnv = "virtualbox";
10 deployment.virtualbox.headless = true;
11 deployment.virtualbox.memorySize = 1024;
12 deployment.virtualbox.vcpu = 2;
13 deployment.virtualbox.disks.disk1.baseImage = ../../.var/nixops/virtualbox/nixops.vmdk;
14 #deployment.virtualbox.disks.disk1.size = 6024;
15 # NOTE: resize not yet supported.
16
17 deployment.storeKeysOnMachine = true;
18 networking = {
19 interfaces."enp0s8" = {
20 #macAddress = "00:11:22:33:44:55";
21 #ipv4.addresses = [ { address = ipv4; prefixLength = 32; } ];
22 ipv6.addresses = [ { address = "fe80::1"; prefixLength = 10; } ];
23 };
24 zones = {
25 net = {
26 iface = "enp0s3";
27 ipv4 = ipv4;
28 };
29 lan = {
30 iface = "enp0s8";
31 ipv4 = ipv4;
32 #ipv6 = "fe80::1";
33 };
34 };
35 };
36 };
37 };
38 }
39
40 #{
41 # vbox =
42 # { deployment.targetEnv = "virtualbox"; };
43 #
44 # machine =
45 # { resources, ... }:
46 # { deployment.targetEnv = "container";
47 # deployment.container.host = resources.machines.vbox;
48 # };
49 #}