Skip to content

Commit a0311e0

Browse files
fix(writableStoreOverlay): append dont clear
lib.optional returns the empty set [] when a check is false. In this case it causes the options to be set to an empty list which the module does not allow. So append the new options if true, and append [] when false. Signed-off-by: Brian McGillion <bmg.avoin@gmail.com>
1 parent 63b914d commit a0311e0

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 = lib.mkAfter [ "userxattr" ];
9192
};
9293
}
9394
) {

0 commit comments

Comments
 (0)