Add librewolf module configuration
This commit is contained in:
parent
4ca1688434
commit
58c42ed7d8
4 changed files with 127 additions and 10 deletions
|
|
@ -2,6 +2,7 @@
|
|||
lib,
|
||||
config,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.mods.browser.librewolf = {
|
||||
|
|
@ -11,18 +12,79 @@
|
|||
type = lib.types.bool;
|
||||
description = "Enables the librwolf browser";
|
||||
};
|
||||
settings = lib.mkOption {
|
||||
default = {};
|
||||
configuration = lib.mkOption {
|
||||
default = {
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
DisablePocket = true;
|
||||
DisplayBookmarksToolbar = "never";
|
||||
DisplayMenuBar = "default-off";
|
||||
CaptivePortal = false;
|
||||
DisableFirefoxStudies = true;
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxAccounts = false;
|
||||
NoDefaultBookmarks = true;
|
||||
OfferToSaveLogins = false;
|
||||
OfferToSaveLoginsDefault = false;
|
||||
PasswordManagerEnabled = false;
|
||||
FirefoxHome = {
|
||||
Search = true;
|
||||
Pocket = false;
|
||||
Snippets = false;
|
||||
TopSites = true;
|
||||
Highlights = false;
|
||||
};
|
||||
UserMessaging = {
|
||||
ExtensionRecommendations = false;
|
||||
SkipOnboarding = true;
|
||||
};
|
||||
};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "librewolf settings";
|
||||
description = "Librewolf policy configuration. See https://mozilla.github.io/policy-templates/ for more information.";
|
||||
};
|
||||
profiles = lib.mkOption {
|
||||
default = [
|
||||
{
|
||||
name = "${config.conf.username}";
|
||||
value = {
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "special";
|
||||
value = {
|
||||
isDefault = false;
|
||||
id = 1;
|
||||
};
|
||||
}
|
||||
];
|
||||
example = [
|
||||
{
|
||||
name = "custom";
|
||||
value = {
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader];
|
||||
};
|
||||
}
|
||||
];
|
||||
type = with lib.types; listOf (attrsOf anything);
|
||||
description = "Librewolf profiles";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.browser.librewolf.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.librewolf = {
|
||||
programs.librewolf-dashnix = {
|
||||
enable = true;
|
||||
settings = config.mods.browser.librewolf.settings;
|
||||
package = pkgs.librewolf;
|
||||
policies = config.mods.browser.librewolf.configuration;
|
||||
profiles = builtins.listToAttrs config.mods.browser.librewolf.profiles;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue