From 2c8a4dd99efd61298bc18393e7fcbf6063db8671 Mon Sep 17 00:00:00 2001 From: adikro Date: Sun, 8 Feb 2026 18:03:39 +0100 Subject: ... --- hm/conf/xdg-mime.nix | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 hm/conf/xdg-mime.nix (limited to 'hm/conf/xdg-mime.nix') 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"; + }; + }; +} -- cgit v1.3