This commit is contained in:
caem 2025-01-25 02:35:38 +01:00
parent e935526233
commit 6099ce1af4
Signed by: caem
GPG key ID: 69A830D03203405F

View file

@ -3,6 +3,7 @@
{
environment.systemPackages = with pkgs; [
tor-browser
firefox-esr
];
environment.persistence."/nix/config" = {
@ -11,67 +12,72 @@
];
};
programs.firefox = {
enable = true;
policies = {
EnableTrackingProtection = {
Value = true;
Cryptomining = true;
Fingerprinting = true;
EmailTracking = true;
Level = "strict";
};
DisableTelemetry = true;
DisablePocket = true;
DisableFirefoxStudies = true;
DisableFirefoxAccounts = false;
DisableAccounts = false;
DontCheckDefaultBrowser = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
NoDefaultBookmarks = true;
Cookies = {
Behaviour = "reject-foreign";
BehaviourPrivateBrowsing = "reject-foreign";
};
UserMessaging = {
WhatsNew = false;
ExtensionRecommendations = false;
FeatureRecommendations = false;
UrlbarInterventions = false;
SkipOnboarding = true;
MoreFromMozilla = false;
};
FirefoxHome = {
Search = true;
TopSites = true;
SponsoredTopSites = false;
Highlights = false;
Pocket = false;
SponsoredPocket = false;
Snippets = false;
Locked = true;
};
SearchSuggestEnabled = false;
ShowSearchSuggestionsFirst = false;
NewTabPage = false;
SearchEngines = { # ESR only
Add = [
{
Name = "Kagi";
URLTemplate = "https://kagi.com/search?q={searchTerms}";
Method = "GET";
IconURL = "https://kagi.com/favicon.ico";
Alias = "@k";
Default = true;
environment.etc."firefox/policies/policies.json" = {
mode = "0444";
text = ''
{
"policies": {
"EnableTrackingProtection": {
"Value": true,
"Cryptomining": true,
"Fingerprinting": true,
"EmailTracking": true,
"Level": "strict"
},
"DisableTelemetry": true,
"DisablePocket": true,
"DisableFirefoxStudies": true,
"DisableFirefoxAccounts": false,
"DisableAccounts": false,
"DontCheckDefaultBrowser": true,
"OverrideFirstRunPage": "",
"OverridePostUpdatePage": "",
"NoDefaultBookmarks": true,
"Cookies": {
"Behavior": "reject-foreign",
"BehaviorPrivateBrowsing": "reject-foreign"
},
"UserMessaging": {
"WhatsNew": false,
"ExtensionRecommendations": false,
"FeatureRecommendations": false,
"UrlbarInterventions": false,
"SkipOnboarding": true,
"MoreFromMozilla": false
},
"FirefoxHome": {
"Search": true,
"TopSites": true,
"SponsoredTopSites": false,
"Highlights": false,
"Pocket": false,
"SponsoredPocket": false,
"Snippets": false,
"Locked": true
},
"SearchSuggestEnabled": false,
"ShowSearchSuggestionsFirst": false,
"NewTabPage": false,
"SearchEngines": {
"Add": [
{
"Name": "Kagi",
"URLTemplate": "https://kagi.com/search?q={searchTerms}",
"Method": "GET",
"IconURL": "https://kagi.com/favicon.ico",
"Alias": "@k",
"Default": true
}
],
"Remove": [
"Bing",
"Google",
"DuckDuckGo",
"Wikipedia (en)"
]
}
];
Remove = [ "Bing" "Google" "DuckDuckGo" "Wikipedia (en)" ];
};
};
}
}
'';
};
}