2022-10-18 22:41:40 -03:00
|
|
|
{ config, pkgs, lib, font, ... }:
|
2022-11-07 11:24:40 -03:00
|
|
|
let inherit (import ./variables.nix) desktop;
|
2022-10-18 22:41:40 -03:00
|
|
|
in {
|
|
|
|
config = {
|
|
|
|
programs.firefox = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.firefox;
|
2022-11-10 21:55:46 -03:00
|
|
|
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
|
|
# darkreader
|
|
|
|
# ublock-origin
|
|
|
|
# tree-style-tab
|
|
|
|
# sponsorblock
|
|
|
|
# duckduckgo-privacy-essentials
|
|
|
|
# ];
|
2022-10-18 22:41:40 -03:00
|
|
|
profiles = {
|
|
|
|
main = {
|
|
|
|
isDefault = true;
|
|
|
|
settings = {
|
2022-11-07 11:24:40 -03:00
|
|
|
"devtools.theme" = "auto";
|
2022-10-18 22:41:40 -03:00
|
|
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
2022-11-07 11:24:40 -03:00
|
|
|
"browser.tabs.inTitlebar" = if desktop == "sway" then 0 else 1;
|
2022-10-18 22:41:40 -03:00
|
|
|
|
|
|
|
"media.ffmpeg.vaapi.enabled" = true;
|
2022-11-07 11:24:40 -03:00
|
|
|
"media.ffvpx.enabled" = true;
|
|
|
|
"media.av1.enabled" = true;
|
2022-10-18 22:41:40 -03:00
|
|
|
"gfx.webrender.all" = true;
|
|
|
|
};
|
2022-11-07 11:24:40 -03:00
|
|
|
userChrome = lib.mkIf (desktop == "sway") ''
|
2022-10-22 23:54:02 -03:00
|
|
|
#titlebar { display: none !important; }
|
2022-10-18 22:41:40 -03:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-12-21 21:01:16 -03:00
|
|
|
systemd.user.services = {
|
|
|
|
firefox = {
|
|
|
|
Unit = {
|
|
|
|
Description = "Firefox Web client";
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
After = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
Service = {
|
2022-12-24 10:27:07 -03:00
|
|
|
ExecStartPre = "/usr/bin/env sleep 10s";
|
2022-12-21 21:01:16 -03:00
|
|
|
ExecStart = "${pkgs.firefox}/bin/firefox";
|
|
|
|
Restart = "on-failure";
|
|
|
|
};
|
|
|
|
Install = { WantedBy = [ "sway-session.target" ]; };
|
|
|
|
};
|
|
|
|
};
|
2022-11-07 11:24:40 -03:00
|
|
|
home.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; };
|
2022-10-18 22:41:40 -03:00
|
|
|
};
|
|
|
|
}
|