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.nix

74 lines
2.4 KiB
Nix
Raw Normal View History

2021-12-14 05:24:26 +00:00
{ config, pkgs, lib, ... }:
let
2021-12-16 01:58:52 +00:00
cfg = config.this.application.firefox;
2021-12-15 05:27:39 +00:00
graphical = config.this.graphical;
2021-12-14 05:24:26 +00:00
in with lib; {
options = {
2022-03-24 04:00:26 +00:00
this.application.firefox.enable = mkOption {
default = graphical.enable;
type = with types; bool;
description = "";
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;
package =
pkgs.firefox.override { cfg = { enableTridactylNative = true; }; };
2021-12-14 05:24:26 +00:00
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
https-everywhere
onepassword-password-manager
simple-tab-groups
2021-12-14 05:24:26 +00:00
tridactyl
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
};
};
};
};
2022-05-03 04:11:02 +00:00
home.packages = with pkgs; [ tridactyl-native ];
2021-12-14 05:24:26 +00:00
# This is a bit silly as this is currently managed by my make dot config.
xdg.configFile."tridactyl/tridactylrc".source = pkgs.fetchurl {
url =
"https://git.jpatrick.io/james/dotfiles/raw/branch/master/tridactyl/tridactylrc";
sha256 = "sha256-iOBd/yEvQP/Gn3+lS2Ztu9oslllZU4G7VnM4pTck+Tg=";
};
};
};
}