nixos-config/users/simon/modules/xdg.nix
Simon Bruder 821367af3f
qutebrowser: Init
This also makes it the default browser.
2021-11-09 21:45:50 +01:00

25 lines
687 B
Nix

{ lib, 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;
};
}