librewolf
This commit is contained in:
1 parent
74076952e2
commit
08d30a3976
7 files changed
+145
-121
No files matched your search
@@ -1,44 +1,40 @@
|
||||
{ lib, ... }: {
|
||||
{ lib, inputs, ... }: {
|
||||
flake-file.inputs.catppuccin-userstyles-nix = {
|
||||
url = "github:4DBug/catppuccin-userstyles-nix";
|
||||
url = "git+https://git.bug.tools/bug/userstyles";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake-file.inputs.bugpass = {
|
||||
url = "git+https://git.bug.tools/bug/bugpass";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
den.aspects.software.browsers = {
|
||||
homeManager = { host, ... }: {
|
||||
# Redirector has no managed storage schema; import once via its settings.
|
||||
xdg.configFile."redirector/invidious.json".text = builtins.toJSON {
|
||||
createdBy = "Redirector v3.5.3";
|
||||
createdAt = "2026-10-17T00:00:00.000Z";
|
||||
redirects = map (r: {
|
||||
error = null;
|
||||
excludePattern = "";
|
||||
patternDesc = "";
|
||||
patternType = "R";
|
||||
processMatches = "noProcessing";
|
||||
disabled = false;
|
||||
grouped = false;
|
||||
appliesTo = [ "main_frame" ];
|
||||
} // r) [
|
||||
{
|
||||
description = "YouTube to Invidious";
|
||||
exampleUrl = "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
|
||||
exampleResult = "https://tube.${host.domain}/watch?v=dQw4w9WgXcQ";
|
||||
includePattern = "^https?://(www\\.|m\\.)?youtube\\.com/watch\\?(.*)$";
|
||||
redirectUrl = "https://tube.${host.domain}/watch?$2";
|
||||
}
|
||||
{
|
||||
description = "youtu.be to Invidious";
|
||||
exampleUrl = "https://youtu.be/dQw4w9WgXcQ";
|
||||
exampleResult = "https://tube.${host.domain}/watch?v=dQw4w9WgXcQ&";
|
||||
includePattern = "^https?://youtu\\.be/([^?&]+)\\??(.*)$";
|
||||
redirectUrl = "https://tube.${host.domain}/watch?v=$1&$2";
|
||||
}
|
||||
];
|
||||
homeManager = { host, pkgs, ... }: let
|
||||
mkExtension = src: vars: extra: rec {
|
||||
id = (builtins.fromJSON (builtins.readFile "${src}/manifest.json")).browser_specific_settings.gecko.id;
|
||||
xpi = pkgs.runCommand "${lib.head (lib.splitString "@" id)}.xpi" { nativeBuildInputs = [ pkgs.zip ]; } ''
|
||||
cp -r ${src} src && chmod -R u+w src && cd src
|
||||
for f in $(find . -type f); do
|
||||
substituteInPlace "$f" ${lib.concatStringsSep " " (lib.mapAttrsToList (k: v: "--replace-quiet @${k}@ ${lib.escapeShellArg v}") vars)}
|
||||
done
|
||||
${lib.optionalString (extra != null) "cp -r ${extra}/. ."}
|
||||
zip -r -X $out .
|
||||
'';
|
||||
};
|
||||
|
||||
bugpass = import "${inputs.bugpass}/build" { inherit pkgs; };
|
||||
|
||||
localExtensions = [
|
||||
(mkExtension ./_extensions/redirect { domain = "tube.${host.domain}"; } null)
|
||||
(mkExtension "${inputs.bugpass}/extension" { } bugpass.lib)
|
||||
];
|
||||
in {
|
||||
programs.librewolf = {
|
||||
enable = true;
|
||||
|
||||
nativeMessagingHosts = [ bugpass.host ];
|
||||
|
||||
settings = {
|
||||
"browser.startup.homepage" = "https://search.${host.domain}";
|
||||
"browser.startup.page" = 3;
|
||||
@@ -63,7 +59,7 @@
|
||||
"browser.crashReports.unsubmittedCheck.enabled" = false;
|
||||
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
|
||||
|
||||
"privacy.resistFingerprinting.letterboxing" = true;
|
||||
"privacy.resistFingerprinting.letterboxing" = false; # true adds a border around every page (window-size fingerprinting protection)
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"privacy.globalprivacycontrol.enabled" = true;
|
||||
"privacy.resistFingerprinting" = false;
|
||||
@@ -97,6 +93,8 @@
|
||||
"browser.theme.content-theme" = 0;
|
||||
|
||||
"layout.css.prefers-color-scheme.content-override" = 0;
|
||||
|
||||
"xpinstall.signatures.required" = false;
|
||||
};
|
||||
|
||||
profiles.default = {
|
||||
@@ -179,13 +177,13 @@
|
||||
settings = {
|
||||
"{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}" = {
|
||||
force = true;
|
||||
/*settings = inputs.catppuccin-userstyles-nix.stylusSettings.${pkgs.stdenv.hostPlatform.system} {
|
||||
settings = inputs.catppuccin-userstyles-nix.stylusSettings.${pkgs.stdenv.hostPlatform.system} {
|
||||
global = {
|
||||
lightFlavor = "mocha";
|
||||
darkFlavor = "mocha";
|
||||
accentColor = "mauve";
|
||||
};
|
||||
};*/
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -234,14 +232,13 @@
|
||||
|
||||
"uBlock0@raymondhill.net" # ublock-origin
|
||||
|
||||
"contact@lesspass.com" # lesspass
|
||||
|
||||
"{a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7}" # user-agent-string-switcher
|
||||
|
||||
"{762f9885-5a13-4abd-9c77-433dcd38b8fd}" # return-youtube-dislikes
|
||||
|
||||
"redirector@einaregilsson.com" # redirector
|
||||
]);
|
||||
]) // lib.listToAttrs (map (e: lib.nameValuePair e.id {
|
||||
install_url = "file://${e.xpi}";
|
||||
installation_mode = "force_installed";
|
||||
}) localExtensions);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user