clean up 'scope' decl
This commit is contained in:
parent
453d780695
commit
cb72b47661
28 changed files with 261 additions and 195 deletions
|
|
@ -1,98 +1,60 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
scope,
|
||||
inputs,
|
||||
getFlakePkg,
|
||||
...
|
||||
}:
|
||||
scope "apps.browser" <| getFlakePkg inputs.helium
|
||||
# let
|
||||
# officialAddon = name: {
|
||||
# install_url = lib.strings.concatStrings [
|
||||
# "https://addons.mozilla.org/firefox/downloads/latest/"
|
||||
# name
|
||||
# "/latest.xpi"
|
||||
# ];
|
||||
# installation_mode = "force_installed";
|
||||
# };
|
||||
# lock-false = {
|
||||
# Value = false;
|
||||
# Status = "locked";
|
||||
# };
|
||||
# lock-true = {
|
||||
# Value = true;
|
||||
# Status = "locked";
|
||||
# };
|
||||
# in
|
||||
# scope "programs.firefox" {
|
||||
# enable = true;
|
||||
|
||||
# policies = {
|
||||
# DisableTelemetry = true;
|
||||
# DisableFirefoxStudies = true;
|
||||
# EnableTrackingProtection = {
|
||||
# Value = true;
|
||||
# Locked = true;
|
||||
# Cryptomining = true;
|
||||
# Fingerprinting = true;
|
||||
# };
|
||||
# DisablePocket = true;
|
||||
# DisableFirefoxAccounts = true;
|
||||
# DisableAccounts = true;
|
||||
# DisableFirefoxScreenshots = true;
|
||||
# DisableAppUpdate = true;
|
||||
# DisablePrivateBrowsing = true;
|
||||
# DontCheckDefaultBrowser = true;
|
||||
|
||||
# OverrideFirstRunPage = "";
|
||||
# OverridePostUpdatePage = "";
|
||||
# DisplayBookmarksToolbar = "newtab"; # alternatives: "always" or "newtab"
|
||||
# DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
|
||||
# SearchBar = "unified"; # alternative: "separate"
|
||||
|
||||
# ExtensionSettings = {
|
||||
# "*".installation_mode = "blocked"; # blocks all addons except the ones specified below
|
||||
# "uBlock0@raymondhill.net" = officialAddon "ublock-origin";
|
||||
# "addon@darkreader.org" = officialAddon "darkreader";
|
||||
# "vimium-c@gdh1995.cn" = officialAddon "vimium-c";
|
||||
# "{b86e4813-687a-43e6-ab65-0bde4ab75758}" = officialAddon "localcdn-fork-of-decentraleyes";
|
||||
# "jid1-5Fs7iTLscUaZBgwr@jetpack" = officialAddon "happy-bonobo-disable-webrtc";
|
||||
# "{446900e4-71c2-419f-a6a7-df9c091e268b}" = officialAddon "bitwarden-password-mananger";
|
||||
# };
|
||||
|
||||
# Preferences = {
|
||||
# "extensions.pocket.enabled" = lock-false;
|
||||
# "extensions.screenshots.disabled" = lock-true;
|
||||
# "browser.topsites.contile.enabled" = lock-false;
|
||||
# "browser.formfill.enable" = lock-false;
|
||||
# "browser.search.suggest.enabled" = lock-false;
|
||||
# "browser.search.suggest.enabled.private" = lock-false;
|
||||
# "browser.urlbar.suggest.searches" = lock-false;
|
||||
# "browser.urlbar.showSearchSuggestionsFirst" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.feeds.snippets" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.showSponsored" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
|
||||
# };
|
||||
# };
|
||||
|
||||
# # profiles.default = {
|
||||
# # id = 0;
|
||||
# # name = "Default";
|
||||
# # settings = {
|
||||
# # "browser.startup.homepage" = "about:blank";
|
||||
# # "browser.shell.didSkipDefaultBrowserCheckOnFirstRun" = true;
|
||||
# # "browser.policies.applied" = true;
|
||||
# # "widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||
# # "widget.use-xdg-desktop-portal.mime-handler" = 1;
|
||||
# # };
|
||||
# # };
|
||||
# }
|
||||
# // (scope "apps.browser" <| pkgs.firefox)
|
||||
# TODO switch to helium
|
||||
let
|
||||
extensions = {
|
||||
adnauseam = {
|
||||
id = "dlkmkipjfgcmnfckfdflcemkhlfbeiak";
|
||||
updateUrl = "https://gist.githubusercontent.com/amaanq/791db15b547cf00d27c99e784bbe0459/raw/adnauseam-updates.xml";
|
||||
};
|
||||
bypass-paywalls = {
|
||||
id = "lkbebcjgcmobigpeffafkodonchffocl";
|
||||
updateUrl = "https://gitflic.ru/project/magnolia1234/bpc_updates/blob/raw?file=updates.xml";
|
||||
};
|
||||
vencord = {
|
||||
id = "jfcaohdhgnfchhifdffmldmodkmndfjp";
|
||||
updateUrl = "https://github.com/amaanq/Vencord/releases/latest/download/updates.xml";
|
||||
};
|
||||
bitwarden.id = "nngceckbapebfimnlniiiahkandclblb";
|
||||
clearurls.id = "lckanjgmijmafbedllaakclkaicjfmnk";
|
||||
dark-reader.id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";
|
||||
i-still-dont-care-about-cookies.id = "edibdbjcniadpccecjdfdjjppcpchdlm";
|
||||
fastforward.id = "icallnadddjmdinamnolclfjanhfoafe";
|
||||
refined-github.id = "hlepfoohegkhhmjieoechaddaejaokhf";
|
||||
sponsorblock.id = "mnjggcdmjocbbbhaepdhchncahnbgone";
|
||||
vimium-c.id = "hfjbmagddngcpeloejdejnfgbamkjaeg";
|
||||
web-archives.id = "hkligngkgcpcolhcnkgccglchdafcnao";
|
||||
# webrtc-leak-shield.id = "bppamachkoflopbagkdoflbgfjflfnfl";
|
||||
};
|
||||
extensionStrings = map (
|
||||
key:
|
||||
let
|
||||
ext = extensions.${key};
|
||||
url = ext.updateUrl or "https://services.helium.imput.net/ext";
|
||||
in
|
||||
"${ext.id};${url}"
|
||||
) (builtins.attrNames extensions);
|
||||
in
|
||||
(scope "apps.browser" <| getFlakePkg inputs.helium)
|
||||
// scope "programs.chromium" {
|
||||
enable = true;
|
||||
extensions = extensionStrings;
|
||||
extraOpts = {
|
||||
PrivacySandboxFingerprintingProtectionEnabled = true;
|
||||
PrivacySandboxIpProtectionEnabled = true;
|
||||
# Explicitly allow our extensions
|
||||
ExtensionInstallAllowlist = map (entry: entry.value.id) (lib.attrsToList extensions);
|
||||
# Allow extensions from Helium proxy and self-hosted sources
|
||||
ExtensionInstallSources = [
|
||||
"https://services.helium.imput.net/*" # Helium proxy
|
||||
"https://rednoise.org/*" # AdNauseam manifest
|
||||
"https://github.com/*" # AdNauseam CRX host
|
||||
"https://*.githubusercontent.com/*" # GitHub release assets
|
||||
"https://gitflic.ru/*" # Bypass Paywalls
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue