diff options
Diffstat (limited to 'configuration/snorlax/disk-config.nix')
-rw-r--r-- | configuration/snorlax/disk-config.nix | 34 |
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"; + }; + }; + }; + }; }; } |