feat: wine and librewolf stuff

This commit is contained in:
Kat Inskip 2025-10-11 03:00:50 -07:00
parent c470c271cf
commit 0df783bf41
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
20 changed files with 118 additions and 195 deletions

45
flake.lock generated
View file

@ -598,27 +598,6 @@
"type": "github" "type": "github"
} }
}, },
"home-manager_2": {
"inputs": {
"nixpkgs": [
"zen-browser",
"nixpkgs"
]
},
"locked": {
"lastModified": 1752603129,
"narHash": "sha256-S+wmHhwNQ5Ru689L2Gu8n1OD6s9eU9n9mD827JNR+kw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e8c19a3cec2814c754f031ab3ae7316b64da085b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"ida-pro-overlay": { "ida-pro-overlay": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -1452,8 +1431,7 @@
"systems": "systems_2", "systems": "systems_2",
"tree": "tree", "tree": "tree",
"treefmt-nix": "treefmt-nix", "treefmt-nix": "treefmt-nix",
"wezterm": "wezterm", "wezterm": "wezterm"
"zen-browser": "zen-browser"
} }
}, },
"rust": { "rust": {
@ -1925,27 +1903,6 @@
"type": "github" "type": "github"
} }
}, },
"zen-browser": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1759900726,
"narHash": "sha256-DXgznNT8CA50WUIlQkI5BsEqNcbPDFF+26PPRYeB3sA=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "8ce7d926dbec820ab5686d599bc6a1bd19ed1273",
"type": "github"
},
"original": {
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
},
"zlib": { "zlib": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -94,10 +94,6 @@
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
}; };
}; };
zen-browser = {
url = "github:0xc000022070/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs-xr = { nixpkgs-xr = {
url = "github:nix-community/nixpkgs-xr"; url = "github:nix-community/nixpkgs-xr";
inputs = { inputs = {

View file

@ -101,20 +101,5 @@ in {
"--enable-wayland-ime" "--enable-wayland-ime"
]; ];
} }
{
command = [
"thunderbird"
];
}
{
command = [
"obsidian"
];
}
{
command = [
"zen-beta"
];
}
]; ];
} }

View file

@ -70,7 +70,7 @@ in {
}; };
}; };
debug = { debug = {
honor-xdg-activation-with-invalid-serial = {}; #honor-xdg-activation-with-invalid-serial = {};
#strict-new-window-focus-policy = {}; #strict-new-window-focus-policy = {};
#deactivate-unfocused-windows = {}; #deactivate-unfocused-windows = {};
}; };

View file

@ -20,7 +20,7 @@ _: {
at-startup = true; at-startup = true;
} }
{ {
app-id = "^zen-beta$"; app-id = "^librewolf$";
at-startup = true; at-startup = true;
} }
{ {

View file

@ -7,6 +7,10 @@ _: {
persistent = true; persistent = true;
}; };
}; };
# adds to nixpkgs.overlay, made irrelevant due to `home-manager.useGlobalPkgs` services.home-manager.autoExpire = {
#chaotic.nyx.overlay.enable = false; enable = true;
frequency = "weekly";
store.cleanup = true;
timestamp = "-7 days";
};
} }

View file

