summaryrefslogtreecommitdiff
path: root/hm/conf/xdg-mime.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hm/conf/xdg-mime.nix')
-rw-r--r--hm/conf/xdg-mime.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/hm/conf/xdg-mime.nix b/hm/conf/xdg-mime.nix
new file mode 100644
index 0000000..0f55c5d
--- /dev/null
+++ b/hm/conf/xdg-mime.nix
@@ -0,0 +1,49 @@
+{ config, lib, ... }:
+let
+ cfg = config.hm.conf.xdg-mime;
+in
+{
+ options.hm.conf.xdg-mime = {
+ enable = lib.mkEnableOption "sets the default applications";
+ };
+ config = lib.mkIf cfg.enable {
+ xdg.mimeApps = {
+ enable = true;
+ defaultApplications = {
+ "application/pdf" = [ "org.pwmt.zathura.desktop" ];
+ "application/x-bzpdf" = [ "org.pwmt.zathura.desktop" ];
+ "application/x-gzpdf" = [ "org.pwmt.zathura.desktop" ];
+ "application/epub+zip" = [ "org.pwmt.zathura.desktop" ];
+
+ "image/png" = [ "nsxiv.desktop" ];
+ "image/jpeg" = [ "nsxiv.desktop" ];
+ "image/gif" = [ "nsxiv.desktop" ];
+ "image/webp" = [ "nsxiv.desktop" ];
+ "image/bmp" = [ "nsxiv.desktop" ];
+
+ "video/mp4" = [ "mpv.desktop" ];
+ "video/x-matroska" = [ "mpv.desktop" ];
+ "video/webm" = [ "mpv.desktop" ];
+ "video/quicktime" = [ "mpv.desktop" ];
+
+ "audio/mpeg" = [ "mpv.desktop" ];
+ "audio/flac" = [ "mpv.desktop" ];
+ "audio/wav" = [ "mpv.desktop" ];
+ "audio/ogg" = [ "mpv.desktop" ];
+
+ "text/html" = [ "firefox.desktop" ];
+ "x-scheme-handler/http" = [ "firefox.desktop" ];
+ "x-scheme-handler/https" = [ "firefox.desktop" ];
+ "inode/directory" = [ "thunar.desktop" ];
+ };
+ };
+ home.sessionVariables = {
+ EDITOR = "nvim";
+ VISUAL = "nvim";
+ BROWSER = "librewolf";
+ TERMINAL = "foot";
+ GPG_TTY = "$(tty)";
+ COLORTERM = "truecolor";
+ };
+ };
+}