mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 21:43:29 +01:00
Added example for swap on zfs_volume
I could not find an example of how to enable swap on a `zfs_volume` but since I made it work I wanted to share it 😁
This commit is contained in:
1 parent
6c1b834456
commit
2db1d64fc0
2 files changed
+19
No files matched your search
@@ -56,6 +56,24 @@
|
|||||||
options.mountpoint = "/nix";
|
options.mountpoint = "/nix";
|
||||||
mountpoint = "/nix";
|
mountpoint = "/nix";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# README MORE: https://wiki.archlinux.org/title/ZFS#Swap_volume
|
||||||
|
"root/swap" = {
|
||||||
|
type = "zfs_volume";
|
||||||
|
size = "10M";
|
||||||
|
content = {
|
||||||
|
type = "swap";
|
||||||
|
};
|
||||||
|
options = {
|
||||||
|
volblocksize = "4096";
|
||||||
|
compression = "zle";
|
||||||
|
logbias = "throughput";
|
||||||
|
sync = "always";
|
||||||
|
primarycache = "metadata";
|
||||||
|
secondarycache = "none";
|
||||||
|
"com.sun:auto-snapshot" = "false";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,5 +13,6 @@ diskoLib.testLib.makeDiskoTest {
|
|||||||
extraTestScript = ''
|
extraTestScript = ''
|
||||||
machine.succeed("mountpoint /");
|
machine.succeed("mountpoint /");
|
||||||
machine.succeed("mountpoint /nix");
|
machine.succeed("mountpoint /nix");
|
||||||
|
machine.succeed("swapon --show=NAME | grep /dev/zd"); # i.e. /dev/zd0
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user