@firecat53 thanks for your response and my apologies for a slow reponse, my time has been rather fragmented over the last week or so.
Great point, when I saw this my first thought was “of course!”, but after much more investigation this wasn’t the issue…
There appear to be two issues, the first is that attempting to install the OS on ZFS on a root dataset (as specified above) doesn’t work, while the following disko config does work (for me):
{ disks ? [ "/dev/vda" ], ... }:
{
disko.devices = {
disk = {
vda = {
type = "disk";
device = builtins.elemAt disks 0;
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "zroot";
};
};
};
};
};
};
zpool = {
zroot = {
type = "zpool";
datasets = {
root = {
type = "zfs_fs";
options.mountpoint = "legacy";
mountpoint = "/";
options."com.sun:auto-snapshot" = "false";
};
home = {
type = "zfs_fs";
options.mountpoint = "legacy";
mountpoint = "/home";
};
alistair = {
type = "zfs_fs";
options.mountpoint = "legacy";
mountpoint = "/home/alistair";
};
alistaircache = {
type = "zfs_fs";
options.mountpoint = "legacy";
mountpoint = "/home/alistair/.cache";
};
};
};
};
};
}
(the difference being that the dataset mounted at root (/) is zpool/root
instead of zpool/zroot
).
The second issue was that I coudn’t get nixos-install
to work with flakes (nixos-install --flake .#nixosvm). Installing using channels and then switching to flakes works fine.
Thanks again.