nixos-config/users/simon/modules/xdg.nix

29 lines
812 B
Nix
Raw Normal View History

2021-12-17 15:10:10 +01:00
{ lib, pkgs, nixosConfig, ... }:
2020-12-05 15:01:40 +01:00
2020-11-07 14:32:31 +01:00
{
xdg.mimeApps = {
enable = nixosConfig.sbruder.gui.enable;
defaultApplications =
let
browser = "librewolf.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;
};
2020-11-07 14:32:31 +01:00
};
# 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;
};
2021-12-17 15:10:10 +01:00
home.packages = with pkgs; [
xdg-utils # qt programs require xdg-open in path to use a reasonable program (i.e. not firefox)
];
2020-11-07 14:32:31 +01:00
}