2021-12-14 05:24:26 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
2022-08-14 02:42:04 +00:00
|
|
|
cfg = config.my.application.firefox;
|
|
|
|
graphical = config.my.graphical;
|
2021-12-14 05:24:26 +00:00
|
|
|
in with lib; {
|
2022-08-14 02:42:04 +00:00
|
|
|
options.my.application.firefox = {
|
2022-07-23 19:00:49 +00:00
|
|
|
enable = mkOption {
|
2022-03-24 04:00:26 +00:00
|
|
|
default = graphical.enable;
|
|
|
|
type = with types; bool;
|
2022-07-23 19:00:49 +00:00
|
|
|
};
|
|
|
|
pkg = mkOption {
|
|
|
|
default =
|
|
|
|
pkgs.firefox.override { cfg = { enableTridactylNative = true; }; };
|
|
|
|
type = with types; package;
|
2021-12-14 05:24:26 +00:00
|
|
|
};
|
|
|
|
};
|
2021-12-02 05:06:32 +00:00
|
|
|
|
2021-12-14 05:24:26 +00:00
|
|
|
config = mkIf cfg.enable {
|
2022-04-27 03:48:18 +00:00
|
|
|
environment.sessionVariables = { MOZ_USE_XINPUT2 = "1"; };
|
2021-11-29 03:06:47 +00:00
|
|
|
|
2022-03-24 04:01:19 +00:00
|
|
|
home-manager.users.james = {
|
2021-12-14 05:24:26 +00:00
|
|
|
programs.firefox = {
|
|
|
|
enable = true;
|
2022-07-23 19:00:49 +00:00
|
|
|
package = cfg.pkg;
|
2021-11-29 03:06:47 +00:00
|
|
|
|
2021-12-14 05:24:26 +00:00
|
|
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
|
|
https-everywhere
|
2022-03-17 02:43:41 +00:00
|
|
|
onepassword-password-manager
|
|
|
|
simple-tab-groups
|
|
|
|
ublock-origin
|
2021-12-14 05:24:26 +00:00
|
|
|
];
|
2021-11-29 03:06:47 +00:00
|
|
|
|
2021-12-14 05:24:26 +00:00
|
|
|
profiles = {
|
|
|
|
default = {
|
|
|
|
name = "primary";
|
|
|
|
id = 0;
|
|
|
|
settings = {
|
2022-03-08 05:17:26 +00:00
|
|
|
# Don't ask for download location
|
|
|
|
"browser.download.useDownloadDir" = false;
|
|
|
|
# Use Darkmode
|
|
|
|
"browser.in-content.dark-mode" = true;
|
|
|
|
# Disable Top Stories on homepage.
|
2021-12-14 05:24:26 +00:00
|
|
|
"browser.newtabpage.activity-stream.feeds.section.topstories" =
|
2022-03-08 05:17:26 +00:00
|
|
|
false;
|
|
|
|
# Disable Feed on homepage.
|
2021-12-14 05:24:26 +00:00
|
|
|
"browser.newtabpage.activity-stream.feeds.sections" = false;
|
2022-03-08 05:17:26 +00:00
|
|
|
# Disable pocket on homepage.
|
2021-12-14 05:24:26 +00:00
|
|
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" =
|
2022-03-08 05:17:26 +00:00
|
|
|
false;
|
|
|
|
# Enable DRM
|
|
|
|
"media.eme.enabled" = true;
|
|
|
|
"media.gmp-widevinecdm.visible" = true;
|
|
|
|
"media.gmp-widevinecdm.enabled" = true;
|
|
|
|
# Disable built-in form-filling
|
|
|
|
"signon.autofillForms" = false;
|
|
|
|
# Disable built-in password manager
|
|
|
|
"signon.rememberSignons" = false;
|
|
|
|
# No really use Darkmode
|
2021-12-14 05:24:26 +00:00
|
|
|
"ui.systemUsesDarkTheme" = true; # Dark mode
|
|
|
|
};
|
2021-11-29 03:06:47 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|