blob: 2bc37ee3605f97c596a19bec348fb7800209cdd2 [file] [log] [blame]
Samuel Shuert02ffd1e2024-02-13 21:37:15 -05001{ lib, config, ... }:
2{
Skyler Grey4e230892024-02-13 22:58:46 +00003 options.chimera.browser.firefox = {
4 enable = lib.mkEnableOption "Use firefox browser";
5 extensions = {
6 bitwarden.enable = lib.mkEnableOption "Turn on Bitwarden extension";
7 youtube = {
8 sponsorBlock.enable = lib.mkEnableOption "Turn on Sponsor Block";
9 returnDislike.enable = lib.mkEnableOption "Turn on Return Youtube Dislike";
10 deArrow.enable = lib.mkEnableOption "Turn on De Arrow";
11 };
12 reactDevTools.enable = lib.mkEnableOption "Turn on React Dev Tools";
13 ublockOrigin.enable = lib.mkEnableOption "Turn on uBlock Origin ad blocker";
14 adnauseam.enable = lib.mkEnableOption "Turn on AdNauseam ad blocker";
15 };
16 extraExtensions = lib.mkOption {
17 type = lib.types.listOf lib.types.package;
18 description = "Extra extensions to add to firefox";
Skyler Grey255115c2024-04-20 21:46:37 +000019 default = [ ];
Skyler Grey4e230892024-02-13 22:58:46 +000020 };
21 };
22 config = lib.mkIf config.chimera.browser.firefox.enable ({
23 programs.firefox = {
24 enable = true;
Samuel Shuert02ffd1e2024-02-13 21:37:15 -050025 profiles.chimera.extensions =
26 (
27 if config.chimera.browser.firefox.extensions.bitwarden.enable then
28 [ config.nur.repos.rycee.firefox-addons.bitwarden ]
29 else
30 [ ]
31 )
32 ++ (
33 if config.chimera.browser.firefox.extensions.youtube.sponsorBlock.enable then
34 [ config.nur.repos.rycee.firefox-addons.sponsorblock ]
35 else
36 [ ]
37 )
38 ++ (
39 if config.chimera.browser.firefox.extensions.youtube.returnDislike.enable then
40 [ config.nur.repos.rycee.firefox-addons.return-youtube-dislikes ]
41 else
42 [ ]
43 )
44 ++ (
45 if config.chimera.browser.firefox.extensions.youtube.deArrow.enable then
46 [ config.nur.repos.rycee.firefox-addons.dearrow ]
47 else
48 [ ]
49 )
50 ++ (
51 if config.chimera.browser.firefox.extensions.reactDevTools.enable then
52 [ config.nur.repos.rycee.firefox-addons.react-devtools ]
53 else
54 [ ]
55 )
56 ++ (
57 if config.chimera.browser.firefox.extensions.ublockOrigin.enable then
58 [ config.nur.repos.rycee.firefox-addons.ublock-origin ]
59 else
60 [ ]
61 )
62 ++ (
63 if config.chimera.browser.firefox.extensions.adnauseam.enable then
64 [ config.nur.repos.rycee.firefox-addons.adnauseam ]
65 else
66 [ ]
67 )
Skyler Grey4e230892024-02-13 22:58:46 +000068 ++ config.chimera.browser.firefox.extraExtensions;
69 };
70 });
Samuel Shuert02ffd1e2024-02-13 21:37:15 -050071}