Add zen and librewolf configuration
This commit is contained in:
parent
dc83628ac9
commit
1886700857
10 changed files with 219 additions and 62 deletions
|
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
imports = [
|
||||
./firefox.nix
|
||||
./zen.nix
|
||||
./chromium.nix
|
||||
./brave.nix
|
||||
./chromium.nix
|
||||
./firefox.nix
|
||||
./librewolf.nix
|
||||
./zen.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
value = {
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
extensions.packages = [ pkgs.nur.repos.rycee.firefox-addons.darkreader ];
|
||||
extensions.packages = [pkgs.nur.repos.rycee.firefox-addons.darkreader];
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
|
|||
25
modules/programs/browser/foxwrappers.nix
Normal file
25
modules/programs/browser/foxwrappers.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{inputs, ...}: let
|
||||
mkFirefoxModule = import "${inputs.home-manager.outPath}/modules/programs/firefox/mkFirefoxModule.nix";
|
||||
in {
|
||||
imports = [
|
||||
(mkFirefoxModule {
|
||||
modulePath = [
|
||||
"programs"
|
||||
"zen-browser"
|
||||
];
|
||||
name = "Zen Browser";
|
||||
wrappedPackageName = "zen-browser-unwrapped";
|
||||
unwrappedPackageName = "zen-browser";
|
||||
visible = true;
|
||||
platforms = {
|
||||
linux = {
|
||||
vendorPath = ".zen";
|
||||
configPath = ".zen";
|
||||
};
|
||||
darwin = {
|
||||
configPath = "Library/Application Support/Zen";
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
29
modules/programs/browser/librewolf.nix
Normal file
29
modules/programs/browser/librewolf.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}: {
|
||||
options.mods.browser.librewolf = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables the librwolf browser";
|
||||
};
|
||||
settings = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "librewolf settings";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.browser.librewolf.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
settings = config.mods.browser.librewolf.settings;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
lib,
|
||||
config,
|
||||
options,
|
||||
system,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.mods.browser.zen = {
|
||||
|
|
@ -13,11 +13,99 @@
|
|||
type = lib.types.bool;
|
||||
description = "Enables the zen browser";
|
||||
};
|
||||
# TODO configure zen
|
||||
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 = "Zen 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 = "Zen profiles";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.browser.zen.enable (
|
||||
lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = [inputs.zen-browser.packages."${system}".default];
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
package =
|
||||
pkgs.wrapFirefox
|
||||
(inputs.zen-browser.packages.${pkgs.system}.default.overrideAttrs (prevAttrs: {
|
||||
passthru =
|
||||
prevAttrs.passthru
|
||||
or {}
|
||||
// {
|
||||
applicationName = "Zen Browser";
|
||||
binaryName = "zen";
|
||||
|
||||
ffmpegSupport = true;
|
||||
gssSupport = true;
|
||||
gtk3 = pkgs.gtk3;
|
||||
};
|
||||
}))
|
||||
{
|
||||
icon = "zen-beta";
|
||||
wmClass = "zen";
|
||||
hasMozSystemDirPatch = false;
|
||||
};
|
||||
policies = config.mods.browser.zen.configuration;
|
||||
profiles = builtins.listToAttrs config.mods.browser.zen.profiles;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue