programs.khal: add "addresses" option + tidy up (#5221)
- Add `accounts.<calendar|contact>.accounts.<name>.khal.addresses` option to enable new configuration option, "addresses", from khal, which is used for showing participation status [1]. - Remove mistaken new line in khal implementation, refer to [2]. - Make additions to the existing test case to check the new addresses feature. And remove the empty lines in expected configs. [1]: https://khal.readthedocs.io/en/latest/configure.html#the-calendars-section [2]: https://github.com/nix-community/home-manager/pull/5192#pullrequestreview-1975091763
This commit is contained in:
parent
1ffd393cba
commit
782eed8bb6
4 changed files with 56 additions and 5 deletions
|
|
@ -31,5 +31,14 @@ with lib;
|
|||
Priority of a calendar used for coloring (calendar with highest priority is preferred).
|
||||
'';
|
||||
};
|
||||
|
||||
addresses = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Email addresses to be associated with this account. Used to check the
|
||||
participation status ("PARTSTAT"), refer to khal documentation.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,8 +45,10 @@ let
|
|||
+ (optionalString
|
||||
(value.khal.type == "birthdays" && value.khal ? thisCollection)
|
||||
value.khal.thisCollection)
|
||||
}\n "
|
||||
}"
|
||||
] ++ optional (value.khal.readOnly) "readonly = True"
|
||||
++ optional (value.khal.addresses != [ ])
|
||||
"addresses= ${lib.concatStringsSep ", " value.khal.addresses}"
|
||||
++ optional (value.khal.color != null) "color = '${value.khal.color}'"
|
||||
++ [ (toKeyValueIfDefined (getAttrs [ "type" "priority" ] value.khal)) ]
|
||||
++ [ "\n" ]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue