!JQvnJacrwKgtkGHYHO:matrix.org

NixOS + Framework

225 Members
Discussing NixOS in the context of the Framework laptop50 Servers

Load older messages


SenderMessageTime
10 May 2026
@sudoforge:matrix.orgsudoforge (in case this isn't clear to you trumee - the swap partition is not formatted with zfs and is not a zvol) 15:13:56
@dantefromhell:matrix.orgdantefromhellI've been doing ZFS & swap on a separate partition + hibernate on multiple devices for multiple years w/o pool corruption #DataPoint15:16:27
@rajil:rajils.comtrumeeYes, my swap is ext4.15:16:36
@sudoforge:matrix.orgsudoforgewell that makes sense, since zfs has nothing to do with the swap partition15:16:47
@sudoforge:matrix.orgsudoforge * dantefromhell well that makes sense, since zfs has nothing to do with the swap partition 15:17:17
@sudoforge:matrix.orgsudoforgethen you should be good to go!15:17:40
@rajil:rajils.comtrumeedid you set this up, https://wiki.nixos.org/wiki/ZFS#Partial_support_for_swap_on_ZFS ?15:18:21
@rajil:rajils.comtrumeeWiki does not recommend boot.zfs.allowHibernation = true15:19:05
@sudoforge:matrix.orgsudoforge because this is for hibernation on swap space that is on a zvol 15:19:56
@sudoforge:matrix.orgsudoforgeyou're conflating "i use zfs on /some/partition and have a separate ext4 fs on /another/partition" with "zfs is managing my entire disk"15:20:31
@rajil:rajils.comtrumeeso that option is irrelevant for my ext4 setup i suppose15:20:57
@sudoforge:matrix.orgsudoforgecorrect.15:21:06
@rajil:rajils.comtrumeeso i just need to set boot.resumeDevice ?15:22:07
@sudoforge:matrix.orgsudoforgewell, you need to specify the swap device too. see: https://wiki.nixos.org/wiki/Power_Management#Hibernation15:23:14
@rajil:rajils.comtrumee

do i need to turn off randomEncryption?,

  swapDevices = [    
    {    
      device = "/dev/sda3";    
      randomEncryption.enable = true;    
    } 
15:26:23
@sudoforge:matrix.orgsudoforgeyes; random encryption is not compatible with hibernation, since you don't know the key used to unlock it when you resume15:27:34
@sudoforge:matrix.orgsudoforgeyou can encrypt it with a known key (passphrase, security key, clevis+tang) instead15:28:13
@sudoforge:matrix.orgsudoforgeyou can optionally encrypt it and add the TPM device as a key, allowing you to automatically decrypt it15:28:48
@sudoforge:matrix.orgsudoforge* you can optionally encrypt it and add the TPM device as a key, allowing you to automatically decrypt it. this is inherently less secure, though.15:29:09
@dantefromhell:matrix.orgdantefromhell
In reply to @rajil:rajils.com
did you set this up, https://wiki.nixos.org/wiki/ZFS#Partial_support_for_swap_on_ZFS ?
nope... IIRC when I created my disk layouts (i'm using disko everywhere) swap on zvol was discouraged too
15:29:37
@rajil:rajils.comtrumeei use a yubikey to decrypt on bootup.15:29:57
@sudoforge:matrix.orgsudoforge to decrypt what, though 15:30:23
@sudoforge:matrix.orgsudoforgeyour zfs pool, i'm guessing15:30:39
@sudoforge:matrix.orgsudoforge so you can just turn off randomEncryption and enroll your yubikey as a key for the swap partition 15:31:58
@rajil:rajils.comtrumeeThis is my setup https://discourse.nixos.org/t/yubikey-fido2-and-boot-initrd-systemd/60051/18?u=trumee. I have a separate Luks partition which gets opened by the Yubikey.15:32:43
@rajil:rajils.comtrumeeI am using ZFS encryption. The key is on the luks partition, /run/filesystemkeys15:33:42
@sudoforge:matrix.orgsudoforgeso... you're creating a random key within a luks container to unlock your zfs pool15:42:00
@sudoforge:matrix.orgsudoforge i guess you could enroll that as a keyfile for your swap partition too 15:42:34
@sudoforge:matrix.orgsudoforge since, once again, it has nothing to do with zfs at all 15:42:58
@rajil:rajils.comtrumeeyes, that seems a good way forward15:59:01

Show newer messages


Back to Room ListRoom Version: 10