Skip to content

Commit a0f525b

Browse files
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 <bmg.avoin@gmail.com>
1 parent 63b914d commit a0f525b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nixos-modules/microvm/mounts.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ lib.mkIf config.microvm.guest.enable {
8787
upperdir = "${writableStoreOverlay}/store";
8888
workdir = "${writableStoreOverlay}/work";
8989
};
90-
options = lib.optional isRwStoreVirtiofsShare "userxattr";
90+
} // lib.optionalAttrs isRwStoreVirtiofsShare {
91+
options = [ "userxattr" ];
9192
};
9293
}
9394
) {

0 commit comments

Comments
 (0)