From 1dbdff88950e4c1c3b26f5ef09edadb83bb37a73 Mon Sep 17 00:00:00 2001 From: kB01 Date: Mon, 26 May 2025 23:35:20 +0200 Subject: [PATCH] Updated Browser Configs --- homes/x86_64-linux/kb@LoyAdjo/chromium.nix | 23 +++ homes/x86_64-linux/kb@LoyAdjo/default.nix | 87 +--------- homes/x86_64-linux/kb@LoyAdjo/firefox.nix | 176 +++++++++++++++++++++ 3 files changed, 204 insertions(+), 82 deletions(-) create mode 100644 homes/x86_64-linux/kb@LoyAdjo/chromium.nix create mode 100644 homes/x86_64-linux/kb@LoyAdjo/firefox.nix diff --git a/homes/x86_64-linux/kb@LoyAdjo/chromium.nix b/homes/x86_64-linux/kb@LoyAdjo/chromium.nix new file mode 100644 index 0000000..5fc653d --- /dev/null +++ b/homes/x86_64-linux/kb@LoyAdjo/chromium.nix @@ -0,0 +1,23 @@ +{ config, pkgs, lib, inputs, ... }: +{ + programs.chromium = { + enable = true; + package = pkgs.ungoogled-chromium; + commandLineArgs = [ + "--extension-mime-request-handling=always-prompt-for-install" # Enable Extension-Install Dialogue + "--enable-features=ClearDataOnExit,NoReferrers,SpoofWebGLInfo" # Feature Flags + "--no-default-browser-check" + ]; + extensions = [ + { # Chromium Web Store + id = "ocaahdebbfolfmndjeplogmgcagdmblk"; + updateUrl = "https://github.com/NeverDecaf/chromium-web-store/releases/latest/download/Chromium.Web.Store.crx"; + } + { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # uBlock Origin + { id = "edibdbjcniadpccecjdfdjjppcpchdlm"; } # I still don't care about cookies + { id = "oboonakemofpalcgghocfoadofidjkkk"; } # KeePassXC-Browser + { id = "oldceeleldhonbafppcapldpdifcinji"; } # LanguageTool + { id = "eimadpbcbfnmbkopoojfekhnkhdbieeh"; } # dark reader + ]; + }; +} diff --git a/homes/x86_64-linux/kb@LoyAdjo/default.nix b/homes/x86_64-linux/kb@LoyAdjo/default.nix index 40e5f60..fa7c0fa 100644 --- a/homes/x86_64-linux/kb@LoyAdjo/default.nix +++ b/homes/x86_64-linux/kb@LoyAdjo/default.nix @@ -1,19 +1,9 @@ { config, pkgs, lib, inputs, ... }: -let - # Firefox Profile Setting States - lock-false = { - Value = false; - Status = "locked"; - }; - lock-true = { - Value = true; - Status = "locked"; - }; - lock-empty-string = { - Value = ""; - Status = "locked"; - }; -in { +{ + imports = [ + ./firefox.nix + ./chromium.nix + ]; home.username = "kb"; home.homeDirectory = "/home/kb"; home.packages = with pkgs; [ @@ -78,72 +68,5 @@ in { services.ssh-agent.enable = true; - programs.firefox = { - enable = true; - nativeMessagingHosts = [ pkgs.firefoxpwa ]; - policies = { - DisableTelemetry = true; - DisableFirefoxStudies = true; - DisablePocket = true; - DisableFirefoxAccounts = true; - AutofillAddressEnabled = false; - AutofillCreditCardEnabled = false; - OfferToSaveLogins = false; - FirefoxHome.TopSites = false; - FirefoxHome.SponsoredTopSites = false; - Preferences = { - "browser.newtabpage.pinned" = lock-empty-string; - "browser.topsites.contile.enabled" = lock-false; - }; - DontCheckDefaultBrowser = true; - DisableProfileImport = true; - SearchBar = "unified"; - SearchEngines.Add = [ # Only Available in ESR Releases https://mozilla.github.io/policy-templates/#searchengines--add - { - Name = "Brave"; - URLTemplate = "https://search.brave.com/search?q={SearchTerms}"; - Alias = "br"; - } - ]; - ExtensionSettings = { # See https://mozilla.github.io/policy-templates/#extensionsettings - "extension@tabliss.io" = { - install_url = "https://addons.mozilla.org/firefox/downloads/file/3940751/tabliss-2.6.0.xpi"; - installation_mode = "normal_installed"; - }; - "gdpr@cavi.au.dk" = { - install_url = "https://addons.mozilla.org/firefox/downloads/file/4362793/consent_o_matic-1.1.3.xpi"; - installation_mode = "normal_installed"; - }; - "uBlock0@raymondhill.net" = { - install_url = "https://addons.mozilla.org/firefox/downloads/file/4382536/ublock_origin-1.61.0.xpi"; - installation_mode = "normal_installed"; - }; - "keepassxc-browser@keepassxc.org" = { - install_url = "https://addons.mozilla.org/firefox/downloads/file/4376326/keepassxc_browser-1.9.4.xpi"; - installation_mode = "normal_installed"; - }; - "offline-qr-code@rugk.github.io" = { - install_url = "https://addons.mozilla.org/firefox/downloads/file/4349427/offline_qr_code_generator-1.9.xpi"; - installation_mode = "normal_installed"; - }; - "addon@darkreader.org" = { - install_url = "https://addons.mozilla.org/firefox/downloads/file/4378073/darkreader-4.9.96.xpi"; - installation_mode = "normal_installed"; - }; - "firefoxpwa@filips.si" = { - install_url = "https://addons.mozilla.org/firefox/downloads/file/4383345/pwas_for_firefox-2.13.1.xpi"; - installation_mode = "normal_installed"; - }; - }; - Bookmarks = [ - { - Title = "Syncthing"; - URL = "localhost:8384"; - Placement = "toolbar"; - } - ]; - }; - }; - home.stateVersion = "24.05"; } diff --git a/homes/x86_64-linux/kb@LoyAdjo/firefox.nix b/homes/x86_64-linux/kb@LoyAdjo/firefox.nix new file mode 100644 index 0000000..e9be148 --- /dev/null +++ b/homes/x86_64-linux/kb@LoyAdjo/firefox.nix @@ -0,0 +1,176 @@ +{ config, pkgs, lib, inputs, ... }: +let + # Firefox Profile Setting States + lock-false = { + Value = false; + Status = "locked"; + }; + lock-true = { + Value = true; + Status = "locked"; + }; + lock-empty-string = { + Value = ""; + Status = "locked"; + }; +in { + programs.firefox = { + enable = true; + nativeMessagingHosts = [ pkgs.firefoxpwa ]; + policies = { + # --------- Privacy --------- + DisableTelemetry = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DisableFirefoxAccounts = true; + AutofillAddressEnabled = false; + AutofillCreditCardEnabled = false; + OfferToSaveLogins = false; + FirefoxHome.TopSites = false; + FirefoxHome.SponsoredTopSites = false; + Preferences = { + "browser.newtabpage.pinned" = lock-empty-string; + "browser.topsites.contile.enabled" = lock-false; + }; + # -------- Opiniated -------- + DontCheckDefaultBrowser = true; + DisableProfileImport = true; + SearchBar = "unified"; + SearchEngines.Add = [ # Only Available in ESR Releases https://mozilla.github.io/policy-templates/#searchengines--add + { + Name = "Brave"; + URLTemplate = "https://search.brave.com/search?q={SearchTerms}"; + Alias = "br"; + } + ]; + # Extensions https://mozilla.github.io/policy-templates#extensionsettings + ExtensionSettings = { + "uBlock0@raymondhill.net" = { # uBlock Origin: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin + install_url = "https://addons.mozilla.org/firefox/downloads/file/4458450/ublock_origin-1.63.2.xpi"; + installation_mode = "normal_installed"; + private_browsing = true; + }; + "idcac-pub@guus.ninja" = { # I still don't care about cookies: https://addons.mozilla.org/en-US/firefox/addon/istilldontcareaboutcookies/ + install_url = "https://addons.mozilla.org/firefox/downloads/file/4216095/istilldontcareaboutcookies-1.1.4.xpi"; + installation_mode = "normal_installed"; + private_browsing = true; + }; + "keepassxc-browser@keepassxc.org" = { # KeePassXC-Browser: https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser + install_url = "https://addons.mozilla.org/firefox/downloads/file/4441759/keepassxc_browser-1.9.7.xpi"; + installation_mode = "normal_installed"; + }; + "offline-qr-code@rugk.github.io" = { # Offline QR Code Generator: https://addons.mozilla.org/en-US/firefox/addon/offline-qr-code-generator/ + install_url = "https://addons.mozilla.org/firefox/downloads/file/4349427/offline_qr_code_generator-1.9.xpi"; + installation_mode = "normal_installed"; + }; + "addon@darkreader.org" = { # Dark Reader: https://addons.mozilla.org/en-US/firefox/addon/darkreader/ + install_url = "https://addons.mozilla.org/firefox/downloads/file/4439735/darkreader-4.9.103.xpi"; + installation_mode = "normal_installed"; + }; + "languagetool-webextension@languagetool.org" = { # LanguageTool: https://addons.mozilla.org/en-US/firefox/addon/languagetool + install_url = "https://addons.mozilla.org/firefox/downloads/file/4470413/languagetool-8.19.4.xpi"; + installation_mode = "normal_installed"; + }; + }; + Bookmarks = [ + { + Title = "Syncthing"; + URL = "localhost:8384"; + Placement = "toolbar"; + } + { + Title = "BayZeit"; + URL = "https://bayzeit-web.ur.de/"; + Placement = "toolbar"; + Folder = "OHM"; + } + { + Title = "Zimbra"; + URL = "https://my.ohmportal.de/zimbra/#1"; + Placement = "toolbar"; + Folder = "OHM"; + } + { + Title = "Moodle"; + URL = "https://elearning.ohmportal.de/my/courses.php"; + Placement = "toolbar"; + Folder = "OHM"; + } + { + Title = "Ohmportal"; + URL = "https://my.ohmportal.de/"; + Placement = "toolbar"; + Folder = "OHM"; + } + { + Title = "Intranet"; + URL = "https://intern.ohmportal.de/seitenbaum/home/page.html"; + Placement = "toolbar"; + Folder = "OHM"; + } + { + Title = "Kantine Hohfederstraße"; + URL = "https://www.werkswelt.de/?id=hohf"; + Placement = "toolbar"; + Folder = "OHM"; + } + { + Title = "Kantine Keßlerplatz"; + URL = "https://www.werkswelt.de/index.php?id=mohm"; + Placement = "toolbar"; + Folder = "OHM"; + } + { + Title = "NixOS Search - Packages"; + URL = "https://search.nixos.org/packages?channel=unstable"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "NixOS Search - Options"; + URL = "https://search.nixos.org/options?channel=unstable"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "Home Manager Search - Options"; + URL = "https://home-manager-options.extranix.com/?release=master"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "Lix"; + URL = "https://lix.systems/"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "AUX - Homepage"; + URL = "https://auxolotl.org/en/"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "AUX - Forum"; + URL = "https://forum.aux.computer/"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "NixOS & Flakes Book"; + URL = "https://nixos-and-flakes.thiscute.world/introduction/"; + Placement = "toolbar"; + Folder = "NixOS"; + } + { + Title = "Nix Pills"; + URL = "https://nixos.org/guides/nix-pills/"; + Placement = "toolbar"; + Folder = "NixOS"; + } + ]; + }; + }; + +} +