summaryrefslogtreecommitdiffstats
path: root/makefu/1systems/x/x13/disk.nix
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-06-19 03:25:39 +0200
committerlassulus <git@lassul.us>2023-06-19 03:25:39 +0200
commit139799c53cdaf55c362109e01be9dd96cc8700ed (patch)
treeb1ce719ec8f62458bce2d9fe2191b8d004630f2a /makefu/1systems/x/x13/disk.nix
parentcb8fbb09127392a17d698d91f78ede7ae46accb8 (diff)
parenta766e88e7c8d87aa6bdbde796d3a454f7b5e546e (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/1systems/x/x13/disk.nix')
-rw-r--r--makefu/1systems/x/x13/disk.nix67
1 files changed, 67 insertions, 0 deletions
diff --git a/makefu/1systems/x/x13/disk.nix b/makefu/1systems/x/x13/disk.nix
new file mode 100644
index 00000000..7ce77bdf
--- /dev/null
+++ b/makefu/1systems/x/x13/disk.nix
@@ -0,0 +1,67 @@
+{ disk ? "/dev/sda", ... }: {
+ disko.devices = {
+ disk = {
+ nvme = {
+ type = "disk";
+ device = disk;
+ content = {
+ type = "table";
+ format = "gpt";
+ partitions = [
+ {
+ name = "ESP";
+ start = "0";
+ end = "512MiB";
+ fs-type = "fat32";
+ bootable = true;
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ };
+ }
+ {
+ name = "zfs";
+ start = "512MiB";
+ end = "100%";
+ content = {
+ type = "zfs";
+ pool = "tank";
+ };
+ }
+ ];
+ };
+ };
+ };
+ zpool = {
+ tank = {
+ type = "zpool";
+ rootFsOptions = {
+ compression = "lz4";
+ #reservation = "5G";
+ "com.sun:auto-snapshot" = "false";
+ };
+ mountpoint = null;
+ postCreateHook = "zfs snapshot tank@blank";
+
+ datasets = {
+
+ root = {
+ type = "zfs_fs";
+ mountpoint = "/";
+ options = {
+ encryption = "aes-256-gcm";
+ keyformat = "passphrase";
+ "com.sun:auto-snapshot" = "true";
+ };
+ #keylocation = "file:///tmp/secret.key";
+ };
+ "root/home" = {
+ type = "zfs_fs";
+ mountpoint = "/home";
+ };
+ };
+ };
+ };
+ };
+}