| Hello, I am new-ish to NixOS and disko and am trying to get a setup working for my home server. I have this cut-down config that is just supposed to format the single mirror that I plan to install NixOS on top of, but it seems to not correctly create the zfs partition (as well as the zpool and datasets). When I run sudo disko --mode disko disko-config.nix, it appears to work (?), but when I check the partitions in Gnome Disks in the live environment, the content of the partition is listed as "Unknown." The EFI boot partition does appear to be recognized as expected. Any help would be much appreciated!
{
disko.devices = let
nixosPartitions = {
ESP = {
size = "512M";
type = "EF00";
content.type = "filesystem";
content.format = "vfat";
content.mountpoint = "/boot";
};
zfs = {
size = "100%";
content.type = "zfs";
content.pool = "nixos";
};
};
in {
disk = {
# NixOS boot mirror (240GBx2)
ssd0 = {
device = "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = nixosPartitions;
};
};
ssd1 = {
device = "/dev/sdb";
type = "disk";
content = {
type = "gpt";
partitions = nixosPartitions;
};
};
};
};
zpool = {
# NixOS boot mirror
nixos = {
type = "zpool";
mode = "mirror";
options = { ashift = "12"; };
datasets = {
"root" = {
type = "zfs_fs";
mountpoint = "/";
options = {
encryption = "aes-256-gcm";
keyformat = "passphrase";
keylocation = "prompt";
};
};
"nix" = {
type = "zfs_fs";
mountpoint = "/nix";
options."com.sun:auto-snapshot" = "false";
};
"home" = {
type = "zfs_fs";
mountpoint = "/home";
options = {
encryption = "aes-256-gcm";
keyformat = "raw";
keylocation = "file:///etc/zfskey";
};
};
};
};
};
}
|