diff --git a/devices/ellaca/disko.nix b/devices/ellaca/disko.nix new file mode 100644 index 0000000..482ed8d --- /dev/null +++ b/devices/ellaca/disko.nix @@ -0,0 +1,64 @@ +{ + disko.devices = { + disk = { + vdb = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + priority = 1; + name = "ESP"; + start = "1M"; + end = "128M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + end = "-16G"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; # Override existing partition + # Subvolumes must set a mountpoint in order to be mounted, + # unless their parent is mounted + subvolumes = { + "/rootfs" = { + mountOptions = [ "compress=zstd" "noatime" ]; + mountpoint = "/"; + }; + "/home" = { + mountOptions = [ "compress=zstd" "noatime" ]; + mountpoint = "/home"; + }; + "/nix" = { + mountOptions = [ "compress=zstd" "noatime" ]; + mountpoint = "/nix"; + }; + # Subvolume for the swapfile + "/swap" = { + mountpoint = "/.swapvol"; + swap = { + swapfile.size = "20M"; + swapfile2.size = "20M"; + swapfile2.path = "rel-path"; + }; + }; + }; + swap = { + swapfile = { + size = "16G"; + }; + }; + }; + }; + }; + }; + }; + }; + }; +}