main
 1{den, ...}: {
 2  den.hosts.tribios = {
 3    settings.disk.preservation.btrfs.partId = "/dev/disk/by-uuid/9886235f-5a74-41e8-919b-9e4096a7cb9e";
 4  };
 5
 6  den.aspects.tribios = {
 7    # Manually manage file system.
 8    # Since tribios has edk2-rk3588 firmware in main storage.
 9    # Using disko will break this.
10    includes = [
11      # den.aspects.disk.btrfs-disko
12      den.aspects.disk.btrfs
13      den.aspects.disk.preservation
14    ];
15
16    nixos = let
17      defaultBtrfsOpts = [
18        "defaults"
19        "compress=zstd:1"
20        "ssd"
21        "discard=async"
22      ];
23    in {
24      fileSystems = {
25        "/boot" = {
26          device = "/dev/disk/by-uuid/A0F7-6D8C";
27          fsType = "vfat";
28          options = ["fmask=0022" "dmask=0022"];
29        };
30        "/" = {
31          device = "/dev/disk/by-uuid/9886235f-5a74-41e8-919b-9e4096a7cb9e";
32          fsType = "btrfs";
33          options = ["subvol=/root"] ++ defaultBtrfsOpts;
34        };
35        "/nix" = {
36          device = "/dev/disk/by-uuid/9886235f-5a74-41e8-919b-9e4096a7cb9e";
37          fsType = "btrfs";
38          options = ["subvol=/nix" "noatime"] ++ defaultBtrfsOpts;
39          neededForBoot = true;
40        };
41        "/home" = {
42          device = "/dev/disk/by-uuid/9886235f-5a74-41e8-919b-9e4096a7cb9e";
43          fsType = "btrfs";
44          options = ["subvol=/home"] ++ defaultBtrfsOpts;
45          neededForBoot = true;
46        };
47        "/persist" = {
48          device = "/dev/disk/by-uuid/9886235f-5a74-41e8-919b-9e4096a7cb9e";
49          fsType = "btrfs";
50          options = ["subvol=/persist"] ++ defaultBtrfsOpts;
51          neededForBoot = true;
52        };
53        "/cache" = {
54          device = "/dev/disk/by-uuid/9886235f-5a74-41e8-919b-9e4096a7cb9e";
55          fsType = "btrfs";
56          options = ["subvol=/cache"] ++ defaultBtrfsOpts;
57          neededForBoot = true;
58        };
59      };
60    };
61  };
62}