forked from nico/dots
chore: organise modules
Organise modules in a significantly better way with categories.
This commit is contained in:
parent
7444260d7d
commit
3660ef23f1
33 changed files with 77 additions and 76 deletions
138
modules/browser/firefox.nix
Normal file
138
modules/browser/firefox.nix
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.firefox.enable = true;
|
||||
programs.firefox.policies = {
|
||||
ExtensionSettings = {
|
||||
"uBlock0@raymondhill.net" = {
|
||||
installation_mode = "force_installed";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||
};
|
||||
"@testpilot-containers" = {
|
||||
installation_mode = "force_installed";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/multi-account-containers/latest.xpi";
|
||||
};
|
||||
"addon@darkreader.org" = {
|
||||
installation_mode = "force_installed";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/darkreader/latest.xpi";
|
||||
};
|
||||
"{7b5c3b96-01b3-48d8-a019-cdc24c31befb}" = {
|
||||
installation_mode = "force_installed";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/temporarytabcontainer/latest.xpi";
|
||||
};
|
||||
"keepassxc-browser@keepassxc.org" = {
|
||||
installation_mode = "force_installed";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/keepassxc-browser/latest.xpi";
|
||||
};
|
||||
"pywalfox@frewacom.org" = {
|
||||
installation_mode = "force_installed";
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/pywalfox/latest.xpi";
|
||||
};
|
||||
};
|
||||
|
||||
# Privacy & Security
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
DisableSecurityBypass.InvalidCertificate = true;
|
||||
DisableSecurityBypass.SafeBrowsing = true;
|
||||
|
||||
EnableTrackingProtection.Value = true;
|
||||
EnableTrackingProtection.Locked = true;
|
||||
EnableTrackingProtection.Cryptomining = true;
|
||||
EnableTrackingProtection.FingerPrinting = true;
|
||||
|
||||
HttpsOnlyMode = "force_enabled";
|
||||
PostQuantumKeyAgreementEnabled = true;
|
||||
DNSOverHTTPS.Enabled = true;
|
||||
DNSOverHTTPS.ProviderURL = "https://mozilla.cloudflare-dns.com/dns-query";
|
||||
DNSOverHTTPS.Locked = true;
|
||||
DNSOverHTTPS.Fallback = true;
|
||||
|
||||
NetworkPrediction = false;
|
||||
SearchSuggestEnabled = false;
|
||||
FirefoxSuggest.WebSuggestions = false;
|
||||
FirefoxSuggest.SponsoredSuggestions = false;
|
||||
FirefoxSuggest.ImproveSuggest = false;
|
||||
FirefoxSuggest.Locked = false;
|
||||
|
||||
SanitizeOnShutdown.Cache = true;
|
||||
SanitizeOnShutdown.History = true;
|
||||
SanitizeOnShutdown.SiteSettings = true;
|
||||
SanitizeOnShutdown.Locked = true;
|
||||
|
||||
# Cosmetic
|
||||
DisplayBookmarksToolbar = "newtab";
|
||||
DisplayMenuBar = "never";
|
||||
ShowHomeButton = false;
|
||||
|
||||
NewTabPage = false;
|
||||
Homepage.URL = "about:blank";
|
||||
Homepage.Locked = true;
|
||||
|
||||
NoDefaultBookmarks = true;
|
||||
|
||||
# Containers
|
||||
Containers = {
|
||||
Default = [
|
||||
{
|
||||
name = "personal";
|
||||
icon = "fingerprint";
|
||||
color = "blue";
|
||||
}
|
||||
{
|
||||
name = "nico";
|
||||
icon = "vacation";
|
||||
color = "red";
|
||||
}
|
||||
{
|
||||
name = "work";
|
||||
icon = "briefcase";
|
||||
color = "green";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Autofill
|
||||
PasswordManagerEnabled = false;
|
||||
OfferToSaveLogins = false;
|
||||
AutofillAddressEnabled = false;
|
||||
AutofillCreditCardEnabled = false;
|
||||
DisableFormHistory = true;
|
||||
|
||||
# Other
|
||||
DontCheckDefaultBrowser = true;
|
||||
DisableMasterPasswordCreation = true;
|
||||
DisableProfileImport = true;
|
||||
};
|
||||
|
||||
programs.firefox.autoConfig = ''
|
||||
// appearance
|
||||
lockPref("sidebar.revamp", true);
|
||||
lockPref("sidebar.verticalTabs", true);
|
||||
lockPref("sidebar.revamp.round-content-area", true);
|
||||
lockPref("sidebar.animation.enabled", false);
|
||||
lockPref("extensions.activeThemeID", "firefox-compact-dark@mozilla.org");
|
||||
lockPref("browser.toolbars.bookmarks.visibility", "newtab");
|
||||
|
||||
// safe autoscroll
|
||||
lockPref("middlemouse.paste", false);
|
||||
lockPref("general.autoScroll", true);
|
||||
|
||||
// auto picture in picture when switch tabs
|
||||
lockPref("media.videocontrols.picture-in-picture.enable-when-switching-tabs.enabled", true);
|
||||
|
||||
// use same search engine (duckduckgo) for private browsing
|
||||
lockPref("browser.search.separatePrivateDefault", false);
|
||||
|
||||
// stop extensions connecting to the internet
|
||||
lockPref(
|
||||
"extensions.webextensions.base-content-security-policy",
|
||||
"default-src 'none'; script-src 'none'; object-src 'none';"
|
||||
);
|
||||
lockPref(
|
||||
"extensions.webextensions.base-content-security-policy.v3",
|
||||
"default-src 'none'; script-src 'none'; object-src 'none';"
|
||||
);
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue