diff --git a/nix/configurations/vanadium/home/misc.nix b/nix/configurations/vanadium/home/misc.nix index 33210803..7fc0c785 100644 --- a/nix/configurations/vanadium/home/misc.nix +++ b/nix/configurations/vanadium/home/misc.nix @@ -55,10 +55,15 @@ type = "fcitx5"; }; - xdg.mimeApps = { - enable = true; - defaultApplications = { - "x-scheme-handler/mailto" = [ "org.gnome.Evolution.desktop" ]; + xdg.mimeApps = + let + associations = { + "x-scheme-handler/mailto" = [ "org.gnome.Evolution.desktop" ]; + }; + in + { + enable = true; + associations.added = associations; + defaultApplications = associations; }; - }; } diff --git a/nix/configurations/vanadium/home/programs.nix b/nix/configurations/vanadium/home/programs.nix index f7030c31..a05cb216 100644 --- a/nix/configurations/vanadium/home/programs.nix +++ b/nix/configurations/vanadium/home/programs.nix @@ -102,6 +102,7 @@ pkgs.mousai pkgs.localsend # file share with iOS pkgs.minder # mindmap tool + pkgs.mkvtoolnix # social pkgs.iamb diff --git a/nix/homeModules/common/firefox.nix b/nix/homeModules/common/firefox.nix index 556a528d..d479571b 100644 --- a/nix/homeModules/common/firefox.nix +++ b/nix/homeModules/common/firefox.nix @@ -129,15 +129,20 @@ in }; }; - xdg.mimeApps = lib.mkIf cfg.enable { - enable = true; - # source: https://unix.stackexchange.com/a/684582 - defaultApplications = { - "text/html" = "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"; + xdg.mimeApps = + let + # source: https://unix.stackexchange.com/a/684582 + associations = { + "text/html" = "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"; + }; + in + lib.mkIf cfg.enable { + enable = true; + associations.added = associations; + defaultApplications = associations; }; - }; } diff --git a/nix/homeModules/common/sioyek.nix b/nix/homeModules/common/sioyek.nix index 6547d74d..93ee594d 100644 --- a/nix/homeModules/common/sioyek.nix +++ b/nix/homeModules/common/sioyek.nix @@ -3,6 +3,9 @@ lib, ... }: +let + cfg = config.programs.sioyek; +in { programs.sioyek = { bindings = { @@ -28,10 +31,15 @@ config.should_launch_new_window = "1"; }; - xdg.mimeApps = lib.mkIf config.programs.sioyek.enable { - enable = true; - defaultApplications = { - "application/pdf" = [ "sioyek.desktop" ]; + xdg.mimeApps = + let + associations = { + "application/pdf" = [ "sioyek.desktop" ]; + }; + in + lib.mkIf cfg.enable { + enable = true; + associations.added = associations; + defaultApplications = associations; }; - }; }