From 2cada3b44e735c1c53e50e4c776065feaad593e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 23 Nov 2025 18:58:17 +0800 Subject: [PATCH 1/4] home/firefox: improve xdg mimeApps configuration --- nix/homeModules/common/firefox.nix | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) 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; }; - }; } From 05e980d72a9fbe57c1aea1f45087c1dff0b2b101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 23 Nov 2025 19:00:00 +0800 Subject: [PATCH 2/4] home/sioyek: improve xdg mimeApps configuration --- nix/homeModules/common/sioyek.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) 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; }; - }; } From 5bad4db389e6a828936fb37b4d8c3816449c47dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Sun, 23 Nov 2025 19:01:14 +0800 Subject: [PATCH 3/4] vanadium: improve xdg mimeApps configuration --- nix/configurations/vanadium/home/misc.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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; }; - }; } From 9b02b9e1da0c644b2b0ac1e72ae621b6c406c92f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Mon, 24 Nov 2025 07:15:16 +0800 Subject: [PATCH 4/4] vanadium: +mkvtoolnix --- nix/configurations/vanadium/home/programs.nix | 1 + 1 file changed, 1 insertion(+) 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