diff --git a/home/default.nix b/home/default.nix index 35db0680..25780224 100644 --- a/home/default.nix +++ b/home/default.nix @@ -3,6 +3,7 @@ { imports = [ ./alacritty.nix + ./firefox.nix ./fzf.nix ./git.nix ./media.nix @@ -14,7 +15,6 @@ ./hyprland/default.nix ./emacs/default.nix ./accounts/default.nix - ./firefox/default.nix ./ferdium/default.nix ]; home.packages = with pkgs; [ dig silver-searcher gnumake ]; diff --git a/home/firefox/default.nix b/home/firefox.nix similarity index 78% rename from home/firefox/default.nix rename to home/firefox.nix index 0451152f..daebea47 100644 --- a/home/firefox/default.nix +++ b/home/firefox.nix @@ -1,6 +1,7 @@ { config, lib, pkgs, ... }: { programs.firefox = { enable = true; + package = null; # Use system Firefox profiles.default = { settings = { "app.shield.optoutstudies.enabled" = false; @@ -13,7 +14,7 @@ "browser.warnOnQuitShortcut" = false; "distribution.searchplugins.defaultLocale" = "en-GB"; "doh-rollout.home-region" = "GB"; - "extensions.activeThemeID" = "firefox-alpenglow@mozilla.org"; + "extensions.activeThemeID" = "default-theme@mozilla.org"; "extensions.formautofill.creditCards.enabled" = false; "general.useragent.locale" = "en-GB"; "intl.accept_languages" = "en-gb,en"; @@ -42,9 +43,16 @@ default = "DuckDuckGo"; force = true; order = [ "DuckDuckGo" ]; - engines = import ./search.nix { inherit config lib pkgs; }; + engines = { + "MyNixOS" = { + urls = + [{ template = "https://mynixos.com/search?q={searchTerms}"; }]; + icon = + "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = [ "@mn" ]; + }; + }; }; - bookmarks = import ./bookmarks.nix { inherit config lib pkgs; }; }; }; } diff --git a/home/firefox/bookmarks.nix b/home/firefox/bookmarks.nix deleted file mode 100644 index 98134da2..00000000 --- a/home/firefox/bookmarks.nix +++ /dev/null @@ -1,158 +0,0 @@ -{ config, lib, pkgs, ... }: - -[{ - name = "Toolbar"; - toolbar = true; - bookmarks = [ - { - name = "Config Repo"; - tags = [ "nix" "git" "config" ]; - url = "https://git.xenia.me.uk/xenia/nixos"; - } - { - name = "NixOS Wiki"; - tags = [ "wiki" "nix" ]; - url = "https://nixos.wiki/"; - } - { - name = "Hyprland Wiki"; - tags = [ "wiki" "hyprland" "wayland" "wlroots" ]; - url = "https://wiki.hyprland.org/"; - } - { - name = "Arch Wiki"; - tags = [ "wiki" "arch" ]; - url = "https://wiki.archlinux.org/"; - } - { - name = "Dev"; - bookmarks = [ - { - name = "Gitea"; - tags = [ "git" "source" ]; - url = "https://git.xenia.me.uk"; - } - { - name = "GitHub"; - tags = [ "git" "source" ]; - url = "https://github.com"; - } - { - name = "GitLab"; - tags = [ "git" "source" ]; - url = "https://gitlab.com"; - } - { - name = "StackOverflow"; - url = "https://stackoverflow.com"; - } - { - name = "PyPI"; - url = "https://pypi.org"; - } - ]; - } - { - name = "Games"; - bookmarks = [ - { - name = "ProtonDB"; - url = "https://www.protondb.com/"; - } - { - name = "SteamDB"; - url = "https://steamdb.info/"; - } - { - name = "Roberts Space Industries"; - url = "https://robertsspaceindustries.com/"; - } - ]; - } - { - name = "Work"; - bookmarks = [ - { - name = "Nucleus"; - url = "https://nucleus.ukaea.uk"; - } - { - name = "JET"; - url = "http://w3.jet.uk"; - } - { - name = "Marval"; - url = "https://marval.service.ukaea.uk/MSMSelfService/Index.aspx"; - } - { - name = "U4BW"; - url = "https://ubw.unit4cloud.com/uk_aea_prod_web/Login/Login.aspx"; - } - { - name = "Office365"; - url = "https://www.office.com"; - } - { - name = "Physics Summary"; - url = - "https://users.euro-fusion.org/pages/physics-summary/LatestSession.php"; - } - { - name = "JSPO"; - url = - "https://www.jspo.jet.uk/pages/operations/jpecreports_2023.html"; - } - { - name = "Rosters"; - bookmarks = [ - { - name = "J2 Roster"; - url = - "https://apps.powerapps.com/play/e/default-c6ac664b-ae27-4d5d-b4e6-bb5717196fc7/a/c403a9ad-95e0-47b7-8c82-752b22a6d6f5?tenantId=c6ac664b-ae27-4d5d-b4e6-bb5717196fc7&source=portal"; - } - { - name = "KS5"; - url = - "https://wiki.jetdata.eu/open/index.php?title=Ks5:roster3008"; - } - ]; - } - { - name = "OpenWiki"; - bookmarks = [ - { - name = "Main Page"; - url = "https://wiki.jetdata.eu/open/index.php?title=Main_Page"; - } - { - name = "KS5"; - url = "https://wiki.jetdata.eu/open/index.php?title=CXS:Topic3"; - } - { - name = "KT3"; - url = "https://wiki.jetdata.eu/open/index.php?title=KT3_Journals"; - } - ]; - } - { - name = "Mimics"; - bookmarks = [ - { - name = "Countdown"; - url = "http://webmimic.jet.uk/mc/codas/countdown"; - } - { - name = "KS5"; - url = "http://webmimic.jet.uk/DG/codas/ks5.mim.html"; - } - { - name = "KT3"; - url = "http://webmimic.jet.uk/DG/codas/kt3spec.mim.html"; - } - ]; - } - ]; - } - - ]; -}] diff --git a/home/firefox/search.nix b/home/firefox/search.nix deleted file mode 100644 index 8853c86e..00000000 --- a/home/firefox/search.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - "OpenStreetMap" = { - urls = [{ - template = "https://www.openstreetmap.org/search?query={searchTerms}"; - }]; - definedAliases = [ "@om" ]; - }; - "NixOS Packages" = { - urls = [{ - template = - "http://search.nixos.org/packages?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}"; - }]; - icon = - "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@np" ]; - }; - "NixOS Options" = { - urls = [{ - template = - "http://search.nixos.org/options?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}"; - }]; - icon = - "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@no" ]; - }; - "Home Manager Options" = { - urls = [{ - template = - "https://mipmip.github.io/home-manager-option-search/?query={searchTerms}"; - }]; - icon = - "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@hm" ]; - }; - "PyPI packages" = { - urls = [{ template = "https://pypi.org/search/?q={searchTerms}"; }]; - definedAliases = [ "@py" ]; - }; - "StackOverflow" = { - urls = [{ template = "https://stackoverflow.com/search?q={searchTerms}"; }]; - definedAliases = [ "@so" ]; - }; - "NixOS Wiki" = { - urls = - [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }]; - icon = - "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@nw" ]; - }; - "Arch Wiki" = { - urls = [{ - template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; - }]; - definedAliases = [ "@aw" ]; - }; - "GitHub" = { - urls = [{ template = "https://github.com/search?q={searchTerms}"; }]; - definedAliases = [ "@gh" ]; - }; - "MyNixOS" = { - urls = [{ template = "https://mynixos.com/search?q={searchTerms}"; }]; - icon = - "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@mn" ]; - }; -} diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index ca6b123c..af908102 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -16,16 +16,13 @@ zotero minesweep-rs ]; - programs = { - firefox.package = pkgs.firefox-wayland; - rofi = { - package = pkgs.rofi-wayland; - terminal = "${pkgs.alacritty}/bin/alacritty"; - pass.extraConfig = '' - backend=wtype - clibpoard_backend=wl-clipboard - ''; - }; + programs.rofi = { + package = pkgs.rofi-wayland; + terminal = "${pkgs.alacritty}/bin/alacritty"; + pass.extraConfig = '' + backend=wtype + clibpoard_backend=wl-clipboard + ''; }; services.kanshi = { enable = true; diff --git a/home/pass.nix b/home/pass.nix index b969c914..d99fae57 100644 --- a/home/pass.nix +++ b/home/pass.nix @@ -21,8 +21,6 @@ pinentryFlavor = "gtk2"; extraConfig = '' no-allow-external-cache - allow-emacs-pinentry - allow-loopback-pinentry ''; }; password-store-sync.enable = true; diff --git a/system/desktop.nix b/system/desktop.nix index 3461de47..d5847409 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -1,6 +1,7 @@ { pkgs, ... }: { + imports = [ ./firefox.nix ]; environment.systemPackages = with pkgs; with libsForQt5.qt5; [ dex diff --git a/system/firefox.nix b/system/firefox.nix new file mode 100644 index 00000000..760eabac --- /dev/null +++ b/system/firefox.nix @@ -0,0 +1,235 @@ +{ config, lib, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ passff-host ]; + programs.firefox = { + enable = true; + nativeMessagingHosts.passff = true; + languagePacks = [ "en-GB" ]; + policies = { + Cookies = { Behaviour = "reject-tracker-and-partition-foreign"; }; + DisableAppUpdate = true; + DisableBuiltinPDFViewer = true; + DisableFirefoxAccounts = true; + DisableFirefoxStudies = true; + DisableProfileImport = true; + DisableSetDesktopBackground = true; + DisableSystemAddonUpdate = true; + DisableTelemetry = true; + DisplayBookmarksToolbar = "always"; + DisplayMenuBar = "default-off"; + EnableTrackingProtection = { + Value = true; + Cryptomining = true; + Fingerprinting = true; + EmailTracking = true; + }; + ExtensionSettings = { + "uBlock0@raymondhill.net" = { + installation_mode = "force_installed"; + install_url = + "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + }; + "queryamoid@kaply.com" = { + installation_mode = "force_installed"; + install_url = + "https://github.com/mkaply/queryamoid/releases/download/v0.1/query_amo_addon_id-0.1-fx.xpi"; + }; + "addon@simplelogin" = { + installation_mode = "normal_installed"; + install_url = + "https://addons.mozilla.org/firefox/downloads/latest/simplelogin/latest.xpi"; + }; + "floccus@handmadeideas.org" = { + installation_mode = "normal_installed"; + install_url = + "https://addons.mozilla.org/firefox/downloads/latest/floccus/latest.xpi"; + }; + "passff@invicem.pro" = { + installation_mode = "normal_installed"; + install_url = + "https://addons.mozilla.org/firefox/downloads/latest/passff/latest.xpi"; + }; + }; + FirefoxHome = { + Search = true; + TopSites = true; + SponsoredTopSites = false; + Highlights = false; + Pocket = false; + SponsoredPocket = false; + Snippets = false; + Locked = true; + }; + HomePage = { + URL = "https://nixos.org"; + StartPage = "homepage-locked"; + }; + ManagedBookmarks = [ + { toplevel_name = "Standard Bookmarks"; } + { + name = "Config Repo"; + url = "https://git.xenia.me.uk/xenia/nixos"; + } + { + name = "NixOS Wiki"; + url = "https://nixos.wiki/"; + } + { + name = "Hyprland Wiki"; + url = "https://wiki.hyprland.org/"; + } + { + name = "Arch Wiki"; + url = "https://wiki.archlinux.org/"; + } + { + name = "Mozilla Policy Templates"; + url = "https://mozilla.github.io/policy-templates/"; + } + { + name = "Dev"; + children = [ + { + name = "Gitea"; + url = "https://git.xenia.me.uk"; + } + { + name = "GitHub"; + url = "https://github.com"; + } + { + name = "GitLab"; + url = "https://gitlab.com"; + } + { + name = "StackOverflow"; + url = "https://stackoverflow.com"; + } + { + name = "PyPI"; + url = "https://pypi.org"; + } + ]; + } + { + name = "Games"; + children = [ + { + name = "ProtonDB"; + url = "https://www.protondb.com/"; + } + { + name = "SteamDB"; + url = "https://steamdb.info/"; + } + { + name = "Roberts Space Industries"; + url = "https://robertsspaceindustries.com/"; + } + ]; + } + { + name = "Work"; + children = [ + { + name = "Nucleus"; + url = "https://nucleus.ukaea.uk"; + } + { + name = "JET"; + url = "http://w3.jet.uk"; + } + { + name = "Marval"; + url = "https://marval.service.ukaea.uk/MSMSelfService/Index.aspx"; + } + { + name = "U4BW"; + url = + "https://ubw.unit4cloud.com/uk_aea_prod_web/Login/Login.aspx"; + } + { + name = "Office365"; + url = "https://www.office.com"; + } + { + name = "Physics Summary"; + url = + "https://users.euro-fusion.org/pages/physics-summary/LatestSession.php"; + } + { + name = "JSPO"; + url = + "https://www.jspo.jet.uk/pages/operations/jpecreports_2023.html"; + } + { + name = "pySpec"; + url = "http://heimdall003.jet.uk:3060/v1/interactive"; + } + { + name = "Rosters"; + children = [ + { + name = "J2 Roster"; + url = + "https://apps.powerapps.com/play/e/default-c6ac664b-ae27-4d5d-b4e6-bb5717196fc7/a/c403a9ad-95e0-47b7-8c82-752b22a6d6f5?tenantId=c6ac664b-ae27-4d5d-b4e6-bb5717196fc7&source=portal"; + } + { + name = "KS5"; + url = + "https://wiki.jetdata.eu/open/index.php?title=Ks5:roster3008"; + } + ]; + } + { + name = "OpenWiki"; + children = [ + { + name = "Main Page"; + url = + "https://wiki.jetdata.eu/open/index.php?title=Main_Page"; + } + { + name = "KS5"; + url = + "https://wiki.jetdata.eu/open/index.php?title=CXS:Topic3"; + } + { + name = "KT3"; + url = + "https://wiki.jetdata.eu/open/index.php?title=KT3_Journals"; + } + ]; + } + { + name = "Mimics"; + children = [ + { + name = "Countdown"; + url = "http://webmimic.jet.uk/mc/codas/countdown"; + } + { + name = "KS5"; + url = "http://webmimic.jet.uk/DG/codas/ks5.mim.html"; + } + { + name = "KT3"; + url = "http://webmimic.jet.uk/DG/codas/kt3spec.mim.html"; + } + ]; + } + ]; + } + ]; + NoDefaultBookmarks = true; + OfferToSaveLogins = false; + PasswordManagerEnabled = false; + PopupBlocking = { Default = true; }; + RequestedLocales = [ "en-GB" ]; + SearchEngines = { Default = "DuckDuckGo"; }; + ShowHomeButton = true; + StartDownloadsInTempDirectory = true; + }; + }; +} diff --git a/system/hyprland.nix b/system/hyprland.nix index 6c330779..b1472405 100644 --- a/system/hyprland.nix +++ b/system/hyprland.nix @@ -74,5 +74,6 @@ enable = true; plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ]; }; + firefox.package = pkgs.firefox-wayland; }; }