]> Git — Sourcephile - sourcephile-nix.git/blob - install/physical/virtualbox.nix
update
[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 {
9
10 config = {
11 deployment.targetEnv = "virtualbox";
12 deployment.virtualbox.headless = true;
13 deployment.virtualbox.memorySize = 1024;
14 deployment.virtualbox.vcpu = 2;
15 deployment.virtualbox.disks.disk1.baseImage = <sys/var/virtualbox/nixops.vmdk>;
16 #deployment.virtualbox.disks.disk1.size = 6024;
17 # NOTE: resize not yet supported.
18
19 deployment.storeKeysOnMachine = true;
20 deployment.autoLuks = {
21 # NOTE: not working on virtualbox deployment
22 secretdisk = {
23 device = "/dev/sda";
24 passphrase = "foobar";
25 autoFormat = true;
26 cipher = "aes-cbc-essiv:sha256";
27 };
28 };
29 networking = {
30 interfaces."enp0s8" = {
31 #macAddress = "00:11:22:33:44:55";
32 #ipv4.addresses = [ { address = ipv4; prefixLength = 32; } ];
33 ipv6.addresses = [ { address = "fe80::1"; prefixLength = 10; } ];
34 };
35 zones = {
36 net = {
37 iface = "enp0s3";
38 ipv4 = ipv4;
39 };
40 lan = {
41 iface = "enp0s8";
42 ipv4 = ipv4;
43 #ipv6 = "fe80::1";
44 };
45 };
46 };
47 };
48 };
49 }