summaryrefslogtreecommitdiffstats
path: root/modules/desktop/apps/browsers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/desktop/apps/browsers')
-rw-r--r--modules/desktop/apps/browsers/firefox.nix67
1 files changed, 67 insertions, 0 deletions
diff --git a/modules/desktop/apps/browsers/firefox.nix b/modules/desktop/apps/browsers/firefox.nix
new file mode 100644
index 0000000..3c647f1
--- /dev/null
+++ b/modules/desktop/apps/browsers/firefox.nix
@@ -0,0 +1,67 @@
+{
+ config,
+ options,
+ lib,
+ pkgs,
+ ...
+}: let
+ firefoxConf = config.modules.desktop.apps.browsers.firefox;
+ arkenfox = {
+ owner = "arkenfox";
+ repo = "user.js";
+ version = "117.0";
+ };
+in
+{
+ options.modules.desktop.apps.browsers.firefox = {
+ enable = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ };
+ };
+ config = lib.mkIf (firefoxConf.enable) {
+ env.MOZ_DBUS_REMOTE = "1";
+ home.packages = [pkgs.xdg-utils];
+
+ home.manager.programs.firefox = {
+ enable = true;
+ package = pkgs.firefox;
+ profiles."default" = {
+ extraConfig = builtins.readFile
+ ( builtins.fetchTarball {
+ url = "https://github.com/${arkenfox.owner}/${arkenfox.repo}/archive/refs/tags/${arkenfox.version}.tar.gz";
+ sha256="1pll4fbdn2390n05902l3pkg4rizxghkakpzi1r9z1b7blmk1x4s";
+ } + "/user.js");
+ search = {
+ force = true;
+ default = "DuckDuckGo";
+ engines = {
+ "Nix Packages" = {
+ urls = [{
+ template = "https://search.nixos.org/packages";
+ params = [
+ { name = "type"; value = "packages"; }
+ { name = "query"; value = "{searchTerms}"; }
+ ];
+ }];
+ definedAliases = [ "@np" ];
+ };
+ "NixOS Wiki" = {
+ urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
+ iconUpdateURL = "https://nixos.wiki/favicon.png";
+ updateInterval = 24 * 60 * 60 * 1000;
+ definedAliases = [ "@nw" ];
+ };
+ };
+ };
+ };
+ };
+
+ modules.desktop.defaultApplications.apps.browser = rec {
+ package = pkgs.firefox;
+ install = false;
+ cmd = "${package}/bin/firefox";
+ desktop = "firefox";
+ };
+ };
+}