Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add experimental generic Firefox configuration to LibreWolf #12

Merged
merged 8 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion configs/home/bricked/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{pkgs, ...}: {
{
pkgs,
config,
...
}: {
home = {
username = "bricked";
homeDirectory = "/home/bricked";
Expand Down
71 changes: 36 additions & 35 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@

# Systems
home-manager = {
url = "github:nix-community/home-manager";
url = "github:brckd/home-manager/firefox/librewolf";
inputs.nixpkgs.follows = "nixpkgs";
};

Expand Down
1 change: 1 addition & 0 deletions modules/home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
./kitty
./nixvim
./lf
./firefox
./librewolf
./cava
./vesktop
Expand Down
55 changes: 55 additions & 0 deletions modules/home/firefox/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.programs.librewolf;
in {
config = mkIf cfg.enable {
programs.librewolf = {
profiles = {
default = {
name = "Default";
extensions = with config.nur.repos.rycee.firefox-addons; [
ublock-origin
bitwarden
darkreader
libredirect
];
search = {
default = "DuckDuckGo";
force = true;
engines = {
"Google".metaData.hidden = true;
"Bing".metaData.hidden = true;
};
};
bookmarks = [
{
name = "GitHub";
tags = ["git"];
keyword = "github";
url = "https://github.com/";
}
];
settings = {
"extensions.autoDisableScopes" = 0; # Enable extensions
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; # Enable userchrome
"browser.aboutConfig.showWarning" = false;

# Blank homepage
"browser.newtabpage.enable" = false;
"browser.startup.homepage" = "chrome://browser/content/blanktab.html";
"browser.toolbars.bookmarks.visibility" = "never";

# Toolbar customization
"browser.uiCustomization.state" = builtins.readFile ./toolbar.json;
};

userChrome = builtins.readFile ./userChrome.css;
};
};
};
};
}
38 changes: 38 additions & 0 deletions modules/home/firefox/toolbar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"placements": {
"widget-overflow-fixed-list": [],
"unified-extensions-area": [
"ublock0_raymondhill_net-browser-action",
"7esoorv3_alefvanoon_anonaddy_me-browser-action",
"addon_darkreader_org-browser-action"
],
"nav-bar": [
"back-button",
"forward-button",
"urlbar-container",
"downloads-button",
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action",
"unified-extensions-button"
],
"toolbar-menubar": ["menubar-items"],
"TabsToolbar": ["tabbrowser-tabs", "alltabs-button"],
"PersonalToolbar": ["import-button", "personal-bookmarks"]
},
"seen": [
"save-to-pocket-button",
"7esoorv3_alefvanoon_anonaddy_me-browser-action",
"addon_darkreader_org-browser-action",
"ublock0_raymondhill_net-browser-action",
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action",
"developer-button"
],
"dirtyAreaCache": [
"unified-extensions-area",
"nav-bar",
"PersonalToolbar",
"toolbar-menubar",
"TabsToolbar"
],
"currentVersion": 20,
"newElementCount": 7
}
7 changes: 7 additions & 0 deletions modules/home/firefox/userChrome.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

#back-button,
#forward-button,
#alltabs-button {
display: none !important;
}
1 change: 0 additions & 1 deletion modules/home/librewolf/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
config,
pkgs,
lib,
...
}:
Expand Down
Loading