Add 'legacy/dotfiles/' from commit 'e9a44f677d2852fd5856cecc49ecb984efeba66c'
git-subtree-dir: legacy/dotfiles git-subtree-mainline:382887df65git-subtree-split:e9a44f677d
This commit is contained in:
164
legacy/dotfiles/home-manager/progs/zen/dark-reader.nix
Normal file
164
legacy/dotfiles/home-manager/progs/zen/dark-reader.nix
Normal file
@@ -0,0 +1,164 @@
|
||||
# Dark Reader extension settings
|
||||
# Addon ID: addon@darkreader.org
|
||||
{ lib }:
|
||||
let
|
||||
defaultTheme = {
|
||||
mode = 1;
|
||||
brightness = 100;
|
||||
contrast = 100;
|
||||
grayscale = 0;
|
||||
sepia = 0;
|
||||
useFont = false;
|
||||
fontFamily = "Open Sans";
|
||||
textStroke = 0;
|
||||
engine = "dynamicTheme";
|
||||
stylesheet = "";
|
||||
darkSchemeBackgroundColor = "#181a1b";
|
||||
darkSchemeTextColor = "#e8e6e3";
|
||||
lightSchemeBackgroundColor = "#dcdad7";
|
||||
lightSchemeTextColor = "#181a1b";
|
||||
scrollbarColor = "";
|
||||
selectionColor = "auto";
|
||||
styleSystemControls = false;
|
||||
lightColorScheme = "Default";
|
||||
darkColorScheme = "Default";
|
||||
immediateModify = false;
|
||||
};
|
||||
|
||||
mkCustomTheme =
|
||||
{
|
||||
url,
|
||||
engine ? defaultTheme.engine,
|
||||
builtIn ? false,
|
||||
}:
|
||||
{
|
||||
inherit url;
|
||||
theme = defaultTheme // {
|
||||
inherit engine;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs builtIn { inherit builtIn; };
|
||||
in
|
||||
{
|
||||
force = true;
|
||||
settings = {
|
||||
enabled = true;
|
||||
fetchNews = true;
|
||||
syncSettings = false;
|
||||
syncSitesFixes = false;
|
||||
changeBrowserTheme = false;
|
||||
enabledByDefault = false;
|
||||
enableForPDF = true;
|
||||
enableForProtectedPages = false;
|
||||
enableContextMenus = false;
|
||||
detectDarkTheme = true;
|
||||
previewNewDesign = false;
|
||||
previewNewestDesign = false;
|
||||
|
||||
theme = defaultTheme;
|
||||
|
||||
enabledFor = [
|
||||
"search.nixos.org"
|
||||
"quizlet.com"
|
||||
"claude.ai"
|
||||
];
|
||||
|
||||
disabledFor = [
|
||||
"cinny.envs.net"
|
||||
"element.envs.net"
|
||||
"mail.proton.me"
|
||||
"mail.google.com"
|
||||
"www.gardling.com"
|
||||
"projects.fivethirtyeight.com"
|
||||
"secure.bankofamerica.com"
|
||||
"billpay-ui.bankofamerica.com"
|
||||
"plus.pearson.com"
|
||||
"immich.gardling.com"
|
||||
"huggingface.co"
|
||||
"session.masteringphysics.com"
|
||||
"brainly.com"
|
||||
"www.270towin.com"
|
||||
"phet.colorado.edu"
|
||||
"8042-1.portal.athenahealth.com"
|
||||
"torrent.gardling.com"
|
||||
"nssb-p.adm.fit.edu"
|
||||
"mail.openbenchmarking.org"
|
||||
"moneroocean.stream"
|
||||
"app.diagrams.net"
|
||||
"books.gw-project.org"
|
||||
"chat.deepseek.com"
|
||||
"n21.ultipro.com"
|
||||
"www.egaroucid.nyanyan.dev"
|
||||
"bitmagnet.gardling.com"
|
||||
"frame.work"
|
||||
"www.altcancer.net"
|
||||
"jenkins.jpenilla.xyz"
|
||||
"soulseek.gardling.com"
|
||||
"discord.com"
|
||||
"www.lufthansa.com"
|
||||
"surveys.hyundaicx.com"
|
||||
"www.apple.com"
|
||||
"docs.google.com"
|
||||
"marcuspork.com"
|
||||
"en.akinator.com"
|
||||
"www.reddit.com"
|
||||
"terra.layoutit.com"
|
||||
"www.ebay.com"
|
||||
"www.nytimes.com"
|
||||
"app.electricitymaps.com"
|
||||
"www.revoy.com"
|
||||
"kagi.com"
|
||||
"www.bhphotovideo.com"
|
||||
"survey.stackoverflow.co"
|
||||
"www.google.com"
|
||||
"en.wikipedia.org"
|
||||
"workforcenow.adp.com"
|
||||
"app.element.io"
|
||||
"www.desmos.com"
|
||||
"en.wiktionary.org"
|
||||
"dariandean0.github.io"
|
||||
];
|
||||
|
||||
customThemes = [
|
||||
(mkCustomTheme {
|
||||
url = [ "*.officeapps.live.com" ];
|
||||
engine = "cssFilter";
|
||||
builtIn = true;
|
||||
})
|
||||
(mkCustomTheme {
|
||||
url = [ "*.sharepoint.com" ];
|
||||
engine = "cssFilter";
|
||||
builtIn = true;
|
||||
})
|
||||
(mkCustomTheme {
|
||||
url = [ "docs.google.com" ];
|
||||
engine = "cssFilter";
|
||||
builtIn = true;
|
||||
})
|
||||
(mkCustomTheme {
|
||||
url = [ "onedrive.live.com" ];
|
||||
engine = "cssFilter";
|
||||
builtIn = true;
|
||||
})
|
||||
(mkCustomTheme {
|
||||
url = [ "huggingface.co" ];
|
||||
engine = "svgFilter";
|
||||
})
|
||||
(mkCustomTheme {
|
||||
url = [ "www.last.fm" ];
|
||||
engine = "svgFilter";
|
||||
})
|
||||
];
|
||||
|
||||
automation = {
|
||||
enabled = false;
|
||||
mode = "";
|
||||
behavior = "OnOff";
|
||||
};
|
||||
|
||||
time = {
|
||||
activation = "18:00";
|
||||
deactivation = "9:00";
|
||||
};
|
||||
};
|
||||
}
|
||||
134
legacy/dotfiles/home-manager/progs/zen/default.nix
Normal file
134
legacy/dotfiles/home-manager/progs/zen/default.nix
Normal file
@@ -0,0 +1,134 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
firefox-addons = inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system};
|
||||
buildFirefoxXpiAddon =
|
||||
inputs.firefox-addons.lib.${pkgs.stdenv.hostPlatform.system}.buildFirefoxXpiAddon;
|
||||
|
||||
hacker-smacker = buildFirefoxXpiAddon {
|
||||
pname = "hacker-smacker";
|
||||
version = "2.2";
|
||||
addonId = "jid1-eo0mcXLTqCkaWA@jetpack";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4715262/hacker_smacker-2.2.xpi";
|
||||
sha256 = "d28f0597d5c4bae5db712b4875f4104120f7e55e5ea769c44d70996be31cc0d1";
|
||||
meta = with lib; {
|
||||
homepage = "https://www.hackersmacker.org";
|
||||
description = "Highlight (friend) and filter (foe) individual authors on Hacker News";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
consumer-rights-wiki = buildFirefoxXpiAddon {
|
||||
pname = "consumer-rights-wiki";
|
||||
version = "1.0.34";
|
||||
addonId = "@crw-extension-firefox";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4730448/consumer_rights_wiki-1.0.34.xpi";
|
||||
sha256 = "732969ed4d5c7965b6254a1190a82ce4ab0ff44bda2295264eb8a22c452899ea";
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/FULU-Foundation/CRW-Extension";
|
||||
description = "Shows a popup when the site you're viewing has an article on the Consumer Rights Wiki";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
|
||||
ublockSettings = import ./ublock.nix { inherit lib; };
|
||||
darkReaderSettings = import ./dark-reader.nix { inherit lib; };
|
||||
redirectorSettings = import ./redirector.nix { inherit lib; };
|
||||
in
|
||||
{
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
profiles.default = {
|
||||
isDefault = true;
|
||||
|
||||
extensions = {
|
||||
force = true;
|
||||
|
||||
packages =
|
||||
(with firefox-addons; [
|
||||
bitwarden
|
||||
buster-captcha-solver
|
||||
consent-o-matic
|
||||
darkreader
|
||||
fastforwardteam
|
||||
localcdn
|
||||
redirector
|
||||
refined-github
|
||||
return-youtube-dislikes
|
||||
search-by-image # reverse image search
|
||||
ruffle_rs
|
||||
snowflake
|
||||
steam-database
|
||||
ublock-origin
|
||||
])
|
||||
++ [
|
||||
hacker-smacker
|
||||
consumer-rights-wiki
|
||||
];
|
||||
|
||||
settings = {
|
||||
"uBlock0@raymondhill.net" = ublockSettings;
|
||||
"addon@darkreader.org" = darkReaderSettings;
|
||||
"redirector@einaregilsson.com" = redirectorSettings;
|
||||
};
|
||||
};
|
||||
|
||||
search = {
|
||||
force = true;
|
||||
default = "kagi";
|
||||
privateDefault = "ddg";
|
||||
order = [
|
||||
"kagi"
|
||||
"ddg"
|
||||
"google"
|
||||
];
|
||||
engines = {
|
||||
kagi = {
|
||||
name = "Kagi";
|
||||
urls = [ { template = "https://kagi.com/search?q={searchTerms}"; } ];
|
||||
iconMapObj."16" = "https://kagi.com/favicon.ico";
|
||||
definedAliases = [ "@k" ];
|
||||
};
|
||||
google.metaData.alias = "@g";
|
||||
};
|
||||
};
|
||||
|
||||
settings = {
|
||||
"identity.sync.tokenserver.uri" = "https://firefox-sync.sigkill.computer/1.0/sync/1.5";
|
||||
# auto-enable extensions on install
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
# don't sync prefs/addons — we manage them declaratively via nix
|
||||
# syncing fights with the declarative config and can cause data loss
|
||||
# https://github.com/nix-community/home-manager/issues/6083
|
||||
"services.sync.engine.prefs" = false;
|
||||
"services.sync.engine.addons" = false;
|
||||
# use a separate default search engine in private windows
|
||||
"browser.search.separatePrivateDefault.ui.enabled" = true;
|
||||
"browser.search.separatePrivateDefault" = true;
|
||||
# disable built-in password manager — using bitwarden
|
||||
"signon.rememberSignons" = false;
|
||||
"signon.autofillForms" = false;
|
||||
"signon.management.page.breach-alerts.enabled" = false;
|
||||
"signon.formlessCapture.enabled" = false;
|
||||
"signon.privateBrowsingCapture.enabled" = false;
|
||||
# disable the autocomplete popup on login fields
|
||||
"signon.firefoxRelay.feature" = "";
|
||||
"signon.generation.enabled" = false;
|
||||
# disable passkey/webauthn prompts from the built-in manager
|
||||
"security.webauthn.enable_conditional_mediation" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Zen ignores XDG and hardcodes ~/.zen — symlink to module-managed path
|
||||
home.file.".zen".source = config.lib.file.mkOutOfStoreSymlink "${config.xdg.configHome}/zen";
|
||||
|
||||
home.sessionVariables.BROWSER = "zen";
|
||||
}
|
||||
75
legacy/dotfiles/home-manager/progs/zen/redirector.nix
Normal file
75
legacy/dotfiles/home-manager/progs/zen/redirector.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
# Redirector extension settings
|
||||
# Addon ID: redirector@einaregilsson.com
|
||||
#
|
||||
# To add a new redirect, just add another mkRedirect call to the list:
|
||||
# (mkRedirect { from = "youtube.com"; to = "invidious.example.com"; description = "YouTube to Invidious"; })
|
||||
{ lib }:
|
||||
let
|
||||
# helper to create a redirect rule from a simple domain mapping.
|
||||
# handles www. subdomains automatically. for other subdomains
|
||||
# (like old.reddit.com), create a separate rule with the full domain.
|
||||
mkRedirect =
|
||||
{
|
||||
from,
|
||||
to,
|
||||
description,
|
||||
}:
|
||||
let
|
||||
escapedFrom = builtins.replaceStrings [ "." ] [ "\\." ] from;
|
||||
in
|
||||
{
|
||||
inherit description;
|
||||
exampleUrl = "https://${from}/example";
|
||||
exampleResult = "https://${to}/example";
|
||||
error = null;
|
||||
includePattern = "^https?://(www\\.)?${escapedFrom}(.*)$";
|
||||
excludePattern = "";
|
||||
patternDesc = "";
|
||||
redirectUrl = "https://${to}$2";
|
||||
patternType = "R";
|
||||
processMatches = "noProcessing";
|
||||
disabled = false;
|
||||
grouped = false;
|
||||
appliesTo = [ "main_frame" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
force = true;
|
||||
settings = {
|
||||
redirects = [
|
||||
(mkRedirect {
|
||||
from = "x.com";
|
||||
to = "xcancel.com";
|
||||
description = "X to xcancel";
|
||||
})
|
||||
(mkRedirect {
|
||||
from = "twitter.com";
|
||||
to = "xcancel.com";
|
||||
description = "Twitter to xcancel";
|
||||
})
|
||||
(mkRedirect {
|
||||
from = "reddit.com";
|
||||
to = "safereddit.com";
|
||||
description = "Reddit to Redlib";
|
||||
})
|
||||
(mkRedirect {
|
||||
from = "old.reddit.com";
|
||||
to = "safereddit.com";
|
||||
description = "Old Reddit to Redlib";
|
||||
})
|
||||
(mkRedirect {
|
||||
from = "new.reddit.com";
|
||||
to = "safereddit.com";
|
||||
description = "New Reddit to Redlib";
|
||||
})
|
||||
(mkRedirect {
|
||||
from = "np.reddit.com";
|
||||
to = "safereddit.com";
|
||||
description = "NP Reddit to Redlib";
|
||||
})
|
||||
];
|
||||
disabled = false;
|
||||
logging = false;
|
||||
enableNotifications = false;
|
||||
};
|
||||
}
|
||||
143
legacy/dotfiles/home-manager/progs/zen/ublock.nix
Normal file
143
legacy/dotfiles/home-manager/progs/zen/ublock.nix
Normal file
@@ -0,0 +1,143 @@
|
||||
# uBlock Origin extension settings
|
||||
# Addon ID: uBlock0@raymondhill.net
|
||||
{ lib }:
|
||||
{
|
||||
force = true;
|
||||
settings = {
|
||||
userSettings = {
|
||||
cloudStorageEnabled = true;
|
||||
externalLists = builtins.concatStringsSep "\n" [
|
||||
"https://abp.oisd.nl/"
|
||||
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
|
||||
"https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=bpc-paywall-filter.txt"
|
||||
"https://raw.githubusercontent.com/DetachHead/ublock-filters/refs/heads/master/list.txt"
|
||||
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
|
||||
];
|
||||
importedLists = [
|
||||
"https://abp.oisd.nl/"
|
||||
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
|
||||
"https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=bpc-paywall-filter.txt"
|
||||
"https://raw.githubusercontent.com/DetachHead/ublock-filters/refs/heads/master/list.txt"
|
||||
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
|
||||
];
|
||||
popupPanelSections = 15;
|
||||
prefetchingDisabled = false;
|
||||
};
|
||||
|
||||
selectedFilterLists = [
|
||||
"user-filters"
|
||||
"ublock-filters"
|
||||
"ublock-badware"
|
||||
"ublock-privacy"
|
||||
"ublock-quick-fixes"
|
||||
"ublock-unbreak"
|
||||
"easylist"
|
||||
"adguard-generic"
|
||||
"adguard-mobile"
|
||||
"easyprivacy"
|
||||
"adguard-spyware-url"
|
||||
"block-lan"
|
||||
"urlhaus-1"
|
||||
"curben-phishing"
|
||||
"plowe-0"
|
||||
"dpollock-0"
|
||||
"fanboy-cookiemonster"
|
||||
"ublock-cookies-easylist"
|
||||
"adguard-cookies"
|
||||
"ublock-cookies-adguard"
|
||||
"fanboy-social"
|
||||
"adguard-social"
|
||||
"fanboy-thirdparty_social"
|
||||
"easylist-chat"
|
||||
"easylist-newsletters"
|
||||
"easylist-notifications"
|
||||
"easylist-annoyances"
|
||||
"adguard-mobile-app-banners"
|
||||
"adguard-other-annoyances"
|
||||
"adguard-popup-overlays"
|
||||
"adguard-widgets"
|
||||
"ublock-annoyances"
|
||||
"SWE-1"
|
||||
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
|
||||
"https://gitflic.ru/project/magnolia1234/bypass-paywalls-clean-filters/blob/raw?file=bpc-paywall-filter.txt"
|
||||
"https://raw.githubusercontent.com/DetachHead/ublock-filters/refs/heads/master/list.txt"
|
||||
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
|
||||
"https://abp.oisd.nl/"
|
||||
];
|
||||
|
||||
whitelist = [
|
||||
"chrome-extension-scheme"
|
||||
"moz-extension-scheme"
|
||||
];
|
||||
|
||||
dynamicFilteringString = builtins.concatStringsSep "\n" [
|
||||
"behind-the-scene * * noop"
|
||||
"behind-the-scene * inline-script noop"
|
||||
"behind-the-scene * 1p-script noop"
|
||||
"behind-the-scene * 3p-script noop"
|
||||
"behind-the-scene * 3p-frame noop"
|
||||
"behind-the-scene * image noop"
|
||||
"behind-the-scene * 3p noop"
|
||||
];
|
||||
|
||||
hostnameSwitchesString = builtins.concatStringsSep "\n" [
|
||||
"no-large-media: behind-the-scene false"
|
||||
"no-csp-reports: * true"
|
||||
"no-scripting: arstechnica.com true"
|
||||
"no-scripting: www.phoronix.com true"
|
||||
"no-scripting: www.theatlantic.com true"
|
||||
"no-scripting: wccftech.com true"
|
||||
"no-remote-fonts: www.theverge.com true"
|
||||
"no-scripting: www.theverge.com true"
|
||||
"no-scripting: gamersnexus.net true"
|
||||
];
|
||||
|
||||
"user-filters" = builtins.concatStringsSep "\n" [
|
||||
# Annoying fonts warning because of localCDN
|
||||
"docs.google.com##.jfk-butterBar-shown.jfk-butterBar-info.jfk-butterBar"
|
||||
|
||||
# remove phoronix premium ad
|
||||
"www.phoronix.com##aside:nth-of-type(3)"
|
||||
"www.phoronix.com##aside.widget:nth-of-type(4)"
|
||||
|
||||
# Remove instagram login screen
|
||||
"www.instagram.com##.x1nhvcw1.x1oa3qoh.x1qjc9v5.xqjyukv.xdt5ytf.x2lah0s.x1c4vz4f.x1odjw0f.xw2csxc.x1n2onr6.xo71vjh.x5pf9jr.x13lgxp2.x168nmei.x78zum5.xjbqb8w.x9f619"
|
||||
"www.instagram.com##.xl56j7k.x1iyjqo2.xdt5ytf.x78zum5.x9f619.x1qjc9v5"
|
||||
"www.instagram.com##.x1jfb8zj.x1qrby5j.x1n2onr6.x7ja8zs.x1t2pt76.x1lytzrv.xedcshv.xarpa2k.x3igimt.x12ejxvf.xaigb6o.x1beo9mf.x1h91t0o.x4k7w5x.x1uvtmcs"
|
||||
"www.instagram.com##.x1h0vfkc.x13vifvy.xixxii4.x17qophe.xds687c.x1ey2m1c"
|
||||
"www.instagram.com##.x1n2onr6.xg6iff7.xippug5.xdt5ytf.x78zum5"
|
||||
"www.instagram.com##.xzkaem6.x1n2onr6 > .xjx87ck.x1yqm8si.xfk6m8.xh8yej3.x13vifvy.x1rohswg.xixxii4.x1odjw0f.xw2csxc.x17qophe.x5yr21d.x1pq812k.x1ja2u2z.x9f619"
|
||||
|
||||
# remove github dashboard copilot stuff
|
||||
"github.com##copilot-dashboard-entrypoint"
|
||||
"github.com##.hide-md.hide-sm.AppHeader-CopilotChat > react-partial-anchor"
|
||||
"github.com##react-partial-anchor > .AppHeader-buttonLeft.AppHeader-button.Button--medium.Button--secondary.Button--iconOnly.Button"
|
||||
"github.com##.Button.Button--medium.Button--secondary.AppHeader-button--dropdown.AppHeader-buttonRight.AppHeader-button"
|
||||
"github.com##.tooltipped-sw.tooltipped.AppHeader-buttonRight.color-fg-muted.AppHeader-button.Button--medium.Button--secondary.Button--iconOnly.Button"
|
||||
|
||||
# github sidebar stuff
|
||||
''github.com##.rounded-2.p-3.color-border-default.border.\<color-bg-default.dashboard-changelog.mb-3''
|
||||
"github.com##.mb-5.feed-right-sidebar"
|
||||
|
||||
"app.howthemarketworks.com##div.reveal-overlay:nth-of-type(8)"
|
||||
|
||||
# github copilot chat
|
||||
"github.com##.CopilotChatInputPartial-module__inputSection--UWMD6"
|
||||
"github.com##.CopilotChatInputPartial-module__inputContainer--EE6LJ"
|
||||
|
||||
# reddit
|
||||
''www.reddit.com##.font-normal > .mt-0.list-none.relative > .s\:rounded-2.bg-transparent.-outline-offset-1.py-2xs.cursor-pointer.hover\:no-underline.hover\:bg-neutral-background-hover.hover\:text-secondary-hover.text-secondary.gap-\[0\.5rem\].px-md.relative.justify-between.flex''
|
||||
|
||||
"www.quora.com##.qu-bg--raised.qu-mb--small.qu-boxShadow--small.qu-borderColor--raised.qu-borderAll.dom_annotate_question_answer_item_0.q-box > div > div > div > div > div.q-box"
|
||||
|
||||
"discord.com##.contentCollapsedWrapper__5f897"
|
||||
|
||||
"www.statista.com###pdfpremiumArrowModal > .vueModal__overlay"
|
||||
|
||||
# The AI summary BS
|
||||
''www.reddit.com##.px-md.pb-\[22px\].pt-md.mt-md.rounded-4.bg-neutral-background-weak.xs\:block.hidden''
|
||||
|
||||
"www.sciencedirect.com##.gXjxP.sc-fHSyaj"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user