nixos-configs/homeManagerModules/firefox/default.nix
matt1432 248a8a0aae
All checks were successful
Discord / discord commits (push) Has been skipped
chore: update sources
Flake Inputs:
    • Updated input 'astal':
        'github:Aylur/astal' (2025-02-12) rev: 956b74fd9ff8c607b6683b404860c4e6b30ffe2b
      → 'github:Aylur/astal' (2025-02-17) rev: cbfe69a9c22f3b0e59c6e09fffbe0b7af4f543d1

    • Updated input 'custom-sidebar-src':
        'github:elchininet/custom-sidebar' (2025-02-09) rev: 5e65f568db9312ca84b0de4f376899af54a14655
      → 'github:elchininet/custom-sidebar' (2025-02-17) rev: 8c5769f2329fb2197c7e828bdc25ffe00783d975

    • Updated input 'gpu-screen-recorder-src':
        'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-02-16) rev: 015570ca75e4c7891f02708b1ec29da8887578ef
      → 'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-02-17) rev: 3c0b607154f324e0f34503e2eb661ded49705c93

    • Updated input 'home-manager':
        'github:nix-community/home-manager' (2025-02-16) rev: ec130e700959ee10b63eedbc87758d20264a9588
      → 'github:nix-community/home-manager' (2025-02-17) rev: 6c93eea85daddd0dc8d4a3a687473461f3122961

    • Updated input 'hyprland':
        'github:hyprwm/Hyprland' (2025-02-16) rev: 897ee276dc0a8a6b11a8102b225a9e969faac0bf
      → 'github:hyprwm/Hyprland' (2025-02-17) rev: d01f9943e1d401b09fc53be3c161279ab4f2c5ba

    • Updated input 'jellyfin-flake':
        'github:matt1432/nixos-jellyfin' (2025-02-09) rev: 42092d54585cef272cac955cb0a07e3f76d46de4
      → 'github:matt1432/nixos-jellyfin' (2025-02-17) rev: 9004577a5a01f62d34ee3b656b7fe38dbed639d7

    • Updated input 'jovian':
        'github:Jovian-Experiments/Jovian-NixOS' (2025-02-15) rev: dc10b4ba56665c66562a5e993c9734fe89c29c65
      → 'github:Jovian-Experiments/Jovian-NixOS' (2025-02-17) rev: acd994d0e57d0309794005f49b09dc1ccb4940e2

    • Updated input 'kompass':
        'github:kotontrion/kompass' (2025-02-07) rev: e312a5715edd1b02576afd39bbe0588c6045e7c1
      → 'github:kotontrion/kompass' (2025-02-17) rev: 755b3095ace5dad330a3dcdcf51d1ff29bf164d4

    • Updated input 'nixpkgs':
        'github:NixOS/nixpkgs' (2025-02-13) rev: 2ff53fe64443980e139eaa286017f53f88336dd0
      → 'github:NixOS/nixpkgs' (2025-02-16) rev: d74a2335ac9c133d6bbec9fc98d91a77f1604c1f

    • Updated input 'nixpkgs-wayland':
        'github:nix-community/nixpkgs-wayland' (2025-02-16) rev: 2bb531b423b6c7c101adb1ace037bac86e5d8552
      → 'github:nix-community/nixpkgs-wayland' (2025-02-17) rev: 3dfd8fdeda2b712ae7238f5c7bb3644432319fc3

    • Updated input 'ts-for-gir-src':
        'github:gjsify/ts-for-gir' (2025-02-12) rev: d1e462ffdb6150749d2e4e7edf97b93f82c525d2
      → 'github:gjsify/ts-for-gir' (2025-02-17) rev: cd7cbc37778cad413538222ddf02c00265358997

    • Updated input 'tuya-local-src':
        'github:make-all/tuya-local' (2025-02-16) rev: 5f73974ba2036f5b8398ba621320b0bf7b9a61ce
      → 'github:make-all/tuya-local' (2025-02-17) rev: d6b5ac063342ce8a6a650d7786fcb841f177c6c9

    • Updated input 'vimplugin-roslyn-nvim-src':
        'github:seblj/roslyn.nvim' (2025-02-15) rev: 3f86e52047f1697117c73d4597729b25bc06839e
      → 'github:seblj/roslyn.nvim' (2025-02-17) rev: ff6dd40e9ae7237e3dbd757af54cc93a29fc6cf8

