diff --git a/modules/home/feh/default.nix b/modules/home/feh/default.nix index 3a952a2..d72eed2 100644 --- a/modules/home/feh/default.nix +++ b/modules/home/feh/default.nix @@ -10,4 +10,11 @@ in config.programs.feh = lib.mkIf cfg.enable { enable = true; }; + + config.my.home.xdg.mime-apps = lib.mkIf cfg.enable { + applications.media.image = { + bitmap = [ "feh.desktop" ]; + vector = [ "feh.desktop" ]; + }; + }; } diff --git a/modules/home/firefox/default.nix b/modules/home/firefox/default.nix index 02c74f2..e1b0e37 100644 --- a/modules/home/firefox/default.nix +++ b/modules/home/firefox/default.nix @@ -77,4 +77,8 @@ in }; }; }; + + config.my.home.xdg.mime-apps = lib.mkIf cfg.enable { + applications.editor = [ "firefox.desktop" ]; + }; } diff --git a/modules/home/mail/himalaya/default.nix b/modules/home/mail/himalaya/default.nix index 849a415..fc64013 100644 --- a/modules/home/mail/himalaya/default.nix +++ b/modules/home/mail/himalaya/default.nix @@ -20,4 +20,8 @@ in ''; }; }; + + config.my.home.xdg.mime-apps = lib.mkIf cfg.enable { + applications.editor = [ "himalaya.desktop" ]; # FIXME: doesn't exist + }; } diff --git a/modules/home/mpv/default.nix b/modules/home/mpv/default.nix index 8af394c..1ccd0ba 100644 --- a/modules/home/mpv/default.nix +++ b/modules/home/mpv/default.nix @@ -17,5 +17,12 @@ in pkgs.mpvScripts.uosc # Nicer UI ]; }; + + my.home.xdg.mime-apps = { + applications.media = { + audio = [ "mpv.desktop" ]; + video = [ "mpv.desktop" ]; + }; + }; }; } diff --git a/modules/home/terminal/default.nix b/modules/home/terminal/default.nix index 20f36b5..069f79f 100644 --- a/modules/home/terminal/default.nix +++ b/modules/home/terminal/default.nix @@ -59,4 +59,5 @@ in config.home.sessionVariables = lib.mkIf (cfg.program != null) { TERMINAL = cfg.program; }; + # FIXME: config.my.home.xdg.mime-apps.applications.terminal } diff --git a/modules/home/vim/default.nix b/modules/home/vim/default.nix index 8e6bd5c..557588d 100644 --- a/modules/home/vim/default.nix +++ b/modules/home/vim/default.nix @@ -107,4 +107,8 @@ in }; config.xdg.configFile = lib.mkIf cfg.enable configFiles; + + config.my.home.xdg.mime-apps = lib.mkIf cfg.enable { + applications.editor = [ "nvim.desktop" ]; + }; } diff --git a/modules/home/zathura/default.nix b/modules/home/zathura/default.nix index 6162542..baefe06 100644 --- a/modules/home/zathura/default.nix +++ b/modules/home/zathura/default.nix @@ -17,4 +17,12 @@ in "statusbar-home-tilde" = true; }; }; + + config.my.home.xdg.mime-apps = lib.mkIf cfg.enable { + applications.media.document = { + comic = [ "zathura.desktop" ]; + ebook = [ "zathura.desktop" ]; + pdf = [ "zathura.desktop" ]; + }; + }; }