Skip to content

Commit

Permalink
feat(xdg): add mime apps
Browse files Browse the repository at this point in the history
  • Loading branch information
yunfachi committed Jul 29, 2024
1 parent 2bd9ade commit 08a61d7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modules/config/xdg.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
pkgs,
config,
host,
lib,
...
}:
module-functions.module null "xdg" {
Expand All @@ -19,6 +20,19 @@ module-functions.module null "xdg" {
xdg-desktop-portal-hyprland);
};

mimeApps = {
enable = true;
defaultApplications = let
video = lib.mkIf config.yunfachi.programs.totem.enable ["org.gnome.Totem.desktop"];
image = lib.mkIf config.yunfachi.programs.loupe.enable ["org.gnome.Loupe.desktop"];
in {
"audio/*" = video;
"audio/mpeg" = video;
"video/*" = video;
"image/*" = image;
};
};

userDirs = let
download = "${config.hm.home.homeDirectory}/download";
media = category: "${config.hm.home.homeDirectory}/media/${category}";
Expand Down

0 comments on commit 08a61d7

Please sign in to comment.