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"
}
},
"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": {
"inputs": {
"nixpkgs": [
@ -1452,8 +1431,7 @@
"systems": "systems_2",
"tree": "tree",
"treefmt-nix": "treefmt-nix",
"wezterm": "wezterm",
"zen-browser": "zen-browser"
"wezterm": "wezterm"
}
},
"rust": {
@ -1925,27 +1903,6 @@
"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": {
"flake": false,
"locked": {

View file

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

View file

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

View file

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

View file

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

View file

@ -7,6 +7,10 @@ _: {
persistent = true;
};
};
# adds to nixpkgs.overlay, made irrelevant due to `home-manager.useGlobalPkgs`
#chaotic.nyx.overlay.enable = false;
services.home-manager.autoExpire = {
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;
"zen.welcome-screen.seen" = true;

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
{nur, ...}: {
programs.zen-browser.profiles.main.extensions = {
programs.librewolf.profiles.main.extensions = {
packages = with nur.repos.rycee.firefox-addons; [
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 = {
# options = builtins.toJSON {
# 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,
inputs,
lib,
...
}: let
inherit (lib.meta) getExe;
inherit (lib.attrsets) mapAttrs;
environment = {
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_WC3 = "/home/kat/.local/share/Steam/compatibilitytools.d/GE-Proton10-1";
#PROTON_WC3 = "/home/kat/.local/share/Steam/compatibilitytools.d/Proton-Tkg-2367";
#PROTON_WC3 = "/home/kat/.local/share/Steam/steamapps/common/Proton - Experimental";
};
games = {
#
# 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 {
systemd.user.services.gw = {
description = "Guild Wars";
serviceConfig = {
ExecStart = "${pkgs.katwine}/bin/katwine gw";
Type = "simple";
};
inherit environment;
hardware.graphics = {
enable32Bit = true;
extraPackages32 = with pkgs; [
driversi686Linux.mesa
];
};
systemd.user.services.gw2 = {
description = "Guild Wars 2";
serviceConfig = {
ExecStart = "${pkgs.katwine}/bin/katwine gw2";
Type = "simple";
};
inherit environment;
programs.gamescope = {
enable = true;
package = pkgs.gamescope;
};
systemd.user.services.battlenet = {
description = "Battle.net";
serviceConfig = {
ExecStart = "${pkgs.katwine}/bin/katwine bnet";
Type = "simple";
};
inherit environment;
};
systemd.user.services.sc = {
description = "Starcraft";
serviceConfig = {
ExecStart = "${pkgs.katwine}/bin/katwine sc";
Type = "simple";
};
inherit environment;
};
systemd.user.services.sc2 = {
description = "Starcraft 2";
serviceConfig = {
ExecStart = "${pkgs.katwine}/bin/katwine sc2";
Type = "simple";
};
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";
};
environment.systemPackages = with pkgs; [
protonplus
gamescope-wsi
mangohud
vkbasalt
];
systemd.user.services =
mapAttrs (k: v: {
description = v;
serviceConfig = {
ExecStart = "${getExe pkgs.katwine} ${k}";
Type = "simple";
};
inherit environment;
})
games;
home-manager.users.kat.home.file = {
# 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;
};
}

View file

@ -80,11 +80,16 @@ battlenet() {
WINEPREFIX="${GAMES_DIR}/battlenet"
GAMEDIR="${WINEPREFIX}/drive_c/Program Files (x86)/Battle.net"
GAME_EXE="${GAMEDIR}/Battle.net.exe"
GAME_LAUNCHER_EXE="${GAMEDIR}/Battle.net Launcher.exe"
system_conf
proton_conf
dxvk_conf
caches_conf
# Start the battley net thing
proton_runner "$GAME_LAUNCHER_EXE" &
if [ "$#" -ge 1 ]; then
# wait a little bit for it to warm up
sleep 5
case $1 in
(sc1|s1|sc)
proton_runner "$GAME_EXE" "--in-process-gpu" "--exec=\"launch S1\""
@ -92,16 +97,29 @@ battlenet() {
(sc2|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)
# 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 __GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1
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
else
proton_runner "$GAME_EXE"
fi
}

View file

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