From 6e03df701f66f67ea64c079a6738f7a315ef5643 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 24 Nov 2023 08:44:12 +0000 Subject: [PATCH] Re-enable firefox as default browser Keep chromium installed for PWA support --- flake.nix | 1 + home/firefox.nix | 4 +-- home/hyprland/config.nix | 2 +- home/hyprland/waybar/default.nix | 2 +- system/chromium.nix | 5 +--- system/desktop.nix | 2 +- system/firefox.nix | 46 +++++++++----------------------- 7 files changed, 19 insertions(+), 43 deletions(-) diff --git a/flake.nix b/flake.nix index 4c00c896..33b19209 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,7 @@ ./home/alacritty.nix ./home/btop.nix ./home/default.nix + ./home/firefox.nix ./home/media.nix ./home/pass.nix ]; diff --git a/home/firefox.nix b/home/firefox.nix index af89be63..c88383bd 100644 --- a/home/firefox.nix +++ b/home/firefox.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: { +{ pkgs, ... }: { programs.firefox = { enable = true; package = null; # Use system Firefox @@ -7,7 +7,7 @@ "app.shield.optoutstudies.enabled" = false; "browser.bookmarks.addedImportButton" = false; "browser.bookmarks.showMobileBookmarks" = false; - "browser.toolbars.bookmarks.visibility" = "always"; + "browser.toolbars.bookmarks.visibility" = "newtab"; "browser.contentblocking.category" = "strict"; "browser.search.region" = "GB"; "browser.search.isUS" = false; diff --git a/home/hyprland/config.nix b/home/hyprland/config.nix index 2239d0d5..f057c8ae 100644 --- a/home/hyprland/config.nix +++ b/home/hyprland/config.nix @@ -179,7 +179,7 @@ in '' bind = SUPER, W, moveworkspacetomonitor, name:web current bind = SUPER, W, workspace, 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, workspace, name:top diff --git a/home/hyprland/waybar/default.nix b/home/hyprland/waybar/default.nix index 491bfa64..5e4f2832 100644 --- a/home/hyprland/waybar/default.nix +++ b/home/hyprland/waybar/default.nix @@ -37,7 +37,7 @@ "5" = "󰫇"; "6" = "󰫈"; "emacs" = ""; - "web" = ""; + "web" = "󰈹"; "discord" = "󰙯"; "steam" = "󰓓"; "apps" = "󰜫"; diff --git a/system/chromium.nix b/system/chromium.nix index e5eaa6ab..173243ab 100644 --- a/system/chromium.nix +++ b/system/chromium.nix @@ -1,7 +1,6 @@ { pkgs, ... }: { - environment.systemPackages = with pkgs; [ chromium ]; programs.chromium = rec { enable = true; defaultSearchProviderEnabled = true; @@ -9,12 +8,10 @@ defaultSearchProviderSuggestURL = defaultSearchProviderSearchURL; extensions = [ "cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin - "dphilobhebphkdjbpfohgikllaljmgbn" # SimpleLogin - "fnaicdffflnofjppbagibeoednhnbjhg" # floccus bookmarks sync ]; extraOpts = { "BrowserSignin" = 0; - "DefaultBrowserSettingEnabled" = true; + "DefaultBrowserSettingEnabled" = false; "DeviceAutoUpdateDisabled" = true; "SyncDisabled" = true; "PasswordManagerEnabled" = false; diff --git a/system/desktop.nix b/system/desktop.nix index 425b2901..cf3b2844 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -1,7 +1,7 @@ { config, pkgs, user, ... }: { - imports = [ ./default.nix ./chromium.nix ]; + imports = [ ./default.nix ./firefox.nix ./chromium.nix ]; environment.systemPackages = with pkgs; [ dex mesa diff --git a/system/firefox.nix b/system/firefox.nix index 06531c83..2a249fc8 100644 --- a/system/firefox.nix +++ b/system/firefox.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ ... }: { programs.firefox = { @@ -14,7 +14,7 @@ DisableSetDesktopBackground = true; DisableSystemAddonUpdate = true; DisableTelemetry = true; - DisplayBookmarksToolbar = "always"; + DisplayBookmarksToolbar = "newtab"; DisplayMenuBar = "default-off"; EnableTrackingProtection = { Value = true; @@ -53,10 +53,17 @@ "https://addons.mozilla.org/firefox/downloads/latest/i-dont-care-about-cookies/latest.xpi"; }; "floccus@handmadeideas.org" = { - installation_mode = "normal_installed"; + # floccus bookmarks sync + installation_mode = "force_installed"; install_url = "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 = { Search = true; @@ -68,29 +75,8 @@ Snippets = false; Locked = true; }; - HomePage = { - URL = "https://nixos.org"; - StartPage = "homepage-locked"; - }; ManagedBookmarks = [ { 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"; children = [ @@ -112,19 +98,11 @@ } { name = "Grafana Dashboard"; - url = "https://status.xenia.me.uk"; - } - { - name = "Traefik"; - url = "https://traefik.xenia.me.uk"; + url = "https://grafana.xenia.me.uk"; } { name = "ntfy.sh topics"; children = [ - { - name = "Emacs"; - url = "https://ntfy.xenia.me.uk/UhrNGphnSKCpCnk8"; - } { name = "JET Pulse Notifications"; url = "https://ntfy.xenia.me.uk/jet_pulse_notifications"; @@ -191,7 +169,7 @@ PopupBlocking = { Default = true; }; RequestedLocales = [ "en-GB" ]; SearchEngines = { Default = "DuckDuckGo"; }; - ShowHomeButton = true; + ShowHomeButton = false; StartDownloadsInTempDirectory = true; }; };