Re-enable firefox as default browser

Keep chromium installed for PWA support
This commit is contained in:
Evie Litherland-Smith 2023-11-24 08:44:12 +00:00
parent 8a3e7c7ced
commit 6e03df701f
7 changed files with 19 additions and 43 deletions

View file

@ -29,6 +29,7 @@
./home/alacritty.nix ./home/alacritty.nix
./home/btop.nix ./home/btop.nix
./home/default.nix ./home/default.nix
./home/firefox.nix
./home/media.nix ./home/media.nix
./home/pass.nix ./home/pass.nix
]; ];

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { { pkgs, ... }: {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = null; # Use system Firefox package = null; # Use system Firefox
@ -7,7 +7,7 @@
"app.shield.optoutstudies.enabled" = false; "app.shield.optoutstudies.enabled" = false;
"browser.bookmarks.addedImportButton" = false; "browser.bookmarks.addedImportButton" = false;
"browser.bookmarks.showMobileBookmarks" = false; "browser.bookmarks.showMobileBookmarks" = false;
"browser.toolbars.bookmarks.visibility" = "always"; "browser.toolbars.bookmarks.visibility" = "newtab";
"browser.contentblocking.category" = "strict"; "browser.contentblocking.category" = "strict";
"browser.search.region" = "GB"; "browser.search.region" = "GB";
"browser.search.isUS" = false; "browser.search.isUS" = false;

View file

@ -179,7 +179,7 @@ in ''
bind = SUPER, W, moveworkspacetomonitor, name:web current bind = SUPER, W, moveworkspacetomonitor, name:web current
bind = SUPER, W, workspace, name:web bind = SUPER, W, workspace, name:web
bind = SUPER SHIFT, W, movetoworkspace, name:web bind = SUPER SHIFT, W, movetoworkspace, name:web
windowrule = workspace name:web, (chromium-browser) bind = SUPER ALT, W, exec, [workspace name:web] firefox
bind = SUPER, T, moveworkspacetomonitor, name:top current bind = SUPER, T, moveworkspacetomonitor, name:top current
bind = SUPER, T, workspace, name:top bind = SUPER, T, workspace, name:top

View file

@ -37,7 +37,7 @@
"5" = "󰫇"; "5" = "󰫇";
"6" = "󰫈"; "6" = "󰫈";
"emacs" = ""; "emacs" = "";
"web" = ""; "web" = "󰈹";
"discord" = "󰙯"; "discord" = "󰙯";
"steam" = "󰓓"; "steam" = "󰓓";
"apps" = "󰜫"; "apps" = "󰜫";

View file

@ -1,7 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ chromium ];
programs.chromium = rec { programs.chromium = rec {
enable = true; enable = true;
defaultSearchProviderEnabled = true; defaultSearchProviderEnabled = true;
@ -9,12 +8,10 @@
defaultSearchProviderSuggestURL = defaultSearchProviderSearchURL; defaultSearchProviderSuggestURL = defaultSearchProviderSearchURL;
extensions = [ extensions = [
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin "cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin
"dphilobhebphkdjbpfohgikllaljmgbn" # SimpleLogin
"fnaicdffflnofjppbagibeoednhnbjhg" # floccus bookmarks sync
]; ];
extraOpts = { extraOpts = {
"BrowserSignin" = 0; "BrowserSignin" = 0;
"DefaultBrowserSettingEnabled" = true; "DefaultBrowserSettingEnabled" = false;
"DeviceAutoUpdateDisabled" = true; "DeviceAutoUpdateDisabled" = true;
"SyncDisabled" = true; "SyncDisabled" = true;
"PasswordManagerEnabled" = false; "PasswordManagerEnabled" = false;

View file

@ -1,7 +1,7 @@
{ config, pkgs, user, ... }: { config, pkgs, user, ... }:
{ {
imports = [ ./default.nix ./chromium.nix ]; imports = [ ./default.nix ./firefox.nix ./chromium.nix ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
dex dex
mesa mesa

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { ... }:
{ {
programs.firefox = { programs.firefox = {
@ -14,7 +14,7 @@
DisableSetDesktopBackground = true; DisableSetDesktopBackground = true;
DisableSystemAddonUpdate = true; DisableSystemAddonUpdate = true;
DisableTelemetry = true; DisableTelemetry = true;
DisplayBookmarksToolbar = "always"; DisplayBookmarksToolbar = "newtab";
DisplayMenuBar = "default-off"; DisplayMenuBar = "default-off";
EnableTrackingProtection = { EnableTrackingProtection = {
Value = true; Value = true;
@ -53,10 +53,17 @@
"https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi"; "https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi";
}; };
"floccus@handmadeideas.org" = { "floccus@handmadeideas.org" = {
installation_mode = "normal_installed"; # floccus bookmarks sync
installation_mode = "force_installed";
install_url = install_url =
"https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi"; "https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi";
}; };
"addon@simplelogin" = {
# SimpleLogin
installation_mode = "force_installed";
install_url =
"https://addons.mozilla.org/firefox/downloads/latest/simplelogin/latest.xpi";
};
}; };
FirefoxHome = { FirefoxHome = {
Search = true; Search = true;
@ -68,29 +75,8 @@
Snippets = false; Snippets = false;
Locked = true; Locked = true;
}; };
HomePage = {
URL = "https://nixos.org";
StartPage = "homepage-locked";
};
ManagedBookmarks = [ ManagedBookmarks = [
{ toplevel_name = "Managed Bookmarks"; } { toplevel_name = "Managed Bookmarks"; }
{
name = "Pinned Tabs";
children = [
{
name = "ntfy.sh";
url = "https://ntfy.xenia.me.uk/";
}
{
name = "WhatsApp Web";
url = "https://web.whatsapp.com/";
}
{
name = "Discord";
url = "https://discord.com/app";
}
];
}
{ {
name = "Server"; name = "Server";
children = [ children = [
@ -112,19 +98,11 @@
} }
{ {
name = "Grafana Dashboard"; name = "Grafana Dashboard";
url = "https://status.xenia.me.uk"; url = "https://grafana.xenia.me.uk";
}
{
name = "Traefik";
url = "https://traefik.xenia.me.uk";
} }
{ {
name = "ntfy.sh topics"; name = "ntfy.sh topics";
children = [ children = [
{
name = "Emacs";
url = "https://ntfy.xenia.me.uk/UhrNGphnSKCpCnk8";
}
{ {
name = "JET Pulse Notifications"; name = "JET Pulse Notifications";
url = "https://ntfy.xenia.me.uk/jet_pulse_notifications"; url = "https://ntfy.xenia.me.uk/jet_pulse_notifications";
@ -191,7 +169,7 @@
PopupBlocking = { Default = true; }; PopupBlocking = { Default = true; };
RequestedLocales = [ "en-GB" ]; RequestedLocales = [ "en-GB" ];
SearchEngines = { Default = "DuckDuckGo"; }; SearchEngines = { Default = "DuckDuckGo"; };
ShowHomeButton = true; ShowHomeButton = false;
StartDownloadsInTempDirectory = true; StartDownloadsInTempDirectory = true;
}; };
}; };