From 8423e5defe3a20b004749c851763417db38747ed Mon Sep 17 00:00:00 2001 From: Miran Bastaja Date: Fri, 28 Feb 2025 11:48:31 +0100 Subject: remove firefox, add librewolf and qutebrowser --- share/cfg/firefox/default.nix | 96 ------------------------------------------- 1 file changed, 96 deletions(-) delete mode 100644 share/cfg/firefox/default.nix (limited to 'share/cfg/firefox/default.nix') diff --git a/share/cfg/firefox/default.nix b/share/cfg/firefox/default.nix deleted file mode 100644 index 85b8fcf..0000000 --- a/share/cfg/firefox/default.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ pkgs, ... }: -let - # See https://github.com/nix-community/home-manager/pull/5381 - # and https://codeberg.org/PassFF/passff-host/src/commit/05c39de18b200d6f262d6dced13cdde7b12fdae3#preferences - passff-host = pkgs.passff-host.overrideAttrs (old: { - dontStrip = true; - installPhase = '' - substituteInPlace bin/${old.version}/passff.json \ - --replace PLACEHOLDER $out/share/passff-host/passff.py - - install -Dt $out/share/passff-host \ - bin/${old.version}/passff.{py,json} - - nativeMessagingPaths=( - /lib/mozilla/native-messaging-hosts - /etc/opt/chrome/native-messaging-hosts - /etc/chromium/native-messaging-hosts - /etc/vivaldi/native-messaging-hosts - /lib/librewolf/native-messaging-hosts - ) - - for manifestDir in "''${nativeMessagingPaths[@]}"; do - install -d $out$manifestDir - cp $out/share/passff-host/passff.json $out$manifestDir/ - done - ''; - - patchPhase = '' - sed -i 's#COMMAND = "pass"#COMMAND = "${ - pkgs.pass.withExtensions (ext: with ext; [ pass-otp ]) - }/bin/pass"#' src/passff.py - ''; - }); - - # Concatenate all files in the `./usercss` directory into one string - css-files = map (n: ./usercss/${n}) (builtins.attrNames (builtins.readDir ./usercss)); - userChrome = builtins.concatStringsSep "\n" (map builtins.readFile css-files); -in -{ - home.sessionVariables.BROWSER = "firefox"; - - programs.firefox = { - nativeMessagingHosts = [ - passff-host - ]; - profiles = { - alice = { - name = "alice"; - isDefault = true; - inherit userChrome; - - search = { - default = "DuckDuckGo"; - engines = { - "Nix Packages" = { - urls = [ - { - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - } - ]; - - icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; - definedAliases = [ "@np" ]; - }; - - "NixOS Wiki" = { - urls = [ { template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; } ]; - iconUpdateURL = "https://wiki.nixos.org/favicon.ico"; - updateInterval = 24 * 60 * 60 * 1000; # every day - definedAliases = [ "@nw" ]; - }; - - "Bing".metaData.hidden = true; - # builtin engines only support specifying one additional alias - "Google".medaData.alias = "@g"; - }; - }; # end of search - - settings = { - "browser.compactmode.show" = true; - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - }; - }; # end of alice (profile) - }; # end of profiles - }; -} -- cgit v1.3.1