29 lines
830 B
Nix
29 lines
830 B
Nix
{ lib, pkgs, nixosConfig, ... }:
|
|
|
|
{
|
|
xdg.mimeApps = {
|
|
enable = nixosConfig.sbruder.gui.enable;
|
|
defaultApplications =
|
|
let
|
|
browser = "org.qutebrowser.qutebrowser.desktop";
|
|
in
|
|
{
|
|
"application/pdf" = "org.pwmt.zathura.desktop";
|
|
"image/jpeg" = "mpv.desktop";
|
|
"image/png" = "mpv.desktop";
|
|
"text/html" = browser;
|
|
"x-scheme-handler/http" = browser;
|
|
"x-scheme-handler/https" = browser;
|
|
};
|
|
};
|
|
# Some programs overwrite the mimeapps.list symlink with a normal file which
|
|
# makes home-manager activation fail
|
|
xdg.configFile = lib.mkIf nixosConfig.sbruder.gui.enable {
|
|
"mimeapps.list".force = true;
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
xdg-utils # qt programs require xdg-open in path to use a reasonable program (i.e. not firefox)
|
|
];
|
|
}
|