blob: 3fcbf0665f677817c658ee0fc30ed79390652d87 [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";
19 };
20 };
21 config = lib.mkIf config.chimera.browser.firefox.enable ({
22 programs.firefox = {
23 enable = true;
Samuel Shuert02ffd1e2024-02-13 21:37:15 -050024 profiles.chimera.extensions =
25 (
26 if config.chimera.browser.firefox.extensions.bitwarden.enable then
27 [ config.nur.repos.rycee.firefox-addons.bitwarden ]
28 else
29 [ ]
30 )
31 ++ (
32 if config.chimera.browser.firefox.extensions.youtube.sponsorBlock.enable then
33 [ config.nur.repos.rycee.firefox-addons.sponsorblock ]
34 else
35 [ ]
36 )
37 ++ (
38 if config.chimera.browser.firefox.extensions.youtube.returnDislike.enable then
39 [ config.nur.repos.rycee.firefox-addons.return-youtube-dislikes ]
40 else
41 [ ]
42 )
43 ++ (
44 if config.chimera.browser.firefox.extensions.youtube.deArrow.enable then
45 [ config.nur.repos.rycee.firefox-addons.dearrow ]
46 else
47 [ ]
48 )
49 ++ (
50 if config.chimera.browser.firefox.extensions.reactDevTools.enable then
51 [ config.nur.repos.rycee.firefox-addons.react-devtools ]
52 else
53 [ ]
54 )
55 ++ (
56 if config.chimera.browser.firefox.extensions.ublockOrigin.enable then
57 [ config.nur.repos.rycee.firefox-addons.ublock-origin ]
58 else
59 [ ]
60 )
61 ++ (
62 if config.chimera.browser.firefox.extensions.adnauseam.enable then
63 [ config.nur.repos.rycee.firefox-addons.adnauseam ]
64 else
65 [ ]
66 )
Skyler Grey4e230892024-02-13 22:58:46 +000067 ++ config.chimera.browser.firefox.extraExtensions;
68 };
69 });
Samuel Shuert02ffd1e2024-02-13 21:37:15 -050070}