Skip to content

Commit 08a61d7

Browse files
committed
feat(xdg): add mime apps
1 parent 2bd9ade commit 08a61d7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

modules/config/xdg.nix

+14
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
pkgs,
55
config,
66
host,
7+
lib,
78
...
89
}:
910
module-functions.module null "xdg" {
@@ -19,6 +20,19 @@ module-functions.module null "xdg" {
1920
xdg-desktop-portal-hyprland);
2021
};
2122

23+
mimeApps = {
24+
enable = true;
25+
defaultApplications = let
26+
video = lib.mkIf config.yunfachi.programs.totem.enable ["org.gnome.Totem.desktop"];
27+
image = lib.mkIf config.yunfachi.programs.loupe.enable ["org.gnome.Loupe.desktop"];
28+
in {
29+
"audio/*" = video;
30+
"audio/mpeg" = video;
31+
"video/*" = video;
32+
"image/*" = image;
33+
};
34+
};
35+
2236
userDirs = let
2337
download = "${config.hm.home.homeDirectory}/download";
2438
media = category: "${config.hm.home.homeDirectory}/media/${category}";

0 commit comments

Comments
 (0)