1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 03:29:45 +01:00

thunderbird: add extraConfig option

The added extraConfig option allowes users to insert custom text at
the end of the generated profile `user.js` file. This allows the users
to import templates as part of their configuration.
This commit is contained in:
VwCSXg 2023-04-04 23:37:41 +02:00 committed by Robert Helgesson
parent e17e5e4f48
commit 6db559daa9
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
4 changed files with 18 additions and 2 deletions

View file

@ -94,12 +94,13 @@ let
"mail.smtp.defaultserver" = "smtp_${id}";
} // account.thunderbird.settings id;
mkUserJs = prefs: ''
mkUserJs = prefs: extraPrefs: ''
// Generated by Home Manager.
${concatStrings (mapAttrsToList (name: value: ''
user_pref("${name}", ${builtins.toJSON value});
'') prefs)}
${extraPrefs}
'';
in {
meta.maintainers = with hm.maintainers; [ d-dervishi jkarlson ];
@ -179,6 +180,14 @@ in {
*{scrollbar-width:none !important}
'';
};
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra preferences to add to <filename>user.js</filename>.
'';
};
};
}));
};
@ -327,7 +336,8 @@ in {
{ "mail.openpgp.allow_external_gnupg" = profile.withExternalGnupg; }
profile.settings
] ++ (map (a: toThunderbirdAccount a profile) accounts)));
] ++ (map (a: toThunderbirdAccount a profile) accounts)))
profile.extraConfig;
};
}));
};

View file

@ -59,3 +59,5 @@ user_pref("mail.smtpserver.smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfa
user_pref("mail.smtpservers", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc,smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f");
user_pref("privacy.donottrackheader.enabled", true);
user_pref("mail.html_compose", false);

View file

@ -29,3 +29,4 @@ user_pref("mail.smtpservers", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d9938
user_pref("privacy.donottrackheader.enabled", true);
user_pref("second.setting", "some-test-setting");

View file

@ -41,6 +41,9 @@
userContent = ''
* { color: red !important; }
'';
extraConfig = ''
user_pref("mail.html_compose", false);
'';
};
second.settings = { "second.setting" = "some-test-setting"; };