diff --git a/home/default.nix b/home/default.nix index 2f92758..a7609ef 100644 --- a/home/default.nix +++ b/home/default.nix @@ -4,6 +4,7 @@ ./bat.nix ./direnv.nix ./documentation.nix + ./firefox ./flameshot.nix ./git ./gpg.nix diff --git a/home/firefox/default.nix b/home/firefox/default.nix new file mode 100644 index 0000000..1391052 --- /dev/null +++ b/home/firefox/default.nix @@ -0,0 +1,19 @@ +{ config, lib, ... }: +{ + 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; + }; + }; + }; + + imports = [ + ./firefox.nix + ]; +} diff --git a/home/firefox/firefox.nix b/home/firefox/firefox.nix new file mode 100644 index 0000000..f4bc675 --- /dev/null +++ b/home/firefox/firefox.nix @@ -0,0 +1,40 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.my.home.firefox; +in +{ + config.programs.firefox = lib.mkIf cfg.enable { + enable = true; + + 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.visible" = true; # Enable DRM + "media.gmp-widevinecdm.enabled" = true; # Enable DRM + "signon.autofillForms" = false; # Disable built-in form-filling + "signon.rememberSignons" = false; # Disable built-in password manager + "ui.systemUsesDarkTheme" = true; # Dark mode + }; + }; + }; + + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + bitwarden + https-everywhere + i-dont-care-about-cookies + reddit-enhancement-suite + ublock-origin + ] ++ lib.optional (cfg.tridactyl.enable) tridactyl; + }; +}