From 324353728409970aed6f4992a5c6e0fd35fc8386 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Sun, 20 Oct 2024 15:36:05 +0200 Subject: [PATCH] home/programs: put browsers in its own directory, switch to librefox --- home/programs/browsers/default.nix | 3 ++ .../{browsers.nix => browsers/firefox.nix} | 40 ++++++++++++++----- home/programs/default.nix | 3 +- 3 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 home/programs/browsers/default.nix rename home/programs/{browsers.nix => browsers/firefox.nix} (64%) diff --git a/home/programs/browsers/default.nix b/home/programs/browsers/default.nix new file mode 100644 index 0000000..dad3d2f --- /dev/null +++ b/home/programs/browsers/default.nix @@ -0,0 +1,3 @@ +{ + imports = [./firefox.nix]; +} diff --git a/home/programs/browsers.nix b/home/programs/browsers/firefox.nix similarity index 64% rename from home/programs/browsers.nix rename to home/programs/browsers/firefox.nix index 9bbcc7e..3db0779 100644 --- a/home/programs/browsers.nix +++ b/home/programs/browsers/firefox.nix @@ -1,18 +1,37 @@ -{pkgs, ...}: { - programs.chromium.enable = true; - programs.firefox = let - betterfox = pkgs.fetchFromGitHub { - owner = "yokoffing"; - repo = "betterfox"; - rev = "e026ed7d3a763c5d3f96c2680d7bc3340831af4f"; - hash = "sha256-hpkEO5BhMVtINQG8HN4xqfas/R6q5pYPZiFK8bilIDs="; - }; - in { +{ + config, + pkgs, + ... +}: let + betterfox = pkgs.fetchFromGitHub { + owner = "yokoffing"; + repo = "betterfox"; + rev = "e026ed7d3a763c5d3f96c2680d7bc3340831af4f"; + hash = "sha256-hpkEO5BhMVtINQG8HN4xqfas/R6q5pYPZiFK8bilIDs="; + }; +in { + # https://github.com/jchv/nixos-config/blob/402c2e612529870544e3a96d5d0cc1a239d003a5/modules/users/john/librewolf.nix#L14-L15 + home.file.".mozilla/firefox/profiles.ini".target = ".librewolf/profiles.ini"; + home.file.".librewolf/nezia".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.mozilla/firefox/nezia"; + programs.firefox = { enable = true; + # https://github.com/jchv/nixos-config/blob/402c2e612529870544e3a96d5d0cc1a239d003a5/modules/users/john/librewolf.nix#L18-L23 + package = pkgs.wrapFirefox pkgs.librewolf-unwrapped { + inherit (pkgs.librewolf-unwrapped) extraPrefsFiles extraPoliciesFiles; + wmClass = "LibreWolf"; + libName = "librewolf"; + }; profiles = { nezia = { settings = { "ui.key.menuAccessKeyFocuses" = false; + "privacy.clearOnShutdown.cache" = false; + "privacy.clearOnShutdown.cookies" = false; + "privacy.clearOnShutdown.downloads" = false; + "privacy.clearOnShutdown.formdata" = false; + "privacy.clearOnShutdown.history" = false; + "privacy.clearOnShutdown.offlineApps" = false; + "privacy.clearOnShutdown.sessions" = false; }; # https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix search = { @@ -62,7 +81,6 @@ (builtins.readFile "${betterfox}/Peskyfox.js") (builtins.readFile "${betterfox}/Smoothfox.js") ]; - isDefault = true; }; }; }; diff --git a/home/programs/default.nix b/home/programs/default.nix index a0c5fc6..b3a1837 100644 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -1,6 +1,6 @@ {pkgs, ...}: { imports = [ - ./browsers.nix + ./browsers ./media ./xdg.nix ./gtk.nix @@ -16,6 +16,7 @@ }; home.packages = with pkgs; [ + geary imhex logisim-evolution obsidian