diff --git a/modules/misc/xfconf.nix b/modules/misc/xfconf.nix index ab21a66b3..f9858c5fa 100644 --- a/modules/misc/xfconf.nix +++ b/modules/misc/xfconf.nix @@ -76,7 +76,7 @@ in { settings = mkOption { type = with types; # xfIntVariant must come AFTER str; otherwise strings are treated as submodule imports... - let value = oneOf [ bool int float str xfIntVariant ]; + let value = nullOr (oneOf [ bool int float str xfIntVariant ]); in attrsOf (attrsOf (either value (listOf value))) // { description = "xfconf settings"; }; @@ -108,8 +108,11 @@ in { mkCommand = channel: property: value: '' $DRY_RUN_CMD ${pkgs.xfce.xfconf}/bin/xfconf-query \ ${ - escapeShellArgs - ([ "-n" "-c" channel "-p" "/${property}" ] ++ withType value) + escapeShellArgs ([ "-c" channel "-p" "/${property}" ] + ++ (if value == null then + [ "-r" ] + else + [ "-n" ] ++ withType value)) } '';