Librewolf

This commit is contained in:
Henry Hiles 2025-05-27 13:52:33 -04:00
parent 5cb4cd387d
commit ac3f77e0e2
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
6 changed files with 55 additions and 70 deletions

48
flake.lock generated
View file

@ -220,11 +220,11 @@
"firefox-gnome-theme": { "firefox-gnome-theme": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1747677437, "lastModified": 1747921814,
"narHash": "sha256-c3oiw6RysUVxRqkv39gxhiO1WjfvuEzZw4PemN0C7Kk=", "narHash": "sha256-G1ZrQrQWRLA15kLFT9+Ycz2GK+FmXHUwEK8pXnKSyKk=",
"owner": "rafaelmardojai", "owner": "rafaelmardojai",
"repo": "firefox-gnome-theme", "repo": "firefox-gnome-theme",
"rev": "6b2061ac6faf5dfb52d5b41dca98fa0c022b2b91", "rev": "1ca82b07be9ff99da4b26092a846101ad109ef05",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -529,11 +529,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747565775, "lastModified": 1748182899,
"narHash": "sha256-B6jmKHUEX1jxxcdoYHl7RVaeohtAVup8o3nuVkzkloA=", "narHash": "sha256-r6MHSalDFydlUmjorVTSsyhLjIt8VWNtGc5+mffXvFQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "97118a310eb8e13bc1b9b12d67267e55b7bee6c8", "rev": "901f8fef7f349cf8a8e97b3230b22fd592df9160",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -550,11 +550,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747279714, "lastModified": 1747763032,
"narHash": "sha256-UdxlE8yyrKiGq3bgGyJ78AdFwh+fuRAruKtyFY5Zq5I=", "narHash": "sha256-9j3oCbemeH7bTVXJ3pDWxOptbxDx2SdK1jY2AHpjQiw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "954615c510c9faa3ee7fb6607ff72e55905e69f2", "rev": "29dda415f5b2178278283856c6f9f7b48a2a4353",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -570,11 +570,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747943020, "lastModified": 1748096601,
"narHash": "sha256-LlMUdltEdGxVLDZRSDQn3/i/WWn7Jakdz4wQxLxzfZ8=", "narHash": "sha256-ji/9z1pRbosyKVVAIGBazyz6PjWV8bc2Ux2RdQrVDWY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nh", "repo": "nh",
"rev": "24c12228e1f1e4fc953e37283fe442ca169951ed", "rev": "1ea27e73a3dcbc9950258e9054377ee677d12b9e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -687,11 +687,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1747542820, "lastModified": 1748026106,
"narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -703,11 +703,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1747327360, "lastModified": 1747542820,
"narHash": "sha256-LSmTbiq/nqZR9B2t4MRnWG7cb0KVNU70dB7RT4+wYK4=", "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e06158e58f3adee28b139e9c2bcfcc41f8625b46", "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -751,11 +751,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1747647098, "lastModified": 1748189792,
"narHash": "sha256-q97sL76AwyTbykQPNB/iHuxhUtR5MslJQdKPYIM9pXQ=", "narHash": "sha256-FxYhwu2I4qpzHKUJUhhztBCmWBMCQmDtAPjCiJMhVSM=",
"owner": "wamserma", "owner": "wamserma",
"repo": "flake-programs-sqlite", "repo": "flake-programs-sqlite",
"rev": "687ecefe4c7aa963d6e591e39045bcdfa3d2f7ae", "rev": "fb8d3e74f783a7e7ffd5e679994fe268596f8875",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -834,11 +834,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1747675820, "lastModified": 1748028561,
"narHash": "sha256-Z8o3Tu/FN4GOtZl4WNY0Gcp/Uzuz06ILkRy0oPVteM0=", "narHash": "sha256-IgtJU6n9vR3nBUdcXrc7K9E+Y/G/4P6hFifGRr1tXMU=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "f8833c5e0c64287cd51a27e6061a88f4225b6b70", "rev": "34b5930894d8315401d93bd8a9a6635e1cd28eff",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,3 +1 @@
{ {services.usbmuxd.enable = true;}
services.usbmuxd.enable = true;
}

View file

@ -1,37 +1,16 @@
{ {
lib, lib,
pkgs, pkgs,
config,
inputs, inputs,
... ...
}: { }: {
# From https://hedgedoc.grimmauld.de/s/rVnTq0-Rs environment.etc."librewolf/policies/policies.json".source = config.environment.etc."firefox/policies/policies.json".source;
nixpkgs.overlays = lib.singleton (final: prev: {
firefox = prev.firefox.overrideAttrs (old: {
nativeBuildInputs = (old.nativeBuildInputs or []) ++ (with prev; [zip unzip gnused]);
buildCommand =
''
export buildRoot="$(pwd)"
''
+ old.buildCommand
+ ''
pushd $buildRoot
unzip $out/lib/firefox/browser/omni.ja -d patched_omni || ret=$?
if [[ $ret && $ret -ne 2 ]]; then
echo "unzip exited with unexpected error"
exit $ret
fi
rm $out/lib/firefox/browser/omni.ja
cd patched_omni
sed -i 's/"enterprise_only"\s*:\s*true,//' modules/policies/schema.sys.mjs
zip -0DXqr $out/lib/firefox/browser/omni.ja * # potentially qr9XD
popd
'';
});
});
systemd.tmpfiles.settings.firefox = { systemd.tmpfiles.settings.librewolf = {
# "/home/quadradical/.mozilla/firefox/quadradical"."d".user = "quadradical"; "/home/quadradical/.librewolf"."d".user = "quadradical";
"/home/quadradical/.mozilla/firefox/profiles.ini"."L+".argument = toString ((pkgs.formats.ini {}).generate "profiles.ini" { "/home/quadradical/.librewolf/quadradical"."d".user = "quadradical";
"/home/quadradical/.librewolf/profiles.ini"."L+".argument = toString ((pkgs.formats.ini {}).generate "profiles.ini" {
General = { General = {
StartWithLastProfile = 1; StartWithLastProfile = 1;
}; };
@ -42,7 +21,7 @@
Path = Name; Path = Name;
}; };
}); });
"/home/quadradical/.mozilla/firefox/quadradical/chrome"."L+".argument = "/home/quadradical/.librewolf/quadradical/chrome"."L+".argument =
toString toString
(pkgs.symlinkJoin { (pkgs.symlinkJoin {
name = "firefox-gnome-theme"; name = "firefox-gnome-theme";
@ -52,29 +31,42 @@
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = pkgs.librewolf;
# autoConfig = lib.concatStringsSep "\n" (lib.mapAttrsToList (pref: value: "lockPref(\"${pref}\", ${builtins.toJSON value});") { autoConfig = lib.concatStringsSep "\n" (lib.mapAttrsToList (pref: value: "lockPref(\"${pref}\", ${builtins.toJSON value});") {
preferences = { "svg.context-properties.content.enabled" = true; # This doesn't work
"browser.aboutConfig.showWarning" = false; "privacy.fingerprintingProtection.overrides" = "+AllTargets,-CSSPrefersColorScheme";
"media.peerconnection.enabled" = true;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true; "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.uiCustomization.state" = "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"downloads-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"PersonalToolbar\":[\"personal-bookmarks\"]},\"seen\":[\"save-to-pocket-button\",\"developer-button\"],\"dirtyAreaCache\":[\"nav-bar\",\"PersonalToolbar\",\"toolbar-menubar\",\"TabsToolbar\"],\"currentVersion\":19}"; "browser.uiCustomization.state" = "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"downloads-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"PersonalToolbar\":[\"personal-bookmarks\"]},\"seen\":[\"save-to-pocket-button\",\"developer-button\"],\"dirtyAreaCache\":[\"nav-bar\",\"PersonalToolbar\",\"toolbar-menubar\",\"TabsToolbar\"],\"currentVersion\":19}";
}; });
policies = { policies = {
ShowHomeButton = false; ShowHomeButton = false;
DisablePocket = true; DisableAccounts = true;
DisableTelemetry = true; DisableFormHistory = true;
DisableFirefoxStudies = true;
DisableFirefoxScreenshots = true; DisableFirefoxScreenshots = true;
DisableSetDesktopBackground = true; DisableSetDesktopBackground = true;
DisableMasterPasswordCreation = true; DisableMasterPasswordCreation = true;
# We use bitwarden for these # We use the Bitwarden extension for these
PasswordManagerEnabled = false; PasswordManagerEnabled = false;
AutofillAddressEnabled = false; AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false; AutofillCreditCardEnabled = false;
SanitizeOnShutdown = {
Cache = false;
Cookies = false;
Downloads = true;
FormData = true;
History = false;
Sessions = false;
SiteSettings = false;
OfflineApps = true;
Locked = true;
};
DontCheckDefaultBrowser = true; DontCheckDefaultBrowser = true;
HttpsOnlyMode = "force_enabled"; HttpsOnlyMode = "force_enabled";
@ -143,6 +135,7 @@
SearchEngines = { SearchEngines = {
Default = "DuckDuckGo"; Default = "DuckDuckGo";
PreventInstalls = true;
Remove = ["Bing" "Google" "Amazon.ca" "eBay"]; Remove = ["Bing" "Google" "Amazon.ca" "eBay"];
Add = [ Add = [
{ {
@ -150,13 +143,6 @@
URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}"; URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
IconURL = "https://github.com/NixOS/nixos-artwork/raw/refs/heads/master/logo/nix-snowflake-white.svg"; IconURL = "https://github.com/NixOS/nixos-artwork/raw/refs/heads/master/logo/nix-snowflake-white.svg";
Alias = "np"; Alias = "np";
preferences = {
"gnomeTheme.oledBlack" = true; # Enable nord theme (doesn't work)
"svg.context-properties.content.enabled" = true; # This doesn't work either
"signon.firefoxRelay.feature" = "disabled";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.uiCustomization.state" = "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"downloads-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"PersonalToolbar\":[\"personal-bookmarks\"]},\"seen\":[\"save-to-pocket-button\",\"developer-button\"],\"dirtyAreaCache\":[\"nav-bar\",\"PersonalToolbar\",\"toolbar-menubar\",\"TabsToolbar\"],\"currentVersion\":19}";
};
} }
{ {
Name = "NixOS Option Search"; Name = "NixOS Option Search";

View file

@ -3,6 +3,7 @@
enable = true; enable = true;
polarity = "dark"; polarity = "dark";
image = ./background.jpg; image = ./background.jpg;
enableReleaseChecks = false;
base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
cursor = { cursor = {