main
 1{ lib, ... }:
 2{
 3  fileSystems."/" = {
 4    device = "/dev/vda1";
 5    fsType = "ext4";
 6  };
 7  swapDevices = [
 8    {
 9      device = "/swapfile";
10      size = 1024;
11    }
12  ];
13
14  # DigitalOcean volume for persistent data
15  fileSystems."/data" = {
16    device = "/dev/disk/by-uuid/c77f5139-e18a-4138-974f-f63300def495";
17    fsType = "ext4";
18    options = [
19      "defaults"
20      "noatime"
21      "discard"
22    ];
23  };
24
25  # Bind mounts for transparent access at original paths
26  fileSystems."/home/vincent/git" = {
27    device = "/data/home/vincent/git";
28    fsType = "none";
29    options = [ "bind" ];
30    depends = [ "/data" ];
31  };
32
33  fileSystems."/home/vincent/desktop" = {
34    device = "/data/home/vincent/desktop";
35    fsType = "none";
36    options = [ "bind" ];
37    depends = [ "/data" ];
38  };
39
40  fileSystems."/home/vincent/sync" = {
41    device = "/data/home/vincent/sync";
42    fsType = "none";
43    options = [ "bind" ];
44    depends = [ "/data" ];
45  };
46
47  fileSystems."/var/www" = {
48    device = "/data/www";
49    fsType = "none";
50    options = [ "bind" ];
51    depends = [ "/data" ];
52  };
53
54  # START OF DigitalOcean specifics
55  # This file was populated at runtime with the networking
56  # details gathered from the active system.
57  networking = {
58    nameservers = [
59      "67.207.67.2"
60      "67.207.67.3"
61    ];
62    defaultGateway = "188.166.64.1";
63    defaultGateway6 = null;
64    dhcpcd.enable = false;
65    usePredictableInterfaceNames = lib.mkForce true;
66    interfaces = {
67      eth0 = {
68        ipv4.addresses = [
69          {
70            address = "188.166.102.243";
71            prefixLength = 18;
72          }
73          {
74            address = "10.18.0.5";
75            prefixLength = 16;
76          }
77        ];
78        ipv6.addresses = [
79          {
80            address = "fe80::8035:3aff:fe72:1036";
81            prefixLength = 64;
82          }
83        ];
84      };
85
86    };
87  };
88  services.udev.extraRules = ''
89    ATTR{address}=="82:35:3a:72:10:36", NAME="eth0"
90
91  '';
92  # END OF DigitalOcean specifics
93}