move let in with default apps to mimeApps

This commit is contained in:
jacekpoz 2024-06-15 22:46:06 +02:00
parent b898a9b5fc
commit e41bda83f0
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -4,14 +4,6 @@
}: let
inherit (config.myOptions.other.system) username;
hmCfg = config.home-manager.users.${username};
primary_browser = "firefox-schizo.desktop";
secondary_browser = "firefox-unschizo.desktop";
mail_client = "thunderbird.desktop";
file_manager = "pcmanfm.desktop";
media_player = "mpv.desktop";
image_viewer = "imv.desktop";
text_editor = "nvim.desktop";
in {
environment.sessionVariables = {
@ -78,7 +70,15 @@ in {
stateHome = "${hmCfg.home.homeDirectory}/.local/state";
mimeApps = {
enable = true;
defaultApplications = {
defaultApplications = let
primary_browser = "firefox-schizo.desktop";
secondary_browser = "firefox-unschizo.desktop";
mail_client = "thunderbird.desktop";
file_manager = "pcmanfm.desktop";
media_player = "mpv.desktop";
image_viewer = "imv.desktop";
text_editor = "nvim.desktop";
in{
"text/html" = [ primary_browser secondary_browser ];
"x-scheme-handler/http" = [ primary_browser secondary_browser ];
"x-scheme-handler/https" = [ primary_browser secondary_browser ];