diff --git a/hosts/common/disks/zfs/zspeed.nix b/hosts/common/disks/zfs/zspeed.nix index 6edd363..8babffe 100644 --- a/hosts/common/disks/zfs/zspeed.nix +++ b/hosts/common/disks/zfs/zspeed.nix @@ -1,16 +1,4 @@ -{ pkgs -, lib -, ... -}: -let - }; - In your own system use something like this: - import (builtins.fetchGit { - url = "https://github.com/nix-community/disko"; - ref = "master"; - }) { - inherit lib; - };{ +{ disko.devices = { disk = { x = { @@ -50,31 +38,29 @@ let zspeed = { type = "zpool"; mode = "mirror"; - options = { + rootFsOptions = { "compression" = "zstd-4"; "com.sun:auto-snapshot" = "false"; - "atime" = "off"; "xattr" = "sa"; + "atime" = "off"; + }; + options = { "ashift" = "13"; }; - mountpoint = "/mnt/zpool"; postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zspeed@blank$' || zfs snapshot zspeed@blank"; datasets = { postgres = { type = "zfs_volume"; size = "10G -s"; + options = { + "com.sun:auto-snapshot:daily" = "true"; + "volblocksize" = "8k"; + }; content = { type = "filesystem"; format = "ext4"; - mountpoint = "/mnt/postgres"; - options = { - "com.sun:auto-snapshot:daily" = "true"; - "atime" = "off"; - "xattr" = "sa"; - "ashift" = "13"; - "recordsize" = "8k"; - }; + mountpoint = "/postgres"; }; }; };