@ -1,5 +1,5 @@
_: { _: {
programs.zen-browser.profiles.main.settings = { programs.librewolf.profiles.main.settings = {
"browser.tabs.allow_transparent_browser" = true; "browser.tabs.allow_transparent_browser" = true;
"zen.welcome-screen.seen" = true; "zen.welcome-screen.seen" = true;

View file

@ -1,5 +1,5 @@
_: { _: {
programs.zen-browser.profiles.main = { programs.librewolf.profiles.main = {
containersForce = true; containersForce = true;
containers = { containers = {
main = { main = {

View file

@ -6,9 +6,12 @@
home.sessionVariables = { home.sessionVariables = {
BROWSER = "zen"; BROWSER = "zen";
}; };
#stylix.targets.zen-browser.profileNames = ["main"]; stylix.targets.librewolf = {
colorTheme.enable = true;
profileNames = ["main"];
};
home.packages = [pkgs.ff2mpv-rust]; home.packages = [pkgs.ff2mpv-rust];
programs.zen-browser = { programs.librewolf = {
nativeMessagingHosts = [ nativeMessagingHosts = [
pkgs.ff2mpv-rust pkgs.ff2mpv-rust
]; ];

View file

@ -1,5 +1,5 @@
{nur, ...}: { {nur, ...}: {
programs.zen-browser.profiles.main.extensions = { programs.librewolf.profiles.main.extensions = {
packages = with nur.repos.rycee.firefox-addons; [ packages = with nur.repos.rycee.firefox-addons; [
mtab mtab
]; ];

View file

@ -1,5 +1,5 @@
{nur, ...}: { {nur, ...}: {
programs.zen-browser.profiles.main = { programs.librewolf.profiles.main = {
extensions = { extensions = {
packages = with nur.repos.rycee.firefox-addons; [ packages = with nur.repos.rycee.firefox-addons; [
tree-style-tab tree-style-tab

View file

@ -1,5 +1,5 @@
{nur, ...}: { {nur, ...}: {
programs.zen-browser.profiles.main.extensions = { programs.librewolf.profiles.main.extensions = {
packages = with nur.repos.rycee.firefox-addons; [ packages = with nur.repos.rycee.firefox-addons; [
ublock-origin ublock-origin
]; ];

View file

@ -1,5 +1,5 @@
_: { _: {
programs.zen-browser.profiles.main.extensions = { programs.librewolf.profiles.main.extensions = {
#settings."{6b733b82-9261-47ee-a595-2dda294a4d08}".settings = { #settings."{6b733b82-9261-47ee-a595-2dda294a4d08}".settings = {
# options = builtins.toJSON { # options = builtins.toJSON {
# showGuide = false; # showGuide = false;

View file

@ -1,5 +0,0 @@
_: {
programs.zen-browser = {
enable = true;
};
}

View file

@ -1,45 +0,0 @@
{pkgs, ...}: {
hardware.graphics = {
enable32Bit = true;
extraPackages32 = with pkgs; [
driversi686Linux.mesa
];
};
programs.gamescope = {
enable = true;
package = pkgs.gamescope;
};
environment.systemPackages = with pkgs; [
protonplus
gamescope-wsi
(lutris.override {
extraPkgs = _pkgs: [
#pkgs.gamescope
#pkgs.libnghttp2
#pkgs.winetricks
#pkgs.jansson
#pkgs.samba
#pkgs.gvfs
#pkgs.mangohud
#pkgs.vkbasalt
#pkgs.umu-launcher
#pkgs.xdg-desktop-portal
];
extraLibraries = _pkgs: [
#pkgs.libunwind
#pkgs.xdg-desktop-portal
#pkgs.gvfs
#pkgs.jansson
#pkgs.samba
#pkgs.xz
];
})
wine
wine64
vkbasalt
mangohud
umu-launcher
winetricks
];
}

Binary file not shown.

View file

@ -0,0 +1,17 @@
@echo off
set VN_DIR=%1
set VN_EXE=%2
set VN_ARCH=%3
echo "Setting UTF-8..."
chcp 65001 > nul
echo "Launching VN..."
cd /d %VN_DIR%
start %VN_EXE%
echo Launching Textractor...
cd /d "C:\users\steamuser\Desktop\Textractor\%VN_ARCH%"
start Textractor.exe
exit

View file

@ -1,80 +1,74 @@
{ {
pkgs, pkgs,
inputs, inputs,
lib,
... ...
}: let }: let
inherit (lib.meta) getExe;
inherit (lib.attrsets) mapAttrs;
environment = { environment = {
PROTON_CACHYOS = "${inputs.chaotic.packages.${pkgs.system}.proton-cachyos_x86_64_v3.out}/bin"; 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"; PROTON_GE = "${inputs.chaotic.packages.${pkgs.system}.proton-ge-custom.out}/bin";
#PROTON_WC3 = "/home/kat/.local/share/Steam/compatibilitytools.d/GE-Proton10-1"; };
#PROTON_WC3 = "/home/kat/.local/share/Steam/compatibilitytools.d/Proton-Tkg-2367"; games = {
#PROTON_WC3 = "/home/kat/.local/share/Steam/steamapps/common/Proton - Experimental"; #
# Proton / contemporary video games
#
gw = "Guild Wars";
gw2 = "Guild Wars 2";
battlenet = "Battle.net";
sc = "Starcraft: Remastered";
sc2 = "Starcraft 2";
wcr = "Warcraft: Remastered";
wc2r = "Warcraft 2: Remastered";
wc = "Warcraft Orcs & Humans";
wc2 = "Warcraft 2: Battle.net Edition";
# https://lutris.net/games/install/25450/view
# Dissection:
# * nvapi disables,
# * registry key for Win7 in version
wc3 = "Warcraft 3: Reforged";
#
# Visual Novels
#
hanahira = "Hanahira";
kanon = "Kanon";
}; };
in { in {
systemd.user.services.gw = { hardware.graphics = {
description = "Guild Wars"; enable32Bit = true;
serviceConfig = { extraPackages32 = with pkgs; [
ExecStart = "${pkgs.katwine}/bin/katwine gw"; driversi686Linux.mesa
Type = "simple"; ];
};
inherit environment;
}; };
systemd.user.services.gw2 = { programs.gamescope = {
description = "Guild Wars 2"; enable = true;
serviceConfig = { package = pkgs.gamescope;
ExecStart = "${pkgs.katwine}/bin/katwine gw2";
Type = "simple";
};
inherit environment;
}; };
systemd.user.services.battlenet = { environment.systemPackages = with pkgs; [
description = "Battle.net"; protonplus
serviceConfig = { gamescope-wsi
ExecStart = "${pkgs.katwine}/bin/katwine bnet"; mangohud
Type = "simple"; vkbasalt
}; ];
inherit environment; systemd.user.services =
}; mapAttrs (k: v: {
systemd.user.services.sc = { description = v;
description = "Starcraft"; serviceConfig = {
serviceConfig = { ExecStart = "${getExe pkgs.katwine} ${k}";
ExecStart = "${pkgs.katwine}/bin/katwine sc"; Type = "simple";
Type = "simple"; };
}; inherit environment;
inherit environment; })
}; games;
systemd.user.services.sc2 = {
description = "Starcraft 2"; home-manager.users.kat.home.file = {
serviceConfig = { # https://learnjapanese.moe/vn-linux/
ExecStart = "${pkgs.katwine}/bin/katwine sc2"; "Games/VNs/drive_c/script.bat".source = ./vn_script.bat;
Type = "simple"; "Games/VNs/drive_c/cmd.exe".source = ./reactos_cmd.exe;
};
inherit environment;
};
# https://lutris.net/games/install/25450/view
# Dissection:
# * nvapi disables,
# * registry key for Win7 in version
systemd.user.services.wc3 = {
description = "Warcraft 3";
serviceConfig = {
ExecStart = "${pkgs.katwine}/bin/katwine wc3";
Type = "simple";
};
inherit environment;
};
systemd.user.services.kanon = {
description = "Kanon";
serviceConfig = {
ExecStart = "${pkgs.katwine}/bin/katwine kanon";
Type = "simple";
};
};
systemd.user.services.hanahira = {
description = "Hanahira";
serviceConfig = {
ExecStart = "${pkgs.katwine}/bin/katwine hanahira";
Type = "simple";
};
}; };
} }

View file

@ -80,11 +80,16 @@ battlenet() {
WINEPREFIX="${GAMES_DIR}/battlenet" WINEPREFIX="${GAMES_DIR}/battlenet"
GAMEDIR="${WINEPREFIX}/drive_c/Program Files (x86)/Battle.net" GAMEDIR="${WINEPREFIX}/drive_c/Program Files (x86)/Battle.net"
GAME_EXE="${GAMEDIR}/Battle.net.exe" GAME_EXE="${GAMEDIR}/Battle.net.exe"
GAME_LAUNCHER_EXE="${GAMEDIR}/Battle.net Launcher.exe"
system_conf system_conf
proton_conf proton_conf
dxvk_conf dxvk_conf
caches_conf caches_conf
# Start the battley net thing
proton_runner "$GAME_LAUNCHER_EXE" &
if [ "$#" -ge 1 ]; then if [ "$#" -ge 1 ]; then
# wait a little bit for it to warm up
sleep 5
case $1 in case $1 in
(sc1|s1|sc) (sc1|s1|sc)
proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch S1\"" proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch S1\""
@ -92,16 +97,29 @@ battlenet() {
(sc2|s2) (sc2|s2)
proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch S2\"" proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch S2\""
;; ;;
(wc1|w1)
proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch W1\""
;;
(wc2|w2)
proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch W2\""
;;
(wc1r|w1r|wcr)
proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch W1R\""
;;
(wc2r|w2r)
proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch W2R\""
;;
(wc3|w3) (wc3|w3)
# TODO: build and ship a custom patched wine for this... jfc # TODO: build and ship a custom patched wine for this... jfc
# https://lutris.net/games/install/25450/view
# Dissection:
# * nvapi disables,
# * registry key for Win7 in version
export STAGING_SHARED_MEMORY=1 export STAGING_SHARED_MEMORY=1
export __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1 export __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1
proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch W3\"" proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch W3\""
#proton_runner "${WINEPREFIX}/drive_c/Program Files (x86)/Warcraft III/_retail_/x86_64/Warcraft III.exe" "-launch"
;; ;;
esac esac
else
proton_runner "$GAME_EXE"
fi fi
} }

View file

@ -114,7 +114,6 @@
chaotic.homeManagerModules.default chaotic.homeManagerModules.default
spicetify-nix.homeManagerModules.spicetify spicetify-nix.homeManagerModules.spicetify
nix-flatpak.homeManagerModules.nix-flatpak nix-flatpak.homeManagerModules.nix-flatpak
zen-browser.homeModules.default
stylix.homeModules.stylix stylix.homeModules.stylix
] ]
++ (with (import (inputs.arcexprs + "/modules")).home-manager; [ ++ (with (import (inputs.arcexprs + "/modules")).home-manager; [