Add librewolf module configuration
This commit is contained in:
parent
4ca1688434
commit
58c42ed7d8
4 changed files with 127 additions and 10 deletions
|
|
@ -22,5 +22,22 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
(mkFirefoxModule {
|
||||||
|
modulePath = [
|
||||||
|
"programs"
|
||||||
|
"librewolf-dashnix"
|
||||||
|
];
|
||||||
|
name = "LibreWolf";
|
||||||
|
description = "LibreWolf is a privacy enhanced Firefox fork.";
|
||||||
|
wrappedPackageName = "librewolf";
|
||||||
|
unwrappedPackageName = "librewolf-unwrapped";
|
||||||
|
|
||||||
|
platforms.linux = {configPath = ".librewolf";};
|
||||||
|
platforms.darwin = {
|
||||||
|
configPath = "Library/Application Support/LibreWolf";
|
||||||
|
};
|
||||||
|
|
||||||
|
enableBookmarks = false;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
options,
|
options,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options.mods.browser.librewolf = {
|
options.mods.browser.librewolf = {
|
||||||
|
|
@ -11,18 +12,79 @@
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
description = "Enables the librwolf browser";
|
description = "Enables the librwolf browser";
|
||||||
};
|
};
|
||||||
settings = lib.mkOption {
|
configuration = lib.mkOption {
|
||||||
default = {};
|
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 = {};
|
example = {};
|
||||||
type = with lib.types; attrsOf anything;
|
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 (
|
config = lib.mkIf config.mods.browser.librewolf.enable (
|
||||||
lib.optionalAttrs (options ? home.packages) {
|
lib.optionalAttrs (options ? home.packages) {
|
||||||
programs.librewolf = {
|
programs.librewolf-dashnix = {
|
||||||
enable = true;
|
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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -46,13 +46,37 @@
|
||||||
};
|
};
|
||||||
example = {};
|
example = {};
|
||||||
type = with lib.types; attrsOf anything;
|
type = with lib.types; attrsOf anything;
|
||||||
description = "Zen policy configuration. See https://mozilla.github.io/policy-templates/ for more information.";
|
description = "Zen policy configuration. See https://mozilla.github.io/policy-templates for more information.";
|
||||||
};
|
};
|
||||||
profiles = lib.mkOption {
|
profiles = lib.mkOption {
|
||||||
default = [
|
default = let
|
||||||
|
extensions = [
|
||||||
|
pkgs.nur.repos.rycee.firefox-addons.darkreader
|
||||||
|
pkgs.nur.repos.rycee.firefox-addons.ublock-origin
|
||||||
|
pkgs.nur.repos.rycee.firefox-addons.ghostery
|
||||||
|
pkgs.nur.repos.rycee.firefox-addons.canvasblocker
|
||||||
|
pkgs.nur.repos.rycee.firefox-addons.i-dont-care-about-cookies
|
||||||
|
pkgs.nur.repos.rycee.firefox-addons.keepassxc-browser
|
||||||
|
pkgs.nur.repos.rycee.firefox-addons.vimium
|
||||||
|
pkgs.nur.repos.rycee.firefox-addons.react-devtools
|
||||||
|
pkgs.nur.repos.rycee.firefox-addons.reduxdevtools
|
||||||
|
pkgs.nur.repos.rycee.firefox-addons.user-agent-string-switcher
|
||||||
|
pkgs.nur.repos.rycee.firefox-addons.private-relay
|
||||||
|
];
|
||||||
|
in [
|
||||||
{
|
{
|
||||||
name = "${config.conf.username}";
|
name = "${config.conf.username}";
|
||||||
value = {
|
value = {
|
||||||
|
settings = {
|
||||||
|
zen.view.compact.hide-tabbar = false;
|
||||||
|
zen.view.compact.hide-toolbar = true;
|
||||||
|
zen.view.sidebar-expanded = false;
|
||||||
|
zen.view.use-single-toolbar = false;
|
||||||
|
zen.view.welcome-screen.seen = true;
|
||||||
|
zen.theme.accent-color = "#b4bbff";
|
||||||
|
extensions.autoDisableScopes = 0;
|
||||||
|
};
|
||||||
|
extensions.packages = extensions;
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
id = 0;
|
id = 0;
|
||||||
};
|
};
|
||||||
|
|
@ -60,6 +84,16 @@
|
||||||
{
|
{
|
||||||
name = "special";
|
name = "special";
|
||||||
value = {
|
value = {
|
||||||
|
settings = {
|
||||||
|
zen.view.compact.hide-tabbar = false;
|
||||||
|
zen.view.compact.hide-toolbar = true;
|
||||||
|
zen.view.sidebar-expanded = false;
|
||||||
|
zen.view.use-single-toolbar = false;
|
||||||
|
zen.view.welcome-screen.seen = true;
|
||||||
|
zen.theme.accent-color = "#b4bbff";
|
||||||
|
extensions.autoDisableScopes = 0;
|
||||||
|
};
|
||||||
|
extensions.packages = extensions;
|
||||||
isDefault = false;
|
isDefault = false;
|
||||||
id = 1;
|
id = 1;
|
||||||
};
|
};
|
||||||
|
|
@ -69,9 +103,12 @@
|
||||||
{
|
{
|
||||||
name = "custom";
|
name = "custom";
|
||||||
value = {
|
value = {
|
||||||
|
settings = {
|
||||||
|
extensions.autoDisableScopes = 0;
|
||||||
|
};
|
||||||
|
extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader];
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
id = 0;
|
id = 0;
|
||||||
extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -161,9 +161,10 @@ in {
|
||||||
}
|
}
|
||||||
else if config.mods.homePackages.browser == "librewolf"
|
else if config.mods.homePackages.browser == "librewolf"
|
||||||
then {
|
then {
|
||||||
librewolf = {
|
librewolf-dashnix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = config.mods.browser.librewolf.settings;
|
policies = config.mods.browser.librewolf.configuration;
|
||||||
|
profiles = builtins.listToAttrs config.mods.browser.librewolf.profiles;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {}
|
else {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue