Skip to content

Commit

Permalink
[refactor]: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rxyhn committed Jan 6, 2024
1 parent b9ced94 commit 5e36dc6
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions home/modules/programs/firefox.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,32 @@
...
}: let
firefox-gnome-theme = inputs.self.packages.${pkgs.system}.firefox-gnome-theme;

mimeTypes = [
"application/json"
"application/pdf"
"application/x-extension-htm"
"application/x-extension-html"
"application/x-extension-shtml"
"application/x-extension-xhtml"
"application/x-extension-xht"
"application/xhtml+xml"
"text/html"
"text/xml"
"x-scheme-handler/about"
"x-scheme-handler/ftp"
"x-scheme-handler/http"
"x-scheme-handler/unknown"
"x-scheme-handler/https"
];
in {
home.sessionVariables.BROWSER = "firefox";

xdg.mimeApps.defaultApplications = {
"application/json" = ["firefox.desktop"];
"application/pdf" = ["firefox.desktop"];
"text/html" = ["firefox.desktop"];
"text/xml" = ["firefox.desktop"];
"x-scheme-handler/http" = ["firefox.desktop"];
"x-scheme-handler/https" = ["firefox.desktop"];
};
xdg.mimeApps.defaultApplications = builtins.listToAttrs (map (mimeType: {
name = mimeType;
value = "firefox.desktop";
})
mimeTypes);

programs.firefox = {
enable = true;
Expand Down

0 comments on commit 5e36dc6

Please sign in to comment.