This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/modules/applications/firefox/default.nix

67 lines
2.0 KiB
Nix
Raw Normal View History

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 {
environment.sessionVariables = { MOZ_USE_XINPUT2 = "1"; };
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-12-14 05:24:26 +00:00
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
https-everywhere
onepassword-password-manager
simple-tab-groups
ublock-origin
2021-12-14 05:24:26 +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
};
};
};
};
};
};
}