mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Packages] Add custom firefox configuration.
With enterprise policies to selectively enable/disable things, and preinstall extensions Also disable firefox config for aviallon
This commit is contained in:
parent
5ae84ffe56
commit
71f5d703f2
3 changed files with 78 additions and 0 deletions
|
|
@ -154,6 +154,7 @@ in {
|
|||
# programs.gnupg.agent.pinentryFlavor = "qt";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
myFirefox
|
||||
chromium
|
||||
p7zip
|
||||
vlc
|
||||
|
|
|
|||
|
|
@ -121,6 +121,8 @@ in
|
|||
enableWideVine = true;
|
||||
};
|
||||
# chromium = self.ungoogled-chromium;
|
||||
|
||||
myFirefox = (import ./packages/firefox.nix { pkgs = self; inherit lib; });
|
||||
})
|
||||
];
|
||||
|
||||
|
|
|
|||
75
packages/firefox.nix
Normal file
75
packages/firefox.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{pkgs, lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
genPrefList = {locked ? false}: prefs: concatStringsSep "\n" (
|
||||
mapAttrsToList
|
||||
(key: value: ''lockPref(${toString key}, ${builtins.toJSON value});'')
|
||||
prefs
|
||||
);
|
||||
in pkgs.wrapFirefox pkgs.firefox-esr-unwrapped {
|
||||
cfg = {
|
||||
smartcardSupport = true;
|
||||
enablePlasmaBrowserIntegration = true;
|
||||
};
|
||||
|
||||
extraPolicies = {
|
||||
CaptivePortal = true;
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxAccounts = false;
|
||||
FirefoxHome = {
|
||||
Pocket = false;
|
||||
Snippets = false;
|
||||
};
|
||||
HardwareAcceleration = true;
|
||||
UserMessaging = {
|
||||
ExtensionRecommendations = false;
|
||||
SkipOnboarding = true;
|
||||
WhatsNew = false;
|
||||
MoreFromMozilla = false;
|
||||
};
|
||||
SSLVersionMin = "tls1.2";
|
||||
SearchSuggestEnabled = true;
|
||||
SearchEngines = {
|
||||
Add = [
|
||||
{
|
||||
Name = "DuckDuckGo";
|
||||
URLTemplate = "https://duckduckgo.com/?kp=1&k1=-1&kak=-1&kax=-1&kau=-1&kae=d&kaj=m&kam=osm&kav=1&kf=fw&q={searchTerms}";
|
||||
Method = "GET";
|
||||
IconURL = "https://duckduckgo.com/favicon.png";
|
||||
Description = "Your privacy, simplified";
|
||||
}
|
||||
];
|
||||
Default = "DuckDuckGo";
|
||||
};
|
||||
SupportMenu = {
|
||||
Title = "Support";
|
||||
URL = "mailto:antoine@lesviallon.fr";
|
||||
AccessKey = "S";
|
||||
};
|
||||
Extensions = {
|
||||
Install = [
|
||||
"uBlock0@raymondhill.net"
|
||||
];
|
||||
};
|
||||
ExtensionSettings = {
|
||||
"uBlock0@raymondhill.net" = {
|
||||
installation_mode = "force_installed";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
};
|
||||
};
|
||||
ExtensionUpdate = true;
|
||||
};
|
||||
|
||||
extraPrefs = genPrefList { locked = true; } {
|
||||
"intl.accept_languages" = "";
|
||||
"widget.use-xdg-desktop-portal" = true;
|
||||
"dom.event.contextmenu.enabled" = true;
|
||||
"network.IDN_show_punycode" = true;
|
||||
"plugins.enumerable_names" = true;
|
||||
"security.identityblock.show_extended_validation" = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue