diff --git a/flake.lock b/flake.lock index 8eae441d..ea1f58d2 100644 --- a/flake.lock +++ b/flake.lock @@ -783,11 +783,11 @@ ] }, "locked": { - "lastModified": 1760253876, - "narHash": "sha256-A9N5/T9ZoX+PNjcG41S02bFK57ica8jOQgcaFBhx3MU=", + "lastModified": 1760272637, + "narHash": "sha256-NYHwgjCNOsAOJUj0QlKALca6gEo5Y926MYDwv4RviNo=", "owner": "kittywitch", "repo": "mewtris", - "rev": "62900d59eb1fa5bf38ac3b782639feadd4879364", + "rev": "76c605f892f9f170da36834e53a2272f7a2788e8", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c85605ee..1e7dc3cc 100644 --- a/flake.nix +++ b/flake.nix @@ -306,6 +306,7 @@ }; mewtris = { url = "github:kittywitch/mewtris/main"; + #url = "path:/home/kat/src/mewtris"; inputs = { nix-std.follows = "nix-std"; flake-compat.follows = "flake-compat"; diff --git a/nixos/profiles/gaming/vn_script.bat b/nixos/profiles/gaming/vn_script.bat index 5b1ffa94..d68dbc23 100644 --- a/nixos/profiles/gaming/vn_script.bat +++ b/nixos/profiles/gaming/vn_script.bat @@ -1,10 +1,10 @@ -@echo off +REM @echo off set VN_DIR=%1 -set VN_EXE=%2 +set VN_EXE=%~2 set VN_ARCH=%3 echo "Setting UTF-8..." -chcp 65001 > nul +REM chcp 65001 > nul echo "Launching VN..." cd /d %VN_DIR% @@ -12,6 +12,6 @@ start %VN_EXE% echo Launching Textractor... cd /d "C:\users\steamuser\Desktop\Textractor\%VN_ARCH%" -start Textractor.exe +Textractor.exe -exit +REM exit diff --git a/nixos/profiles/gaming/wine.nix b/nixos/profiles/gaming/wine.nix index 8ab3304e..563e3a2b 100644 --- a/nixos/profiles/gaming/wine.nix +++ b/nixos/profiles/gaming/wine.nix @@ -19,6 +19,7 @@ in { PROTON_CACHYOS = "${inputs.chaotic.packages.${pkgs.system}.proton-cachyos_x86_64_v3.out}/bin"; PROTON_GE = "${inputs.chaotic.packages.${pkgs.system}.proton-ge-custom.out}/bin"; WINE_TKG = pkgs.wine-tkg; + WINE_CACHYOS = pkgs.wine-cachyos; }; pathPackages = with pkgs; [ mangohud @@ -34,7 +35,8 @@ in { "+tid" "+seh" "+debugstr" - "+module" + #"+module" + "trace:-module" ]; WINEUSERSANDBOX = builtins.toString 1; }; @@ -130,7 +132,7 @@ in { // rec { inherit long_name; prefixFolder = gameStorage + "/VNs"; - gameFolder = prefixFolder + "/drive_c"; + gameFolder = prefixFolder; gameExecutable = "C:\\cmd.exe"; gameArguments = [ "/k" @@ -264,11 +266,50 @@ in { vkbasalt ]; - home-manager.users.kat.home.file = { - "Games/battlenet/drive_c/script.bat".source = ./bnet_script.bat; - "Games/battlenet/drive_c/cmd.exe".source = ./reactos_cmd.exe; - # https://learnjapanese.moe/vn-linux/ - "Games/VNs/drive_c/script.bat".source = ./vn_script.bat; - "Games/VNs/drive_c/cmd.exe".source = ./reactos_cmd.exe; - }; + home-manager.users.kat.home.file = let + inherit (lib.attrsets) listToAttrs nameValuePair attrNames; + inherit (lib.lists) concatMap; + dxvks = { + "x64" = pkgs.dxvk-w32; + "x32" = pkgs.dxvk-w64; + }; + pfxes = [ + "Games/VNs/drive_c/windows" + ]; + arches = { + "x32" = "system32"; + "x64" = "syswow64"; + }; + files = [ + "d3d8.dll" + "d3d9.dll" + "d3d10core.dll" + "d3d11.dll" + "dxgi.dll" + ]; + dxvkLinker = pfx: arch: file: let + dxvk = dxvks.${arch}; + in + nameValuePair "${pfx}/${arches.${arch}}/${file}" { + source = "${dxvk}/bin/${file}"; + }; + in + (listToAttrs (concatMap ( + pfx: + concatMap ( + arch: + concatMap ( + file: [(dxvkLinker pfx arch file)] + ) + files + ) (attrNames arches) + ) + pfxes)) + // { + "Games/battlenet/drive_c/script.bat".source = ./bnet_script.bat; + "Games/battlenet/drive_c/cmd.exe".source = ./reactos_cmd.exe; + # https://learnjapanese.moe/vn-linux/ + "Games/VNs/drive_c/script.bat".source = ./vn_script.bat; + "Games/VNs/drive_c/cmd.exe".source = ./reactos_cmd.exe; + }; }