programs, xdg: move app packages and MIME defaults into modules

This commit is contained in:
2026-08-01 17:14:44 +08:00
parent 27aaa9d05f
commit 935530aca5
19 changed files with 317 additions and 147 deletions
+16 -1
View File
@@ -1,4 +1,8 @@
{ lib, ... }:
{ lib, config, ... }:
let
cfg = config.my.desktop.browser.default;
desktop = [ cfg.desktop ];
in
{
options.my.desktop.browser.default = {
command = lib.mkOption {
@@ -10,4 +14,15 @@
default = "zen-beta.desktop";
};
};
config = {
my.xdg.defaultApplications = {
"text/html" = desktop;
"x-scheme-handler/about" = desktop;
"x-scheme-handler/ftp" = desktop;
"x-scheme-handler/http" = desktop;
"x-scheme-handler/https" = desktop;
"x-scheme-handler/unknown" = desktop;
};
};
}