1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
{
config,
pkgs,
lib,
inputs,
...
}: let
cfg = config.features.gui.apps.librewolf;
in {
# After enabling this feature, make sure to enable the extensions in the menu button and give them private browsing access. Also make sure to enable dark theme and log into firefox sync account.
options.features.gui.apps.librewolf.enable = lib.mkEnableOption "librewolf";
config = lib.mkIf cfg.enable {
programs.librewolf = {
enable = true;
policies = {
# Copied from librewolf policies but don't remove google.
SearchEngines.Remove = [
"Bing"
"Amazon.com"
"eBay"
"Twitter"
"Perplexity"
];
};
settings = {
# UI Customizations
"browser.tabs.inTitlebar" = 0; # Use system window bar.
"browser.uiCustomization.state" = ''{"placements":{"widget-overflow-fixed-list":["privatebrowsing-button","bookmarks-menu-button","logins-button","print-button"],"unified-extensions-area":[],"nav-bar":["back-button","stop-reload-button","forward-button","vertical-spacer","urlbar-container","downloads-button","fxa-toolbar-menu-button","unified-extensions-button","ublock0_raymondhill_net-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","firefox-view-button","alltabs-button"],"vertical-tabs":[],"PersonalToolbar":["personal-bookmarks"]},"seen":["developer-button","screenshot-button","ublock0_raymondhill_net-browser-action"],"dirtyAreaCache":["nav-bar","vertical-tabs","toolbar-menubar","TabsToolbar","PersonalToolbar","widget-overflow-fixed-list"],"currentVersion":23,"newElementCount":4}''; # Organize toolbar.
# Themeing Options
# User Chrome and Content
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
# Required by simplefox theme
"layers.acceleration.force-enabled" = true;
"gfx.webrender.all" = true;
"svg.context-properties.content.enabled" = true;
# Don't automatically disable sideloaded extensions.
"extensions.autoDisableScopes" = 0;
# Passwords
"signon.rememberSignons" = true;
"signon.autofillForms" = true;
# Sync
"identity.fxaccounts.enabled" = true;
"identity.fxaccounts.account.device.name" = config.home.username;
"services.sync.username" = "lucaschapple@posteo.com";
"services.sync.engine.bookmarks" = true;
"services.sync.engine.history" = true;
"services.sync.engine.tabs" = false;
"services.sync.engine.passwords" = true;
"services.sync.engine.addresses" = true;
"services.sync.engine.creditcards" = true;
"services.sync.engine.addons" = false;
"services.sync.engine.prefs" = false;
# Enable WebGL
"webgl.disabled" = false;
};
profiles."default" = {
isDefault = true;
# userChrome = builtins.readFile ./theme/userChrome.css;
# userContent = builtins.readFile ./theme/userContent.css;
search = {
force = true;
default = "ddg";
# default = "g";
engines = {
nix-search = {
name = "Nix Search";
urls = [{ template = "https://mynixos.com/search?q={searchTerms}"; }];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@n" ];
};
};
};
extensions = {
force = true;
packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
youtube-shorts-block
sponsorblock
tab-stash
vimium-c
];
};
};
};
};
}
|