From 20e9cb7e2d3403f318da3cab36cb619a39e7f478 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 20 Jul 2025 22:44:25 +0200 Subject: [PATCH] Modules/Firefox: Add textfox theme --- flake.lock | 39 ++++++++++++++++- flake.nix | 12 +++-- home/christoph/default.nix | 2 + home/modules/default.nix | 3 ++ home/modules/firefox/customizationState.json | 6 ++- home/modules/firefox/default.nix | 46 +++++++++++++++++++- home/modules/firefox/options.nix | 1 + 7 files changed, 101 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index e3005fe1..54ebdb0b 100644 --- a/flake.lock +++ b/flake.lock @@ -410,6 +410,21 @@ "type": "github" } }, + "nur_2": { + "locked": { + "lastModified": 1729125404, + "narHash": "sha256-2ZtXYNBPi9Ejeb2Heqh+yFTBcstapvtna8Vyl/ugb7w=", + "owner": "nix-community", + "repo": "NUR", + "rev": "7aafd5f0d772efbd2e611c132cc290c3508fe049", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "nuschtosSearch": { "inputs": { "flake-utils": "flake-utils", @@ -446,7 +461,8 @@ "nixvim": "nixvim", "nps": "nps", "nur": "nur", - "sops-nix": "sops-nix" + "sops-nix": "sops-nix", + "textfox": "textfox" } }, "sops-nix": { @@ -498,6 +514,27 @@ "repo": "default", "type": "github" } + }, + "textfox": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "nur": "nur_2" + }, + "locked": { + "lastModified": 1751562345, + "narHash": "sha256-6PiU3y2JniuAkHNsLdUgZGTq5LpgkxCGS/1ehr+ZMjc=", + "owner": "adriankarlen", + "repo": "textfox", + "rev": "b981cdb7f8c38d082ca1646855ec4192c9e1d5dd", + "type": "github" + }, + "original": { + "owner": "adriankarlen", + "repo": "textfox", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 89b8e9b2..6a0af06f 100644 --- a/flake.nix +++ b/flake.nix @@ -32,6 +32,10 @@ nur.url = "github:nix-community/NUR"; nur.inputs.nixpkgs.follows = "nixpkgs"; + # Firefox theme + textfox.url = "github:adriankarlen/textfox"; + textfox.inputs.nixpkgs.follows = "nixpkgs"; + # Nix Package Search - nps nps.url = "github:OleMussmann/nps"; nps.inputs.nixpkgs.follows = "nixpkgs"; @@ -52,16 +56,16 @@ nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest"; # nix-flatpak.inputs.nixpkgs.follows = "nixpkgs"; # nix-flatpak doesn't have this + # Realtime audio + # musnix.url = "github:musnix/musnix"; + # musnix.inputs.nixpkgs.follows = "nixpkgs"; + # HyprPlugins # hyprland-plugins.url = "github:hyprwm/hyprland-plugins"; # hyprland-plugins.inputs.nixpkgs.follows = "nixpkgs"; # hypr-dynamic-cursors.url = "github:VirtCode/hypr-dynamic-cursors"; # hypr-dynamic-cursors.inputs.nixpkgs.follows = "nixpkgs"; - # Realtime audio - # musnix.url = "github:musnix/musnix"; - # musnix.inputs.nixpkgs.follows = "nixpkgs"; - # Pinned versions # v4l2loopback-pinned.url = "github:nixos/nixpkgs/4684fd6b0c01e4b7d99027a34c93c2e09ecafee2"; # unityhub-pinned.url = "github:huantianad/nixpkgs/9542b0bc7701e173a10e6977e57bbba68bb3051f"; diff --git a/home/christoph/default.nix b/home/christoph/default.nix index 31927b3f..64a9b094 100644 --- a/home/christoph/default.nix +++ b/home/christoph/default.nix @@ -68,6 +68,7 @@ enable = !headless; wayland = true; vaapi = true; + textfox = true; disableTabBar = true; }; @@ -195,6 +196,7 @@ "Spotify" "tidal-hifi" "obsidian" + "firefox" "jetbrains-clion" "jetbrains-idea" "jetbrains-pycharm" diff --git a/home/modules/default.nix b/home/modules/default.nix index e2ddc827..4068984a 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -29,6 +29,9 @@ # HM modules imported from the flake inputs inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.nixvim.homeManagerModules.nixvim + inputs.textfox.homeManagerModules.default + + # NOTE: Do NOT use this, use the system module (the HM module has to rely on fuse) # inputs.impermanence.homeManagerModules.impermanence ]; } diff --git a/home/modules/firefox/customizationState.json b/home/modules/firefox/customizationState.json index 0ee7e1fd..0eb7d12e 100644 --- a/home/modules/firefox/customizationState.json +++ b/home/modules/firefox/customizationState.json @@ -46,6 +46,7 @@ "downloads-button", "urlbar-container", "save-to-pocket-button", + "_3c078156-979c-498b-8990-85f7987dd929_-browser-action", "fxa-toolbar-menu-button", "treestyletab_piro_sakura_ne_jp-browser-action", "ublock0_raymondhill_net-browser-action", @@ -128,7 +129,8 @@ "_cb31ec5d-c49a-4e5a-b240-16c767444f62_-browser-action", "screenshot-button", "_bbb880ce-43c9-47ae-b746-c3e0096c5b76_-browser-action", - "jid1-qofqdk4qzufgwq_jetpack-browser-action" + "jid1-qofqdk4qzufgwq_jetpack-browser-action", + "_3c078156-979c-498b-8990-85f7987dd929_-browser-action" ], "dirtyAreaCache": [ "nav-bar", @@ -140,5 +142,5 @@ "vertical-tabs" ], "currentVersion": 22, - "newElementCount": 8 + "newElementCount": 9 } diff --git a/home/modules/firefox/default.nix b/home/modules/firefox/default.nix index d899d5f4..459f16f9 100644 --- a/home/modules/firefox/default.nix +++ b/home/modules/firefox/default.nix @@ -6,11 +6,54 @@ hostname, ... }: let - inherit (config.modules) firefox; + inherit (config.modules) firefox color; in { options.modules.firefox = import ./options.nix {inherit lib mylib;}; config = lib.mkIf firefox.enable { + textfox = { + enable = firefox.textfox; + useLegacyExtensions = false; + profile = "default"; + + config = { + background = { + color = color.hexS.base; + }; + + border = { + color = color.hexS.overlay1; + width = "2px"; + transition = "1.0s ease"; + radius = "3px"; + }; + + displayWindowControls = true; + displayNavButtons = true; + displayUrlbarIcons = true; + displaySidebarTools = false; + displayTitles = false; + + icons = { + toolbar.extensions.enable = true; + context.extensions.enable = true; + context.firefox.enable = true; + }; + + tabs = { + horizontal.enable = !firefox.disableTabBar; + vertical.enable = firefox.disableTabBar; + # vertical.margin = "1rem"; + }; + + font = { + family = color.font; + size = "14px"; + accent = color.hexS.accent; + }; + }; + }; + home.packages = with pkgs; [vdhcoapp]; home.sessionVariables = lib.mkMerge [ @@ -179,6 +222,7 @@ in { # catppuccin-web-file-icons clearurls cookie-autodelete + dark-background-light-text display-_anchors # Easier linking to specific website parts don-t-fuck-with-paste enhancer-for-youtube diff --git a/home/modules/firefox/options.nix b/home/modules/firefox/options.nix index d8582efc..7dc58214 100644 --- a/home/modules/firefox/options.nix +++ b/home/modules/firefox/options.nix @@ -9,4 +9,5 @@ with mylib.modules; { wayland = mkBoolOption false "Enable firefox wayland support"; vaapi = mkBoolOption false "Enable firefox vaapi support"; disableTabBar = mkBoolOption false "Disable the firefox tab bar (for TST)"; + textfox = mkBoolOption false "Enable the TextFox theme"; }