]> Git — Sourcephile - sourcephile-nix.git/blob - install/mermet/physical/virtualbox.nix
nixops: add mermet
[sourcephile-nix.git] / install / mermet / physical / virtualbox.nix
1 { pkgs, lib, config, options, ... }:
2 let ipv4 = if options.networking.privateIPv4.isDefined
3 then config.networking.privateIPv4
4 else "X.X.X.X";
5 in {
6 config = {
7 deployment.targetEnv = "virtualbox";
8 deployment.virtualbox.headless = true;
9 deployment.virtualbox.memorySize = 1024;
10 deployment.virtualbox.vcpu = 2;
11 deployment.virtualbox.disks.disk1.baseImage = ../../../.cache/nixops/virtualbox/nixops.vmdk;
12 #deployment.virtualbox.disks.disk1.size = 6024;
13 # NOTE: resize not yet supported.
14
15 deployment.storeKeysOnMachine = true;
16 networking = {
17 interfaces."enp0s8" = {
18 #macAddress = "00:11:22:33:44:55";
19 #ipv4.addresses = [ { address = ipv4; prefixLength = 32; } ];
20 ipv6.addresses = [ { address = "fe80::1"; prefixLength = 10; } ];
21 };
22 zones = {
23 net = {
24 iface = "enp0s3";
25 ipv4 = ipv4;
26 };
27 lan = {
28 iface = "enp0s8";
29 ipv4 = ipv4;
30 #ipv6 = "fe80::1";
31 };
32 };
33 };
34 };
35 }