From 44a479d6b4de81a13479e8918868381e0da702b3 Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Sat, 23 Aug 2025 09:44:28 +0800 Subject: [PATCH] fix(hmcl): wrap hmcl to fix config file persistence --- modules/desktop/gaming/minecraft.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/desktop/gaming/minecraft.nix b/modules/desktop/gaming/minecraft.nix index bd6eb46..52d10a5 100644 --- a/modules/desktop/gaming/minecraft.nix +++ b/modules/desktop/gaming/minecraft.nix @@ -14,15 +14,17 @@ lib.my.makeSwitch { ]; config' = { my.home.home.packages = [ - pkgs.hmcl + (pkgs.hmcl.overrideAttrs { + postFixup = '' + substituteInPlace $out/share/applications/HMCL.desktop --replace-fail 'Exec=hmcl' 'Exec=sh -c "cd ~/.local/share/hmcl; hmcl"' + ''; + }) + pkgs.xmcl ]; my.persist.homeDirs = [ ".minecraft" ".local/share/hmcl" ]; - my.persist.homeFiles = [ - ".hmcl.json" - ]; }; }