Docker Images:
    • ghcr.io/linuxserver/radarr latest:
       sha256:f4c9c64c42e84a3c03590afd9da2e420c69b5e936b4549778c5d4c00d907ba33
     → sha256:1184ee84bc5329c4f62c070a04d73eaf7918878410ca48a1f3dbf82b684eee27

Firefox Addons:
    stylus: 2.3.10 -> 2.3.12

Node modules:
    typescript-eslint: 8.24.0 -> 8.24.1
    @ts-for-gir/cli: 4.0.0-beta.19 -> 4.0.0-beta.21
2025-02-17 17:12:03 -05:00

278 lines
9.1 KiB
Nix

self: {
config,
lib,
pkgs,
...
}: let
inherit (self.scopedPackages.${pkgs.system}) firefoxAddons;
inherit (lib) attrsToList attrValues mkIf mkOption singleton types;
cfg = config.programs.firefox;
rounding = (config.wayland.windowManager.hyprland.settings.decoration.rounding or 2) - 2;
firefox-gx = pkgs.callPackage ./firefox-gx {inherit self;};
custom-css = pkgs.callPackage ./custom-css {inherit rounding firefox-gx;};
in {
options.programs.firefox.enableCustomConf = mkOption {
type = types.bool;
default = false;
};
config = mkIf cfg.enableCustomConf {
home.file = {
".mozilla/firefox/matt/chrome/userContent.css".source = "${firefox-gx}/chrome/userContent.css";
".mozilla/firefox/matt/chrome/components".source = "${firefox-gx}/chrome/components";
".mozilla/firefox/matt/chrome/images".source = "${firefox-gx}/chrome/images";
".mozilla/firefox/matt/chrome/icons".source = "${firefox-gx}/chrome/icons";
};
programs.firefox = {
enable = true;
profiles.matt = {
isDefault = true;
id = 0;
userChrome = ''
@import url("file://${firefox-gx}/chrome/userChrome.css");
@import url("file://${custom-css}");
'';
settings = {
# Theme
"firefoxgx.tab-shapes" = true;
"firefoxgx.left-sidebar" = true;
"userChrome.tab.bottom_rounded_corner" = true;
"userChrome.tab.bottom_rounded_corner.wave" = false;
"userChrome.tab.bottom_rounded_corner.australis" = true;
# Use the normal file picker
"widget.use-xdg-desktop-portal.file-picker" = 0;
# Firefox-gx user.js
/*
Default rules
*/
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"svg.context-properties.content.enabled" = true;
"layout.css.color-mix.enabled" = true;
"browser.tabs.delayHidingAudioPlayingIconMS" = 0;
"layout.css.backdrop-filter.enabled" = true;
"browser.newtabpage.activity-stream.improvesearch.handoffToAwesomebar" = false;
"browser.newtabpage.activity-stream.newtabWallpapers.enabled" = true;
/*
To active container tabs without any extension
*/
"privacy.userContext.enabled" = true;
"privacy.userContext.ui.enabled" = true;
"privacy.userContext.longPressBehavior" = 2;
# Open previous windows and tabs
"browser.startup.page" = 3;
# Prefs
"apz.overscroll.enabled" = false;
"layout.css.devPixelsPerPx" = 1.12;
"browser.search.widget.inNavBar" = true;
"browser.toolbars.bookmarks.visibility" = "always";
"browser.toolbars.bookmarks.showInPrivateBrowsing" = true;
"ui.key.menuAccessKey" = 0;
# remove telemetry
"datareporting.policy.dataSubmissionEnabled" = false;
"datareporting.healthreport.uploadEnabled" = false;
"datareporting.healthreport.infoURL" = "";
"dom.security.https_only_mode" = true;
# remove first run and warning stuff
"datareporting.policy.firstRunURL" = "";
"browser.aboutwelcome.enabled" = false;
"browser.aboutConfig.showWarning" = false;
# Disable firefox autofill
"signon.rememberSignons" = false;
"extensions.formautofill.addresses.enabled" = false;
"extensions.formautofill.creditCards.enabled" = false;
# remove new tab stuff
"extensions.pocket.enabled" = false;
"services.sync.prefs.sync.browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.feeds.system.topstories" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.feeds.topsites" = false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons" = false;
"browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features" = false;
};
search = {
default = "SearXNG";
force = true;
engines = {
"SearXNG" = {
urls = singleton {
template = "https://search.nelim.org/search";
params = attrsToList {
"q" = "{searchTerms}";
};
};
iconMapObj."16" = "https://search.nelim.org/favicon.ico";
definedAliases = ["@s"];
};
"Github Search Code" = {
urls = singleton {
template = "https://github.com/search";
params = attrsToList {
"type" = "code";
"q" = "NOT is:fork {searchTerms}";
};
};
iconMapObj."16" = "https://icon.horse/icon/github.com";
definedAliases = ["@gs"];
};
"Github Nix Code" = {
urls = singleton {
template = "https://github.com/search";
params = attrsToList {
"type" = "code";
"q" = "lang:Nix NOT is:fork {searchTerms}";
};
};
iconMapObj."16" = "https://icon.horse/icon/github.com";
definedAliases = ["@gn"];
};
"Nixpkgs" = {
urls = singleton {
template = "https://github.com/search";
params = attrsToList {
"type" = "code";
"q" = "repo:NixOS/nixpkgs {searchTerms}";
};
};
iconMapObj."16" = "https://icon.horse/icon/github.com";
definedAliases = ["@pkgs"];
};
"NixOS Wiki" = {
urls = singleton {
template = "https://wiki.nixos.org/w/index.php";
params = attrsToList {
"search" = "{searchTerms}";
};
};
iconMapObj."16" = "https://wiki.nixos.org/favicon.ico";
definedAliases = ["@nw"];
};
"MyNixos" = {
urls = singleton {
template = "https://mynixos.com/search";
params = attrsToList {
"q" = "{searchTerms}";
};
};
iconMapObj."16" = "https://mynixos.com/favicon.ico";
definedAliases = ["@mn"];
};
"Noogle" = {
urls = singleton {
template = "https://noogle.dev/q";
params = attrsToList {
"term" = "{searchTerms}";
};
};
iconMapObj."16" = "https://noogle.dev/favicon.ico";
definedAliases = ["@ng"];
};
"Firefox Add-ons" = {
urls = singleton {
template = "https://addons.mozilla.org/en-US/firefox/search";
params = attrsToList {
"q" = "{searchTerms}";
};
};
iconMapObj."16" = "https://addons.mozilla.org/favicon.ico";
definedAliases = ["@fa"];
};
"ProtonDB" = {
urls = singleton {
template = "https://www.protondb.com/search";
params = attrsToList {
"q" = "{searchTerms}";
};
};
iconMapObj."16" = "https://www.protondb.com/favicon.ico";
definedAliases = ["@pdb"];
};
"YouTube" = {
urls = singleton {
template = "https://www.youtube.com/results";
params = attrsToList {
"search_query" = "{searchTerms}";
};
};
iconMapObj."16" = "https://www.youtube.com/favicon.ico";
definedAliases = ["@yt" "@youtube"];
};
"Bing".metaData.hidden = true;
"Google".metaData.hidden = true;
"eBay".metaData.hidden = true;
};
order = [
"SearXNG"
"DuckDuckGo"
"MyNixos"
"NixOS Wiki"
"Github Search Code"
"Github Nix Code"
"Nixpkgs"
"Noogle"
"Wikipedia (en)"
"YouTube"
"Firefox Add-ons"
"ProtonDB"
"Amazon.ca"
];
};
extensions.packages = attrValues {
inherit
(firefoxAddons)
auto-refresh-page
bitwarden
checkmarks-web-ext
darkreader
floccus
google-container
image-search-options
istilldontcareaboutcookies
opera-gx-witchcraft-purple
return-youtube-dislikes
seventv
sponsorblock
sound-volume
stylus
ttv-lol-pro
ublock-origin
undoclosetabbutton
;
};
};
};
};
# For accurate stack trace
_file = ./default.nix;
}