nix/home-manager/common/software/gui/firefox.nix

89 lines
3.3 KiB
Nix
Raw Normal View History

2024-07-27 17:46:36 +09:00
{ inputs, config, pkgs, theme, lib, ... }: {
2023-09-29 19:18:14 +09:00
2024-01-05 16:13:22 +09:00
# home.file.".mozilla/firefox/nix-user-profile/chrome/firefox-gnome-theme".source = inputs.firefox-gnome-theme;
2023-09-29 19:18:14 +09:00
2023-07-02 22:46:14 +09:00
programs.firefox = {
2023-07-01 22:24:37 +09:00
enable = true;
2023-07-02 09:17:53 +09:00
2023-07-01 22:24:37 +09:00
profiles.default = {
2023-07-01 23:10:50 +09:00
isDefault = true;
name = "default";
2023-11-14 19:31:56 +09:00
# userChrome = ''@import "firefox-gnome-theme/userChrome.css";'';
# userContent = ''@import "firefox-gnome-theme/userContent.css";'';
2023-09-29 19:18:14 +09:00
# https://discourse.nixos.org/t/anyone-using-firefox-gnome-theme-successfully-with-nixos-home-manager/19248/3
settings = {
## Firefox gnome theme ## - https://github.com/rafaelmardojai/firefox-gnome-theme/blob/7cba78f5216403c4d2babb278ff9cc58bcb3ea66/configuration/user.js
# (copied into here because home-manager already writes to user.js)
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; # Enable customChrome.cs
"browser.uidensity" = 0; # Set UI density to normal
"svg.context-properties.content.enabled" = true; # Enable SVG context-propertes
"browser.theme.dark-private-windows" = false; # Disable private window dark theme
};
2023-07-02 09:47:55 +09:00
2023-07-02 16:39:12 +09:00
# https://nur.nix-community.org/repos/rycee/
extensions = with pkgs.nur.repos; [
rycee.firefox-addons.darkreader
rycee.firefox-addons.ublock-origin
rycee.firefox-addons.privacy-redirect
rycee.firefox-addons.link-cleaner
rycee.firefox-addons.adnauseam
2023-12-31 09:25:38 +09:00
rycee.firefox-addons.sponsorblock
2023-07-02 14:12:03 +09:00
];
2023-07-02 14:16:52 +09:00
2024-07-27 20:06:50 +09:00
search.default = "Ecosia";
2023-07-01 22:24:37 +09:00
search.force = true;
2024-07-27 20:06:50 +09:00
search.order = [ "Ecosia" ];
2023-07-01 22:24:37 +09:00
search.engines = {
2024-07-27 20:06:50 +09:00
"Ecosia" = {
urls = [{
template = "https://www.ecosia.org/search";
params = [
{ name = "method"; value = "index"; }
{ name = "q"; value = "{searchTerms}"; }
];
}];
definedAliases = [ "@ec" ];
};
2023-07-01 22:25:57 +09:00
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
2023-07-01 22:24:37 +09:00
2024-04-08 21:56:39 +09:00
"NixOS Options" = {
urls = [{
template = "https://search.nixos.org/options";
params = [
{ name = "type"; value = "options"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ];
};
2023-07-01 22:25:57 +09:00
"NixOS Wiki" = {
2024-04-24 10:51:59 +09:00
urls = [{ template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; }];
2024-04-08 21:56:39 +09:00
iconUpdateURL = "https://wiki.nixos.org/favicon.png";
2023-07-01 22:25:57 +09:00
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
};
2023-08-31 20:55:14 +09:00
"Home Manager Options" = {
2024-04-28 14:53:12 +09:00
urls = [{ template = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master"; }];
2023-08-31 20:55:14 +09:00
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@hm" ];
};
2023-07-01 22:24:37 +09:00
};
2024-07-27 17:46:36 +09:00
extraConfig = builtins.readFile ./firefox/arkenfox-user.js;
2023-07-01 22:24:37 +09:00
};
2023-07-01 22:25:57 +09:00
};
2023-07-01 23:10:50 +09:00
}