build02: add swap
This commit is contained in:
parent
669979b569
commit
57311f69a6
2 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../roles/common.nix
|
../roles/common.nix
|
||||||
|
../roles/swap.nix
|
||||||
../roles/hardware/hetzner-amd.nix
|
../roles/hardware/hetzner-amd.nix
|
||||||
../roles/hetzner-network.nix
|
../roles/hetzner-network.nix
|
||||||
../roles/hercules-ci
|
../roles/hercules-ci
|
||||||
|
|
6
roles/swap.nix
Normal file
6
roles/swap.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-use-a-zvol-as-a-swap-device
|
||||||
|
# zfs create -V 16G -b $(getconf PAGESIZE) -o logbias=throughput -o sync=always -o primarycache=metadata -o com.sun:auto-snapshot=false /dev/zvol/zroot/swap
|
||||||
|
# mkswap -f /dev/zvol/zroot/swap
|
||||||
|
{
|
||||||
|
swapDevices = [{ device = "/dev/zvol/zroot/swap"; }];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue