2021-10-03 15:53:04 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.my.home.firefox;
|
|
|
|
in
|
2021-04-05 13:55:42 +02:00
|
|
|
{
|
2021-10-03 15:53:04 +02:00
|
|
|
imports = [
|
|
|
|
./tridactyl
|
|
|
|
];
|
|
|
|
|
2021-04-05 13:55:42 +02:00
|
|
|
options.my.home.firefox = with lib; {
|
|
|
|
enable = mkEnableOption "firefox configuration";
|
|
|
|
|
|
|
|
tridactyl = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
description = "tridactyl configuration";
|
|
|
|
example = false;
|
|
|
|
default = config.my.home.firefox.enable;
|
|
|
|
};
|
|
|
|
};
|
2021-05-15 21:28:10 +02:00
|
|
|
|
|
|
|
ff2mpv = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
description = "ff2mpv configuration";
|
|
|
|
example = false;
|
|
|
|
default = config.my.home.mpv.enable;
|
|
|
|
};
|
|
|
|
};
|
2021-04-05 13:55:42 +02:00
|
|
|
};
|
|
|
|
|
2021-10-03 15:53:04 +02:00
|
|
|
config.programs.firefox = lib.mkIf cfg.enable {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
package = pkgs.firefox.override {
|
2023-10-26 15:47:29 +02:00
|
|
|
nativeMessagingHosts = ([ ]
|
|
|
|
++ lib.optional cfg.tridactyl.enable pkgs.tridactyl-native
|
2021-10-03 15:53:04 +02:00
|
|
|
# Watch videos using mpv
|
2023-10-26 15:47:29 +02:00
|
|
|
++ lib.optional cfg.ff2mpv.enable pkgs.ambroisie.ff2mpv-go
|
2021-10-03 15:53:04 +02:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
profiles = {
|
|
|
|
default = {
|
|
|
|
id = 0;
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
"browser.bookmarks.showMobileBookmarks" = true; # Mobile bookmarks
|
|
|
|
"browser.download.useDownloadDir" = false; # Ask for download location
|
|
|
|
"browser.in-content.dark-mode" = true; # Dark mode
|
|
|
|
"browser.newtabpage.activity-stream.feeds.section.topstories" = false; # Disable top stories
|
|
|
|
"browser.newtabpage.activity-stream.feeds.sections" = false;
|
|
|
|
"browser.newtabpage.activity-stream.feeds.system.topstories" = false; # Disable top stories
|
|
|
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false; # Disable pocket
|
|
|
|
"extensions.pocket.enabled" = false; # Disable pocket
|
|
|
|
"media.eme.enabled" = true; # Enable DRM
|
|
|
|
"media.gmp-widevinecdm.enabled" = true; # Enable DRM
|
2023-06-10 23:57:05 +02:00
|
|
|
"media.gmp-widevinecdm.visible" = true; # Enable DRM
|
2021-10-03 15:53:04 +02:00
|
|
|
"signon.autofillForms" = false; # Disable built-in form-filling
|
|
|
|
"signon.rememberSignons" = false; # Disable built-in password manager
|
|
|
|
"ui.systemUsesDarkTheme" = true; # Dark mode
|
|
|
|
};
|
2023-02-08 23:02:22 +01:00
|
|
|
|
|
|
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; ([
|
|
|
|
bitwarden
|
|
|
|
consent-o-matic
|
|
|
|
form-history-control
|
|
|
|
reddit-comment-collapser
|
|
|
|
reddit-enhancement-suite
|
|
|
|
refined-github
|
|
|
|
sponsorblock
|
|
|
|
ublock-origin
|
|
|
|
]
|
|
|
|
++ lib.optional (cfg.tridactyl.enable) tridactyl
|
|
|
|
++ lib.optional (cfg.ff2mpv.enable) ff2mpv
|
|
|
|
);
|
2021-10-03 15:53:04 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-04-05 13:55:42 +02:00
|
|
|
}
|