firefox: legacyUserProfileCustomizations when userChrome is present
When a user configures the userChrome option, automatically enable the `toolkit.legacyUserProfileCustomizations.stylesheets` preference with `mkDefault` priority so that the user chrome CSS is actually loaded. The user can still override this in the settings option if needed.
This commit is contained in:
parent
3a70e333f2
commit
3b3ff17621
2 changed files with 18 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ let
|
|||
length
|
||||
literalExpression
|
||||
mapAttrsToList
|
||||
mkDefault
|
||||
mkIf
|
||||
mkMerge
|
||||
mkOption
|
||||
|
|
@ -884,6 +885,10 @@ in
|
|||
};
|
||||
|
||||
config = {
|
||||
settings = mkIf (config.userChrome != "") {
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = mkDefault true;
|
||||
};
|
||||
|
||||
assertions = [
|
||||
(mkNoDuplicateAssertion config.containers "container")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@ in
|
|||
id = 4;
|
||||
userChrome = pkgs.writeText "userChrome.css" (builtins.readFile ./chrome/userChrome.css);
|
||||
};
|
||||
legacyUserPrCuSt-Disabled = {
|
||||
id = 5;
|
||||
userChrome = pkgs.writeText "userChrome.css" (builtins.readFile ./chrome/userChrome.css);
|
||||
settings."toolkit.legacyUserProfileCustomizations.stylesheets" = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
// {
|
||||
|
|
@ -62,6 +67,14 @@ in
|
|||
assertFileContent \
|
||||
"home-files/${cfg.profilesPath}/derivation-file/chrome/userChrome.css" \
|
||||
${./chrome/userChrome.css}
|
||||
|
||||
assertFileContains \
|
||||
"home-files/${cfg.profilesPath}/lines/user.js" \
|
||||
'user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);'
|
||||
|
||||
assertFileContains \
|
||||
"home-files/${cfg.profilesPath}/legacyUserPrCuSt-Disabled/user.js" \
|
||||
'user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", false);'
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue