From 8730a02b291d27dbdb31ed886d60b48d429e417c Mon Sep 17 00:00:00 2001 From: Brian McGillion Date: Sun, 7 Dec 2025 09:02:44 +0400 Subject: [PATCH] fix: Set overlay options when needed lib.optional returns the empty set [] when a check is false. In the default state this causes the options to be set to an empty list which the module does not allow. So append the new options only if isRwStoreVirtiofsShare is true. Signed-off-by: Brian McGillion --- nixos-modules/microvm/mounts.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos-modules/microvm/mounts.nix b/nixos-modules/microvm/mounts.nix index ff5e55e2..6fcd5be2 100644 --- a/nixos-modules/microvm/mounts.nix +++ b/nixos-modules/microvm/mounts.nix @@ -87,7 +87,7 @@ lib.mkIf config.microvm.guest.enable { upperdir = "${writableStoreOverlay}/store"; workdir = "${writableStoreOverlay}/work"; }; - options = lib.optional isRwStoreVirtiofsShare "userxattr"; + options = lib.mkIf isRwStoreVirtiofsShare [ "userxattr" ]; }; } ) {