backwards: Add firefox
This commit is contained in:
99
hosts/backwards/modules/firefox/default.nix
Normal file
99
hosts/backwards/modules/firefox/default.nix
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
wrapped = pkgs.wrapFirefox pkgs.firefox-devedition-unwrapped {
|
||||||
|
extraPolicies = {
|
||||||
|
DisableFirefoxAccounts = false;
|
||||||
|
CaptivePortal = false;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
DisablePocket = true;
|
||||||
|
DisableTelemetry = true;
|
||||||
|
OfferToSaveLogins = false;
|
||||||
|
OfferToSaveLoginsDefault = false;
|
||||||
|
PasswordManagerEnabled = false;
|
||||||
|
|
||||||
|
FirefoxHome = {
|
||||||
|
Search = false;
|
||||||
|
Pocket = false;
|
||||||
|
Snippets = false;
|
||||||
|
TopSites = false;
|
||||||
|
Highlights = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
UserMessaging = {
|
||||||
|
ExtensionRecommendations = false;
|
||||||
|
SkipOnboarding = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ff-alex = pkgs.writeShellApplication {
|
||||||
|
name = "ff-alex";
|
||||||
|
text = ''
|
||||||
|
${wrapped}/bin/firefox -P alex --new-window "$@"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
sharedSettings = {
|
||||||
|
"general.smoothScroll" = true;
|
||||||
|
"apz.gtk.kinetic_scroll.enabled" = false;
|
||||||
|
"network.dns.force_waiting_https_rr" = false;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.alex = {
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
package = wrapped;
|
||||||
|
|
||||||
|
profiles = {
|
||||||
|
alex = {
|
||||||
|
id = 0;
|
||||||
|
name = "alex";
|
||||||
|
isDefault = true;
|
||||||
|
|
||||||
|
settings = sharedSettings // { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg = {
|
||||||
|
# /etc/profiles/per-user/alex/share/applications
|
||||||
|
desktopEntries = {
|
||||||
|
ff-alex = {
|
||||||
|
name = "ff-alex";
|
||||||
|
exec = "${ff-alex}/bin/ff-alex %U";
|
||||||
|
terminal = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
defaultApplications = {
|
||||||
|
"text/html" = "ff-alex.desktop";
|
||||||
|
"x-scheme-handler/http" = "ff-alex.desktop";
|
||||||
|
"x-scheme-handler/https" = "ff-alex.desktop";
|
||||||
|
"application/x-exension-htm" = "ff-alex.desktop";
|
||||||
|
"application/x-exension-html" = "ff-alex.desktop";
|
||||||
|
"application/x-exension-shtml" = "ff-alex.desktop";
|
||||||
|
"application/xhtml+xml" = "ff-alex.desktop";
|
||||||
|
"application/x-exension-xhtml" = "ff-alex.desktop";
|
||||||
|
"application/x-exension-xht" = "ff-alex.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# https://github.com/nix-community/home-manager/issues/1213
|
||||||
|
configFile."mimeapps.list".force = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
ff-alex
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
MOZ_ENABLE_WAYLAND = 1;
|
||||||
|
BROWSER = "${ff-alex}/bin/ff-alex $@";
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user