summaryrefslogtreecommitdiff
path: root/configuration/snorlax/disk-config.nix
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-02-09 00:04:30 +0100
committerJasper Ras <jras@hostnet.nl>2025-02-09 00:04:30 +0100
commit9d887bf07ac1dec542028212909b9ac7e461d0db (patch)
treee545fc1d313c9f2e370fa83f5bdb9a1837527bfe /configuration/snorlax/disk-config.nix
parent4564b73de139a54c98f5a46c817485374de46e7e (diff)
core stuff, snorlax zfs
Diffstat (limited to 'configuration/snorlax/disk-config.nix')
-rw-r--r--configuration/snorlax/disk-config.nix34
1 files changed, 24 insertions, 10 deletions
diff --git a/configuration/snorlax/disk-config.nix b/configuration/snorlax/disk-config.nix
index aa789a3..8c910d6 100644
--- a/configuration/snorlax/disk-config.nix
+++ b/configuration/snorlax/disk-config.nix
@@ -7,14 +7,9 @@
content = {
type = "gpt";
partitions = {
- MBR = {
- type = "EF02"; # for grub MBR
- size = "1M";
- priority = 1; # Needs to be first partition
- };
ESP = {
type = "EF00";
- size = "500M";
+ size = "64M";
content = {
type = "filesystem";
format = "vfat";
@@ -22,17 +17,36 @@
mountOptions = [ "umask=0077" ];
};
};
- root = {
+ zfs = {
size = "100%";
content = {
- type = "filesystem";
- format = "ext4";
- mountpoint = "/";
+ type = "zfs";
+ pool = "zroot";
};
};
};
};
};
};
+
+ zpool = {
+ zroot = {
+ type = "zpool";
+ rootFsOptions = {
+ compression = "zstd";
+ "com.sun:auto-snapshot" = "false";
+ };
+ mountpoint = "/";
+ postCreateHook = "zfs list -t snap -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
+
+ datasets = {
+ git = {
+ type = "zfs_fs";
+ mountpoint = "/var/lib/git";
+ options."com.sun:auto-snapshot" = "true";
+ };
+ };
+ };
+ };
};
}