xdg: fix typo in settings which prevented default apps from being set

This commit is contained in:
Fabian Montero 2025-08-28 16:25:44 -06:00
parent f598491ab3
commit 286fcc67d2
Signed by: fabian
GPG key ID: 1FFAC35E1798174F
2 changed files with 17 additions and 31 deletions

View file

@ -9,37 +9,23 @@ with lib; let
in {
options.local.apps.firefox = {
enable = mkEnableOption "firefox settings";
makeDefaultBrowser = mkOption {
type = types.bool;
default = true;
description = ''
Take a guess
'';
};
};
config = mkIf cfg.enable (mkMerge [
{
programs.firefox.enable = true;
}
(mkIf cfg.makeDefaultBrowser {
xdg = {
mimeApps = {
enable = true;
defaultApplications = {
"text/html" = ["firefox"];
"text/uri-list" = ["firefox"];
"x-scheme-handler/http" = ["firefox"];
"x-scheme-handler/https" = ["firefox"];
"x-scheme-handler/about" = ["firefox"];
"x-scheme-handler/unknown" = ["firefox"];
};
config = mkIf cfg.enable {
programs.firefox.enable = true;
xdg = {
mimeApps = {
enable = true;
defaultApplications = {
"text/html" = ["firefox.desktop"];
"text/uri-list" = ["firefox.desktop"];
"x-scheme-handler/http" = ["firefox.desktop"];
"x-scheme-handler/https" = ["firefox.desktop"];
"x-scheme-handler/about" = ["firefox.desktop"];
"x-scheme-handler/unknown" = ["firefox.desktop"];
};
};
home.sessionVariables.DEFAULT_BROWSER = "${lib.getExe pkgs.firefox}";
})
]);
};
home.sessionVariables.DEFAULT_BROWSER = "${lib.getExe pkgs.firefox}";
};
}

View file

@ -61,8 +61,8 @@ in {
mimeApps = {
enable = true;
defaultApplications = {
"application/pdf" = with pkgs; ["qpdfview"];
"x-scheme-handler/file" = with pkgs; ["foot"];
"application/pdf" = with pkgs; ["qpdfview.desktop"];
"x-scheme-handler/file" = with pkgs; ["foot.desktop"];
};
};
};