From 9b6cc13430f874cb3654d6ccdae46115903a56bd Mon Sep 17 00:00:00 2001 From: Alejandro Angulo Date: Wed, 6 Dec 2023 19:27:47 -0800 Subject: [PATCH] Made firefox the default browser --- modules/nixos/apps/firefox/default.nix | 13 ++++++++++++- modules/nixos/home/default.nix | 8 +++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/modules/nixos/apps/firefox/default.nix b/modules/nixos/apps/firefox/default.nix index c7a592c..339fcf9 100644 --- a/modules/nixos/apps/firefox/default.nix +++ b/modules/nixos/apps/firefox/default.nix @@ -12,5 +12,16 @@ in { enable = mkEnableOption "firefox"; }; - config = mkIf cfg.enable {environment.systemPackages = with pkgs; [firefox];}; + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [firefox]; + aa.home.extraOptions = { + xdg.mimeApps.defaultApplications = { + "text/html" = "firefox.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "x-scheme-handler/about" = "firefox.desktop"; + "x-scheme-handler/unknown" = "firefox.desktop"; + }; + }; + }; } diff --git a/modules/nixos/home/default.nix b/modules/nixos/home/default.nix index 637f035..de662a0 100644 --- a/modules/nixos/home/default.nix +++ b/modules/nixos/home/default.nix @@ -40,9 +40,11 @@ in { aa.home.extraOptions = { home.stateVersion = config.system.stateVersion; home.file = mkAliasDefinitions options.aa.home.file; - xdg.enable = true; - xdg.configFile = mkAliasDefinitions options.aa.home.configFile; - xdg.dataFile = mkAliasDefinitions options.aa.home.dataFile; + xdg = { + enable = true; + configFile = mkAliasDefinitions options.aa.home.configFile; + dataFile = mkAliasDefinitions options.aa.home.dataFile; + }; }; home-manager = {