1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-22 18:29:39 +01:00

thunderbird: add profileVersion

Similar to what we did for firefox for darwin support.
This commit is contained in:
Austin Horstman 2024-12-19 09:29:18 -06:00 committed by GitHub
parent 83ecd50915
commit 832920a608
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,7 +32,8 @@ let
profilesIni = foldl recursiveUpdate { profilesIni = foldl recursiveUpdate {
General = { General = {
StartWithLastProfile = 1; StartWithLastProfile = 1;
Version = 2; } // lib.optionalAttrs (cfg.profileVersion != null) {
Version = cfg.profileVersion;
}; };
} (flip map profilesWithId (profile: { } (flip map profilesWithId (profile: {
"Profile${profile.id}" = { "Profile${profile.id}" = {
@ -145,6 +146,13 @@ in {
description = "The Thunderbird package to use."; description = "The Thunderbird package to use.";
}; };
profileVersion = mkOption {
internal = true;
type = types.nullOr types.ints.unsigned;
default = if isDarwin then null else 2;
description = "profile version, set null for nix-darwin";
};
profiles = mkOption { profiles = mkOption {
type = with types; type = with types;
attrsOf (submodule ({ config, name, ... }: { attrsOf (submodule ({ config, name, ... }: {
@ -360,13 +368,6 @@ in {
this module to manage your accounts and profiles by setting this module to manage your accounts and profiles by setting
'programs.thunderbird.package' to a dummy value, for example using 'programs.thunderbird.package' to a dummy value, for example using
'pkgs.runCommand'. 'pkgs.runCommand'.
Note that this module requires you to set the following environment
variables when using an installation of Thunderbird that is not provided
by Nix:
export MOZ_LEGACY_PROFILES=1
export MOZ_ALLOW_DOWNGRADE=1
''; '';
home.packages = [ cfg.package ] home.packages = [ cfg.package ]