summaryrefslogtreecommitdiffstats
path: root/makefu/1systems/snake/disk.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2023-01-19 14:12:03 +0100
committerlassulus <lassulus@lassul.us>2023-01-19 14:12:03 +0100
commitc89f76a0bd4f5060ead3d942387c37aff1350ec8 (patch)
tree6715b9053f54a97a5b72a4dd8a06a865326b5a91 /makefu/1systems/snake/disk.nix
parentb51998cfae7b6fe892f9f0f9a2c0ffcfeeded0ba (diff)
parentcb7ebd1c9120eb03ded2334db4c41fe6a0e26b88 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/1systems/snake/disk.nix')
-rw-r--r--makefu/1systems/snake/disk.nix64
1 files changed, 64 insertions, 0 deletions
diff --git a/makefu/1systems/snake/disk.nix b/makefu/1systems/snake/disk.nix
new file mode 100644
index 000000000..f9e14844f
--- /dev/null
+++ b/makefu/1systems/snake/disk.nix
@@ -0,0 +1,64 @@
+{ disks ? [ "/dev/sda" ], ... }: {
+ disk = {
+ x = {
+ type = "disk";
+ device = "/dev/sda";
+ content = {
+ type = "table";
+ format = "gpt";
+ partitions = [
+ {
+ name = "boot";
+ type = "partition";
+ start = "0";
+ end = "1M";
+ part-type = "primary";
+ flags = ["bios_grub"];
+ }
+ {
+ type = "partition";
+ name = "ESP";
+ start = "1M";
+ end = "512MiB";
+ fs-type = "fat32";
+ bootable = true;
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ };
+ }
+ {
+ type = "partition";
+ name = "zfs";
+ start = "512MiB";
+ end = "100%";
+ content = {
+ type = "zfs";
+ pool = "zroot";
+ };
+ }
+ ];
+ };
+ };
+ };
+ zpool = {
+ zroot = {
+ type = "zpool";
+ rootFsOptions.compression = "lz4";
+ mountpoint = "/";
+
+ datasets = {
+ home = {
+ zfs_type = "filesystem";
+ mountpoint = "/home";
+ options.mountpoint = "legacy";
+ };
+ reserved = {
+ zfs_type = "filesystem";
+ options.refreservation = "1G";
+ };
+ };
+ };
+ };
+}