tomfoolery

This commit is contained in:
caem 2025-01-25 03:17:55 +01:00
parent 7be4513718
commit a2d348cca0
Signed by: caem
GPG key ID: 69A830D03203405F
3 changed files with 64 additions and 67 deletions

View file

@ -1,62 +0,0 @@
{
"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,
"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)"
]
}
}
}

View file

@ -0,0 +1,61 @@
{
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;
}
];
Remove = [ "Bing" "Google" "DuckDuckGo" "Wikipedia (en)" ];
};
}

View file

@ -4,11 +4,9 @@
{ cfgPath, ... }: final: prev: {
firefox-esr = let
intermediary-firefox-esr = prev.firefox-esr.overrideAttrs (oldAttrs: {
postInstall = (oldAttrs.postInstall or "") + ''
cp "${cfgPath}/modules/nixos/multimedia/web/firefox/polcies.json" $out/lib/distribution/policies.json
'';
});
intermediary-firefox-esr = prev.firefox-esr.override {
extraPolicies = import "${cfgPath}/modules/nixos/multimedia/web/firefox/polcies.nix";
};
sandboxed-firefox-esr = prev.mkNixPak {
config = { sloth, ... }: {