4 cfg = config.programs.fuse;
6 meta.maintainers = with lib.maintainers; [ primeos ];
8 options.programs.fuse = {
9 mountMax = lib.mkOption {
10 # In the C code it's an "int" (i.e. signed and at least 16 bit), but
11 # negative numbers obviously make no sense:
12 type = lib.types.ints.between 0 32767; # 2^15 - 1
15 Set the maximum number of FUSE mounts allowed to non-root users.
19 userAllowOther = lib.mkOption {
20 type = lib.types.bool;
23 Allow non-root users to specify the allow_other or allow_root mount
24 options, see mount.fuse3(8).
30 environment.etc."fuse.conf".text = ''
31 ${lib.optionalString (!cfg.userAllowOther) "#"}user_allow_other
32 mount_max = ${builtins.toString cfg.mountMax}