diff --git a/modules/home-manager/profiles/desktop.nix b/modules/home-manager/profiles/desktop.nix index 72f011c3..cf139d72 100644 --- a/modules/home-manager/profiles/desktop.nix +++ b/modules/home-manager/profiles/desktop.nix @@ -121,6 +121,11 @@ in { quality-menu ]; }; + + xdg.mimeApps.defaultApplications = { + "audio/*" = [ "mpv.desktop" ]; + "video/*" = [ "mpv.desktop" ]; + }; }) (lib.mkIf cfg.documents.enable { @@ -132,6 +137,13 @@ in { vale # Elevate your fanfics to an arguably higher caliber! ]; + xdg.mimeApps.defaultApplications = { + "application/pdf" = [ + "sioyek.desktop" + "com.github.johnfactotum.Foliate.desktop" + ]; + }; + # Some PDF viewer with a penchant for research. programs.sioyek = { enable = true; diff --git a/modules/home-manager/profiles/editors.nix b/modules/home-manager/profiles/editors.nix index aca0bdd0..42fc63d2 100644 --- a/modules/home-manager/profiles/editors.nix +++ b/modules/home-manager/profiles/editors.nix @@ -28,6 +28,11 @@ in { parinfer-rust ]; }; + + xdg.mimeApps.defaultApplications = { + "application/json" = [ "nvim.desktop" ]; + "text/plain" = [ "nvim.desktop" ]; + }; }) # I only use Emacs for org-roam (seriously... I only learned Emacs for @@ -79,6 +84,12 @@ in { sqlite anystyle-cli ]; + + xdg.mimeApps.defaultApplications = { + "application/json" = [ "emacs.desktop" ]; + "text/org" = [ "emacs.desktop" ]; + "text/plain" = [ "emacs.desktop" ]; + }; }) # The Visual Studio Code setup. Probably the hardest one to fully configure @@ -116,6 +127,11 @@ in { # Yay! Thank you! mutableExtensionsDir = true; }; + + xdg.mimeApps.defaultApplications = { + "application/json" = [ "code.desktop" ]; + "text/plain" = [ "code.desktop" ]; + }; }) ]; } diff --git a/modules/home-manager/profiles/research.nix b/modules/home-manager/profiles/research.nix index 5843f843..0a6225c8 100644 --- a/modules/home-manager/profiles/research.nix +++ b/modules/home-manager/profiles/research.nix @@ -22,5 +22,9 @@ in { ]; services.syncthing.enable = true; + + xdg.mimeApps.defaultApplications = { + "application/vnd.anki" = [ "anki.desktop" ]; + }; }; }