diff options
| author | adikro <adikro@disroot.org> | 2026-02-08 18:03:39 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-02-08 18:03:39 +0100 |
| commit | 2c8a4dd99efd61298bc18393e7fcbf6063db8671 (patch) | |
| tree | 1efd5ac8f5bcf7b1611cec1beaa545e6a2c14160 /hm/conf/xdg-mime.nix | |
| parent | eb95abfc230dc239122f1e89e90cd9a998491a2f (diff) | |
...
Diffstat (limited to 'hm/conf/xdg-mime.nix')
| -rw-r--r-- | hm/conf/xdg-mime.nix | 49 |
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"; + }; + }; +} |
