Simon Bruder
c0a130fa59
Strangely, it has been working until recently without explicit configuration (probably starting chromium changed it by setting something stateful).
25 lines
667 B
Nix
25 lines
667 B
Nix
{ lib, nixosConfig, ... }:
|
|
|
|
{
|
|
xdg.mimeApps = {
|
|
enable = nixosConfig.sbruder.gui.enable;
|
|
defaultApplications =
|
|
let
|
|
browser = "firefox.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;
|
|
};
|
|
}
|