Add Firefox, fix xdg-open

Change-Id: I63fe342f7f4005549876c41c2e9d294ff835d807
Reviewed-on: https://git.clicks.codes/c/Coded/nixConfig/+/94
Reviewed-by: Samuel Shuert <coded@clicks.codes>
Tested-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/browser.nix b/modules/browser.nix
index f82cfc4..a915ca5 100644
--- a/modules/browser.nix
+++ b/modules/browser.nix
@@ -14,4 +14,7 @@
       { id = "gebbhagfogifgggkldgodflihgfeippi"; } #return youtube dislike
     ];
   };
+  home-manager.users.coded.programs.firefox = {
+    enable = true;
+  };
 }
diff --git a/modules/xdgopen.nix b/modules/xdgopen.nix
new file mode 100644
index 0000000..2ce8358
--- /dev/null
+++ b/modules/xdgopen.nix
@@ -0,0 +1,12 @@
+{
+  xdg.portal = {
+    enable = true;
+    xdgOpenUsePortal = true;
+  };
+  xdg.mime = {
+    defaultApplications = {
+      "x-scheme-handler/http" = "firefox.desktop";
+      "x-scheme-handler/https" = "firefox.desktop";
+    };
+  };
+}