all repos — char/flake @ c38e2de85140f4267b031f149f584afd7fe56839

nixos flake

profiles/onyx/disks.nix (view raw)

 1{ lib, ... }:
 2{
 3  disko.devices.disk.primary = {
 4    device = lib.mkDefault "/dev/disk/by-id/nvme-WD_BLACK_SN850X_2000GB_240264805134";
 5    type = "disk";
 6    content = {
 7      type = "gpt";
 8      partitions = {
 9        ESP = {
10          size = "4G";
11          type = "EF00";
12          content = {
13            type = "filesystem";
14            format = "vfat";
15            mountpoint = "/boot";
16            mountOptions = [
17              "defaults"
18              "umask=0077"
19            ];
20          };
21        };
22        root = {
23          size = "100%";
24          type = "BF00";
25          content = {
26            type = "zfs";
27            pool = "zroot";
28          };
29        };
30      };
31    };
32  };
33
34  disko.devices.zpool.zroot = {
35    type = "zpool";
36    rootFsOptions = {
37      acltype = "posixacl";
38      xattr = "sa";
39      dnodesize = "auto";
40    };
41    datasets = {
42      root = {
43        type = "zfs_fs";
44        mountpoint = "/";
45        options.mountpoint = "legacy";
46      };
47      nix = {
48        type = "zfs_fs";
49        mountpoint = "/nix";
50        options = {
51          mountpoint = "legacy";
52          compression = "zstd";
53          atime = "off";
54        };
55      };
56    };
57  };
58}