profiles: set XDG default applications for home-manager profiles

This commit is contained in:
Gabriel Arazas 2023-09-09 19:34:10 +08:00
parent 5e21289f88
commit a32787f9fb
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
3 changed files with 32 additions and 0 deletions

View File

@ -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;

View File

@ -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" ];
};
})
];
}

View File

@ -22,5 +22,9 @@ in {
];
services.syncthing.enable = true;
xdg.mimeApps.defaultApplications = {
"application/vnd.anki" = [ "anki.desktop" ];
};
};
}