2023-02-07 17:00:04 +04:00
|
|
|
{ config, pkgs, lib, inputs, ... }:
|
2021-06-10 19:58:51 +04:00
|
|
|
let
|
2021-12-23 22:23:03 +04:00
|
|
|
thm = pkgs.my-lib.thmHash config.themes.colors;
|
2021-06-10 19:58:51 +04:00
|
|
|
fonts = config.themes.fonts;
|
2020-02-17 17:00:59 +04:00
|
|
|
in {
|
2023-02-16 18:51:34 +04:00
|
|
|
services.dbus.packages = [ pkgs.firefox-wayland ];
|
|
|
|
|
2020-04-20 16:12:46 +04:00
|
|
|
environment.sessionVariables = {
|
|
|
|
MOZ_USE_XINPUT2 = "1";
|
|
|
|
MOZ_DBUS_REMOTE = "1";
|
|
|
|
};
|
2021-01-11 18:09:34 +04:00
|
|
|
programs.browserpass.enable = true;
|
2021-06-08 20:35:21 +04:00
|
|
|
|
|
|
|
persist.state.directories = [ "/home/balsoft/.mozilla/firefox/default" ];
|
|
|
|
|
2021-06-14 12:57:39 +04:00
|
|
|
defaultApplications.browser = {
|
|
|
|
cmd = "${pkgs.firefox-wayland}/bin/firefox";
|
|
|
|
desktop = "firefox";
|
|
|
|
};
|
|
|
|
|
2021-11-23 23:48:30 +04:00
|
|
|
home-manager.users.balsoft = {
|
2021-03-18 15:08:07 +04:00
|
|
|
programs.browserpass = {
|
|
|
|
enable = true;
|
|
|
|
browsers = [ "firefox" ];
|
|
|
|
};
|
2021-11-22 19:42:01 +04:00
|
|
|
wayland.windowManager.sway.config = {
|
|
|
|
window.commands = [
|
|
|
|
{
|
|
|
|
criteria = { title = "Firefox — Sharing Indicator"; };
|
|
|
|
command = "floating enable";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
criteria = { title = "Firefox — Sharing Indicator"; };
|
|
|
|
command = "no_focus";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
criteria = { title = "Firefox — Sharing Indicator"; };
|
|
|
|
command = "resize set 0 0";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
criteria = { title = "Firefox — Sharing Indicator"; };
|
|
|
|
command = "move absolute position 10 10";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-07 17:00:04 +04:00
|
|
|
home.file.".mozilla/native-messaging-hosts/tridactyl.json".text = let
|
|
|
|
tridactyl = with pkgs.nimPackages; buildNimPackage {
|
|
|
|
pname = "tridactyl_native";
|
|
|
|
version = "dev";
|
|
|
|
nimBinOnly = true;
|
|
|
|
src = inputs.tridactyl-native-messenger;
|
|
|
|
buildInputs = [ tempfile ];
|
|
|
|
};
|
|
|
|
in builtins.toJSON {
|
|
|
|
name = "tridactyl";
|
|
|
|
description = "Tridactyl native command handler";
|
|
|
|
path = "${tridactyl}/bin/native_main";
|
|
|
|
type = "stdio";
|
|
|
|
|
|
|
|
allowed_extensions = [
|
|
|
|
"tridactyl.vim@cmcaine.co.uk"
|
|
|
|
"tridactyl.vim.betas@cmcaine.co.uk"
|
|
|
|
"tridactyl.vim.betas.nonewtab@cmcaine.co.uk"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
xdg.configFile."tridactyl/tridactylrc".text = ''
|
|
|
|
js tri.config.set("editorcmd", "alacritty -e hx")
|
|
|
|
'';
|
|
|
|
|
2020-02-17 17:00:59 +04:00
|
|
|
programs.firefox = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.firefox-wayland;
|
|
|
|
profiles.default = {
|
|
|
|
id = 0;
|
|
|
|
userChrome = ''
|
|
|
|
#TabsToolbar {
|
|
|
|
visibility: collapse;
|
|
|
|
}
|
|
|
|
toolbar#nav-bar, nav-bar-customization-target {
|
2021-06-10 19:58:51 +04:00
|
|
|
background: ${thm.base00} !important;
|
2020-02-17 17:00:59 +04:00
|
|
|
}
|
|
|
|
@-moz-document url("about:newtab") {
|
2021-06-10 19:58:51 +04:00
|
|
|
* { background-color: ${thm.base00} !important; }
|
2020-02-17 17:00:59 +04:00
|
|
|
}
|
|
|
|
'';
|
|
|
|
settings = {
|
|
|
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
|
|
|
|
|
|
|
"extensions.autoDisableScopes" = 0;
|
|
|
|
|
|
|
|
"browser.search.defaultenginename" = "Google";
|
|
|
|
"browser.search.selectedEngine" = "Google";
|
|
|
|
"browser.urlbar.placeholderName" = "Google";
|
|
|
|
"browser.search.region" = "US";
|
2021-06-10 19:58:51 +04:00
|
|
|
|
2020-02-17 17:00:59 +04:00
|
|
|
"browser.uidensity" = 1;
|
|
|
|
"browser.search.openintab" = true;
|
|
|
|
"xpinstall.signatures.required" = false;
|
|
|
|
"extensions.update.enabled" = false;
|
|
|
|
|
2021-06-10 19:58:51 +04:00
|
|
|
"font.name.monospace.x-western" = "${fonts.mono.family}";
|
|
|
|
"font.name.sans-serif.x-western" = "${fonts.main.family}";
|
|
|
|
"font.name.serif.x-western" = "${fonts.serif.family}";
|
2020-02-17 17:00:59 +04:00
|
|
|
|
2021-06-10 19:58:51 +04:00
|
|
|
"browser.display.background_color" = thm.base00;
|
|
|
|
"browser.display.foreground_color" = thm.base05;
|
2020-02-17 17:00:59 +04:00
|
|
|
"browser.display.document_color_use" = 2;
|
2021-06-10 19:58:51 +04:00
|
|
|
"browser.anchor_color" = thm.base0D;
|
|
|
|
"browser.visited_color" = thm.base0C;
|
2020-02-17 17:00:59 +04:00
|
|
|
"browser.display.use_document_fonts" = true;
|
|
|
|
"pdfjs.disabled" = true;
|
|
|
|
"media.videocontrols.picture-in-picture.enabled" = true;
|
2021-06-07 19:48:15 +04:00
|
|
|
|
|
|
|
"widget.non-native-theme.enabled" = false;
|
2021-06-09 00:44:49 +04:00
|
|
|
|
|
|
|
"browser.newtabpage.enabled" = false;
|
|
|
|
"browser.startup.homepage" = "about:blank";
|
2021-07-11 17:13:02 +04:00
|
|
|
|
|
|
|
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
|
|
|
|
"browser.newtabpage.activity-stream.telemetry" = false;
|
|
|
|
"browser.ping-centre.telemetry" = false;
|
|
|
|
"toolkit.telemetry.archive.enabled" = false;
|
|
|
|
"toolkit.telemetry.bhrPing.enabled" = false;
|
|
|
|
"toolkit.telemetry.enabled" = false;
|
|
|
|
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
|
|
|
"toolkit.telemetry.hybridContent.enabled" = false;
|
|
|
|
"toolkit.telemetry.newProfilePing.enabled" = false;
|
|
|
|
"toolkit.telemetry.reportingpolicy.firstRun" = false;
|
|
|
|
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
|
|
|
"toolkit.telemetry.unified" = false;
|
|
|
|
"toolkit.telemetry.updatePing.enabled" = false;
|
|
|
|
|
|
|
|
"experiments.activeExperiment" = false;
|
|
|
|
"experiments.enabled" = false;
|
|
|
|
"experiments.supported" = false;
|
|
|
|
"network.allow-experiments" = false;
|
2020-02-17 17:00:59 +04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
extensions = with pkgs.nur.rycee.firefox-addons; [
|
|
|
|
adsum-notabs
|
|
|
|
ublock-origin
|
2021-01-11 18:09:34 +04:00
|
|
|
browserpass
|
2023-02-07 17:00:04 +04:00
|
|
|
tridactyl
|
2020-02-17 17:00:59 +04:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|