home-manager/gui: Set default browser

This commit is contained in:
Jack O'Sullivan 2023-08-22 12:41:23 +01:00
parent 65324d8af6
commit 0176be8572

View File

@ -1,6 +1,6 @@
{ lib, pkgs, config, ... }:
let
inherit (lib) mkIf mkMerge mkForce;
inherit (lib) genAttrs mkIf mkMerge mkForce;
inherit (lib.my) mkBoolOpt';
cfg = config.my.gui;
@ -270,6 +270,19 @@ in
});
};
};
xdg = {
mimeApps = {
enable = true;
defaultApplications = genAttrs [
"text/html"
"x-scheme-handler/http"
"x-scheme-handler/https"
"x-scheme-handler/about"
"x-scheme-handler/unknown"
] (_: "chromium-browser.desktop");
};
};
})
(mkIf (cfg.standalone && !pkgs.stdenv.isDarwin) {