move Firefox into its own module and fix extensions
This commit is contained in:
parent
90442596c6
commit
d3e9b0c896
25
home.nix
25
home.nix
@ -5,6 +5,7 @@ with lib.hm.gvariant;
|
|||||||
imports = [
|
imports = [
|
||||||
./modules/dconf.nix
|
./modules/dconf.nix
|
||||||
./modules/shell.nix
|
./modules/shell.nix
|
||||||
|
./modules/firefox.nix
|
||||||
];
|
];
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
# paths it should manage.
|
# paths it should manage.
|
||||||
@ -90,30 +91,6 @@ with lib.hm.gvariant;
|
|||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
profiles = {
|
|
||||||
default = {
|
|
||||||
id = 0;
|
|
||||||
name = "default";
|
|
||||||
isDefault = true;
|
|
||||||
settings = {
|
|
||||||
"browser.startup.homepage" = "https://search.marq42.xyz";
|
|
||||||
"browser.search.defaultenginename" = "searx";
|
|
||||||
"borwser.search.order.1" = "searx";
|
|
||||||
};
|
|
||||||
search = {
|
|
||||||
force = true;
|
|
||||||
default = "searx";
|
|
||||||
order = [ "searx" "Google" ];
|
|
||||||
};
|
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
||||||
ublock-origin
|
|
||||||
vimium
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# programs.gdb = {
|
# programs.gdb = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# };
|
# };
|
||||||
|
72
modules/firefox.nix
Normal file
72
modules/firefox.nix
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
{ lib, config, pkgs, nur, inputs, ... }:
|
||||||
|
|
||||||
|
# very good info in https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265
|
||||||
|
# most of this file is pasted from that thread
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||||
|
extraPolicies = {
|
||||||
|
DisableTelemetry = true;
|
||||||
|
# add policies here...
|
||||||
|
|
||||||
|
/* ---- PREFERENCES ---- */
|
||||||
|
# Set preferences shared by all profiles.
|
||||||
|
Preferences = {
|
||||||
|
"browser.contentblocking.category" = { Value = "strict"; Status = "locked"; };
|
||||||
|
# add global preferences here...
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
policies = {
|
||||||
|
ExtensionSettings = with builtins;
|
||||||
|
let extension = shortId: uuid: {
|
||||||
|
name = uuid;
|
||||||
|
value = {
|
||||||
|
install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
||||||
|
installation_mode = "normal_installed";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in listToAttrs [
|
||||||
|
(extension "tree-style-tab" "treestyletab@piro.sakura.ne.jp")
|
||||||
|
(extension "ublock-origin" "uBlock0@raymondhill.net")
|
||||||
|
# (extension "bitwarden-password-manager" "{446900e4-71c2-419f-a6a7-df9c091e268b}")
|
||||||
|
# (extension "tabliss" "extension@tabliss.io")
|
||||||
|
# (extension "umatrix" "uMatrix@raymondhill.net")
|
||||||
|
# (extension "libredirect" "7esoorv3@alefvanoon.anonaddy.me")
|
||||||
|
(extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}")
|
||||||
|
(extension "mark-my-search" "{3c87dcad-dbbd-4be1-b07b-b6d0739b0aec}")
|
||||||
|
];
|
||||||
|
# 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, download the XPI by filling it in to the install_url template, unzip it,
|
||||||
|
# run `jq .browser_specific_settings.gecko.id manifest.json` or
|
||||||
|
# `jq .applications.gecko.id manifest.json` to get the UUID
|
||||||
|
# mir note: or just go to about:debugging#/runtime/this-firefox
|
||||||
|
};
|
||||||
|
|
||||||
|
profiles = {
|
||||||
|
default = {
|
||||||
|
id = 0;
|
||||||
|
name = "default";
|
||||||
|
isDefault = true;
|
||||||
|
settings = {
|
||||||
|
"browser.startup.homepage" = "https://search.marq42.xyz";
|
||||||
|
"browser.search.defaultenginename" = "searx";
|
||||||
|
"browser.search.order.1" = "searx";
|
||||||
|
};
|
||||||
|
search = {
|
||||||
|
force = true;
|
||||||
|
default = "searx";
|
||||||
|
order = [ "searx" "Google" ];
|
||||||
|
};
|
||||||
|
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
|
# ublock-origin
|
||||||
|
# vimium
|
||||||
|
# mark-my-search
|
||||||
|
# ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user