diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-29 23:08:57 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-07-29 23:08:57 +0530 |
| commit | 37fb12eee6be551f0ef9b31e2547e115bdeef8e9 (patch) | |
| tree | 85258cd57a168935609a41f6c59fef508cf22714 /modules | |
| parent | 56807df619a6aa8eeea8f782ffc625adc800eb51 (diff) | |
| download | home-manager-config-37fb12eee6be551f0ef9b31e2547e115bdeef8e9.tar.gz home-manager-config-37fb12eee6be551f0ef9b31e2547e115bdeef8e9.zip | |
feat(chromium): added custom theme
- Added a custom theme as an extension with just manifest.json file. The
theme now more closely matches the colors of the rest of the
applications.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/web/chromium/default.nix | 1 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/aria2-explorer.nix | 2 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/dark-mode.nix | 2 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/default.nix | 1 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/lib.nix | 17 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/searxng-home.nix | 2 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/theme.nix | 16 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/theme/manifest.json | 57 | ||||
| -rw-r--r-- | modules/web/chromium/extensions/ublock-origin.nix | 2 |
9 files changed, 96 insertions, 4 deletions
diff --git a/modules/web/chromium/default.nix b/modules/web/chromium/default.nix index f6508e9..2cd9fc1 100644 --- a/modules/web/chromium/default.nix +++ b/modules/web/chromium/default.nix @@ -41,6 +41,7 @@ exts.browserpass.drv exts.darkMode.drv exts.searxngHome.drv + exts.theme.drv exts.ublockOrigin.drv ]; diff --git a/modules/web/chromium/extensions/aria2-explorer.nix b/modules/web/chromium/extensions/aria2-explorer.nix index d2bb69f..0ee9779 100644 --- a/modules/web/chromium/extensions/aria2-explorer.nix +++ b/modules/web/chromium/extensions/aria2-explorer.nix @@ -21,7 +21,7 @@ in { inherit pname; version = checkedVersion; - id = "dkcfilkhokojanlmgpbmjidiidoebnbm"; + id = "jnnfdabjmnliapnhdbnljjlfamdkeohn"; drv = extLib.fetchUnpackedExtension { inherit pname; version = checkedVersion; diff --git a/modules/web/chromium/extensions/dark-mode.nix b/modules/web/chromium/extensions/dark-mode.nix index 170b8d9..0a84ae8 100644 --- a/modules/web/chromium/extensions/dark-mode.nix +++ b/modules/web/chromium/extensions/dark-mode.nix @@ -21,7 +21,7 @@ in { inherit pname; version = checkedVersion; - id = "ifpghghnlimndidoppdkdnbljddikfoj"; + id = "mnollmcmkninmddnibfgoncobcehfhef"; drv = extLib.fetchUnpackedExtension { inherit pname; version = checkedVersion; diff --git a/modules/web/chromium/extensions/default.nix b/modules/web/chromium/extensions/default.nix index 70dd96c..a73f5f2 100644 --- a/modules/web/chromium/extensions/default.nix +++ b/modules/web/chromium/extensions/default.nix @@ -20,5 +20,6 @@ in browserpass = mkExtension ./browserpass.nix; darkMode = mkExtension ./dark-mode.nix; searxngHome = mkExtension ./searxng-home.nix; + theme = mkExtension ./theme.nix; ublockOrigin = mkExtension ./ublock-origin.nix; } diff --git a/modules/web/chromium/extensions/lib.nix b/modules/web/chromium/extensions/lib.nix index c7aefe3..8821b03 100644 --- a/modules/web/chromium/extensions/lib.nix +++ b/modules/web/chromium/extensions/lib.nix @@ -123,4 +123,21 @@ rec { installPhase = "true"; }; + + # --- Package a local directory as an unpacked extension derivation. --- + mkLocalExtension = + { + pname, + srcDir, + version ? "1.0.0", + }: + pkgs.stdenv.mkDerivation { + inherit pname version; + src = srcDir; + phases = [ "installPhase" ]; + installPhase = '' + mkdir -p $out + cp -r $src/* $out/ + ''; + }; } diff --git a/modules/web/chromium/extensions/searxng-home.nix b/modules/web/chromium/extensions/searxng-home.nix index e4db303..73cc7fd 100644 --- a/modules/web/chromium/extensions/searxng-home.nix +++ b/modules/web/chromium/extensions/searxng-home.nix @@ -24,7 +24,7 @@ in inherit pname; version = checkedVersion; - id = "npedjglenjaicajjdmlnokomhaphcdnl"; + id = "acoijbpbnodehiibdpmkkhlpmcnabpaa"; drv = extLib.fetchUnpackedExtension { inherit pname; diff --git a/modules/web/chromium/extensions/theme.nix b/modules/web/chromium/extensions/theme.nix new file mode 100644 index 0000000..a77dc06 --- /dev/null +++ b/modules/web/chromium/extensions/theme.nix @@ -0,0 +1,16 @@ +{ + extLib, + ... +}: +let + pname = "theme"; +in +{ + inherit pname; + version = "1.0.0"; + id = null; + drv = extLib.mkLocalExtension { + inherit pname; + srcDir = ./theme; + }; +} diff --git a/modules/web/chromium/extensions/theme/manifest.json b/modules/web/chromium/extensions/theme/manifest.json new file mode 100644 index 0000000..5be8622 --- /dev/null +++ b/modules/web/chromium/extensions/theme/manifest.json @@ -0,0 +1,57 @@ +{ + "manifest_version": 3, + "name": "OneDark Dark Theme", + "version": "1.0.0", + "description": "Dark theme based on base16 OneDark", + + "theme": { + "colors": { + "frame": [0, 0, 0], + "frame_inactive": [0, 0, 0], + + "toolbar": [20, 20, 20], + + "tab_line": [200, 204, 212], + "tab_background_text": [171,178,191], + "tab_text": [200, 204, 212], + + "background_tab": [0, 0, 0], + + "bookmark_text": [200, 204, 212], + + "ntp_background": [0, 0, 0], + "ntp_text": [200, 204, 212], + "ntp_link": [97, 175, 239], + + "button_background": [0, 0, 0], + + "omnibox_background": [28, 31, 36], + "omnibox_text": [200, 204, 212], + "omnibox_results_bg": [0, 0, 0], + "omnibox_results_text": [200, 204, 212], + "omnibox_results_url": [97, 175, 239], + "omnibox_results_selected_bg": [44,49,58], + + "toolbar_button_icon": [200, 204, 212], + + "tab_loading": [97, 175, 239], + + "toolbar_field": [28, 31, 36], + "toolbar_field_text": [200, 204, 212], + "toolbar_field_border": [67, 72, 82], + + "toolbar_field_focus": [0, 0, 0], + "toolbar_field_text_focus": [255, 255, 255], + "toolbar_field_border_focus": [86, 92, 100] + }, + + "tints": { + "buttons": [1, 1, 1] + }, + + "properties": { + "ntp_background_alignment": "bottom", + "ntp_background_repeat": "no-repeat" + } + } +} diff --git a/modules/web/chromium/extensions/ublock-origin.nix b/modules/web/chromium/extensions/ublock-origin.nix index 9232d14..a46d5b7 100644 --- a/modules/web/chromium/extensions/ublock-origin.nix +++ b/modules/web/chromium/extensions/ublock-origin.nix @@ -21,7 +21,7 @@ in { inherit pname; version = checkedVersion; - id = "nnpdegnhelmjgchicpfdigllmhgpndeg"; # unpacked, ID derives from manifest key at load time + id = "ojmlhihnkagpnkkkjngdngbiidmafdbm"; drv = extLib.fetchUnpackedExtension { inherit pname; version = checkedVersion; |
