Skip to content

Instantly share code, notes, and snippets.

@aksiksi
Created February 4, 2026 21:58
Show Gist options
  • Select an option

  • Save aksiksi/7fed39f17037e9ae82c043457ed29401 to your computer and use it in GitHub Desktop.

Select an option

Save aksiksi/7fed39f17037e9ae82c043457ed29401 to your computer and use it in GitHub Desktop.
{ disko, ... }:
{
imports = [
disko.nixosModules.disko
];
disko.devices = {
disk = {
nvme0n1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
swap = {
size = "8G";
content = {
type = "swap";
};
};
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "rpool";
};
};
};
};
};
};
zpool = {
rpool = {
type = "zpool";
rootFsOptions = {
mountpoint = "none";
compression = "zstd";
acltype = "posixacl";
xattr = "sa";
atime = "off";
};
options.ashift = "12";
datasets = {
"root" = {
type = "zfs_fs";
options.mountpoint = "none";
};
"root/nixos" = {
type = "zfs_fs";
mountpoint = "/";
};
"root/home" = {
type = "zfs_fs";
mountpoint = "/home";
};
"root/nix" = {
type = "zfs_fs";
mountpoint = "/nix";
};
"root/tmp" = {
type = "zfs_fs";
mountpoint = "/tmp";
};
"games" = {
type = "zfs_fs";
mountpoint = "/games";
options.compression = "lz4";
};
"games/steam" = {
type = "zfs_fs";
mountpoint = "/games/steam";
};
"games/emulation" = {
type = "zfs_fs";
mountpoint = "/games/emulation";
options.compression = "zstd";
};
};
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment