mirror of
https://github.com/nix-community/home-manager
synced 2024-11-25 14:10:29 +00:00
thunderbird: change settings type to json
Uses the JSON type, just like the Firefox module, so that nested sets can be used.
This commit is contained in:
parent
4a4a8b1454
commit
4974dfb26e
3 changed files with 22 additions and 3 deletions
|
@ -7,6 +7,11 @@ let
|
||||||
|
|
||||||
cfg = config.programs.thunderbird;
|
cfg = config.programs.thunderbird;
|
||||||
|
|
||||||
|
thunderbirdJson = types.attrsOf (pkgs.formats.json { }).type // {
|
||||||
|
description =
|
||||||
|
"Thunderbird preference (int, bool, string, and also attrs, list, float as a JSON string)";
|
||||||
|
};
|
||||||
|
|
||||||
enabledAccounts = attrValues
|
enabledAccounts = attrValues
|
||||||
(filterAttrs (_: a: a.thunderbird.enable) config.accounts.email.accounts);
|
(filterAttrs (_: a: a.thunderbird.enable) config.accounts.email.accounts);
|
||||||
|
|
||||||
|
@ -161,11 +166,21 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = with types; attrsOf (oneOf [ bool int str ]);
|
type = thunderbirdJson;
|
||||||
default = { };
|
default = { };
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
"mail.spellcheck.inline" = false;
|
"mail.spellcheck.inline" = false;
|
||||||
|
"mailnews.database.global.views.global.columns" = {
|
||||||
|
selectCol = {
|
||||||
|
visible = false;
|
||||||
|
ordinal = 1;
|
||||||
|
};
|
||||||
|
threadCol = {
|
||||||
|
visible = true;
|
||||||
|
ordinal = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -216,7 +231,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = with types; attrsOf (oneOf [ bool int str ]);
|
type = thunderbirdJson;
|
||||||
default = { };
|
default = { };
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,6 +28,7 @@ user_pref("mail.smtpserver.smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da
|
||||||
user_pref("mail.smtpserver.smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.username", "home.manager.jr");
|
user_pref("mail.smtpserver.smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc.username", "home.manager.jr");
|
||||||
user_pref("mail.smtpservers", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc");
|
user_pref("mail.smtpservers", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc");
|
||||||
user_pref("privacy.donottrackheader.enabled", true);
|
user_pref("privacy.donottrackheader.enabled", true);
|
||||||
|
user_pref("second", {"nested":{"evenFurtherNested":[1,2,3]}});
|
||||||
user_pref("second.setting", "some-test-setting");
|
user_pref("second.setting", "some-test-setting");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,10 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
second.settings = { "second.setting" = "some-test-setting"; };
|
second.settings = {
|
||||||
|
"second.setting" = "some-test-setting";
|
||||||
|
second.nested.evenFurtherNested = [ 1 2 3 ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
|
Loading…
Reference in a new issue