83 lines
2.5 KiB
Nix
83 lines
2.5 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
inputs,
|
|
...
|
|
}:
|
|
let
|
|
extension = shortId: guid: {
|
|
name = guid;
|
|
value = {
|
|
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
|
installation_mode = "normal_installed";
|
|
};
|
|
};
|
|
|
|
prefs = {
|
|
# Check these out at about:config
|
|
"extensions.autoDisableScopes" = 0;
|
|
"extensions.pocket.enabled" = false;
|
|
"general.autoScroll" = true;
|
|
"general.smoothScroll" = true;
|
|
"middlemouse.contentLoadURL" = false;
|
|
# ...
|
|
};
|
|
|
|
extensions = [
|
|
# To add additional extensions, find it on addons.mozilla.org, find
|
|
# the short ID in the url (like https://addons.mozilla.org/en-US/firefox/addon/!SHORT_ID!/)
|
|
# Then go to https://addons.mozilla.org/api/v5/addons/addon/!SHORT_ID!/ to get the guid
|
|
(extension "adnauseam" "adnauseam@rednoise.org")
|
|
(extension "floccus" "floccus@handmadeideas.org")
|
|
(extension "bitwarden-password-manager" "{446900e4-71c2-419f-a6a7-df9c091e268b}")
|
|
(extension "simplelogin" "addon@simplelogin")
|
|
(extension "localcdn-fork-of-decentraleyes" "{b86e4813-687a-43e6-ab65-0bde4ab75758}")
|
|
(extension "catppuccin-web-file-icons" "{bbb880ce-43c9-47ae-b746-c3e0096c5b76}")
|
|
(extension "peertube-companion" "peertube-companion@booteille")
|
|
(extension "peertubeify" "{01175c8e-4506-4263-bad9-d3ddfd4f5a5f}")
|
|
(extension "peertube-picks" "{937c0767-0608-41e2-917a-8bf06601275a}")
|
|
# ...
|
|
];
|
|
|
|
in
|
|
|
|
{
|
|
options = {
|
|
internet.browsers = {
|
|
zen-browser = {
|
|
enable = lib.mkEnableOption "enable zen-browser";
|
|
};
|
|
};
|
|
};
|
|
config = lib.mkIf config.internet.browsers.zen-browser.enable {
|
|
home.packages = [
|
|
(pkgs.wrapFirefox
|
|
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped
|
|
{
|
|
extraPrefs = lib.concatLines (
|
|
lib.mapAttrsToList (
|
|
name: value: ''lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});''
|
|
) prefs
|
|
);
|
|
extraPolicies = {
|
|
DisableTelemetry = true;
|
|
ExtensionSettings = builtins.listToAttrs extensions;
|
|
|
|
SearchEngines = {
|
|
Default = "MartyTF's Series of Tubes";
|
|
Add = [
|
|
{
|
|
Name = "MartyTF's Series of Tubes";
|
|
URLTemplate = "https://search.marty.tf/?q={searchTerms}";
|
|
IconURL = "https://wiki.nixos.org/favicon.ico";
|
|
Alias = "@sgx";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|
|
)
|
|
];
|
|
};
|
|
}
|