xfconf: remove properties with null values (#4192)
Co-authored-by: Paul Stadig <paul@thoughtfull.systems>
This commit is contained in:
parent
8c66b46a86
commit
c24deeca64
|
@ -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))
|
||||
}
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue