From 1ae7c794d93d79497aade51261634532202bcfda Mon Sep 17 00:00:00 2001 From: Leonie Marcy Vack Date: Thu, 16 Jan 2025 14:45:05 +0100 Subject: [PATCH 1/2] zfs_volume: add zfs_volume without content to zfs example --- example/zfs.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/zfs.nix b/example/zfs.nix index 5ec99b4..0a42799 100644 --- a/example/zfs.nix +++ b/example/zfs.nix @@ -81,6 +81,10 @@ mountpoint = "/ext4onzfs"; }; }; + zfs_volume_no_content = { + type = "zfs_volume"; + size = "10M"; + }; zfs_encryptedvolume = { type = "zfs_volume"; size = "10M"; From c53bfaa13a8de4995b22f7ac13c4c34e46fb368a Mon Sep 17 00:00:00 2001 From: Leonie Marcy Vack Date: Thu, 16 Jan 2025 14:39:09 +0100 Subject: [PATCH 2/2] zfs_volume: fix eval of _unmount if content is null --- lib/types/zfs_volume.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/types/zfs_volume.nix b/lib/types/zfs_volume.nix index e4c1e90..cc76066 100644 --- a/lib/types/zfs_volume.nix +++ b/lib/types/zfs_volume.nix @@ -88,7 +88,7 @@ ${config.content._unmount.dev or ""} ''; - fs = config.content._unmount.fs; + fs = config.content._unmount.fs or {}; }; }; _config = lib.mkOption {