some things idk

This commit is contained in:
krizej 2024-08-21 20:18:57 +02:00
parent fd3f8f0b03
commit 8a8b91dee9
3 changed files with 31 additions and 13 deletions

View file

@ -41,6 +41,7 @@
aseprite
cloc
viu
qbittorrent
];
chuj = {
@ -116,6 +117,7 @@
enable = true;
keys = {
"git@github.com".file = "github";
"git@codeberg.org".file = "codeberg";
"forgejo@git.jacekpoz.pl".file = "jacekgit";
"krizej@192.168.1.12".file = "rpi";
"discord@zasadzka.pl" = {
@ -134,10 +136,13 @@
gaming = {
enable = true;
quake = true;
homm3 = true;
dosbox = true;
ror2 = true;
steam = true;
scripts = [
{ name = "homm3"; exe = "HD_Launcher.exe"; }
{ name = "gtasa"; exe = "gta_sa.exe"; }
];
};
};
};

View file

@ -1,15 +1,22 @@
{ lib, pkgs, config, ...}: let
inherit (lib) mkIf mkEnableOption mkOption types optionals;
inherit (lib) mkIf mkEnableOption mkOption types optionals forEach;
cfg = config.chuj.stuff.gaming;
user = config.chuj.system.user;
in {
options.chuj.stuff.gaming = {
enable = mkEnableOption "gaming";
quake = mkEnableOption "quake";
homm3 = mkEnableOption "homm3";
dosbox = mkEnableOption "dosbox";
ror2 = mkEnableOption "ror2";
steam = mkEnableOption "steam";
scripts = mkOption {
type = types.listOf (types.submodule {
options = {
name = mkOption { type = types.str; };
exe = mkOption { type = types.str; };
};
});
};
};
config = mkIf cfg.enable {
@ -18,17 +25,16 @@ in {
home-manager.users.${user}.home.packages = with pkgs; ([
wineWowPackages.stable
winetricks
]
protontricks
] ++ forEach cfg.scripts (s:
(pkgs.writeShellScriptBin s.name ''
cd ~/games/${s.name}
wine ${s.exe}
'')
)
++ optionals cfg.dosbox [ dosbox-staging ]
++ optionals cfg.ror2 [ r2modman ]
++ optionals cfg.quake [ vkquake ericw-tools-latest trenchbroom fteqcc gmqcc ]
++ optionals cfg.homm3 [
# todo download it from rpi maybe or something
(pkgs.writeShellScriptBin "homm3" ''
cd ~/games/homm3
wine HD_Launcher.exe
'')
]);
++ optionals cfg.quake [ vkquake ericw-tools-latest trenchbroom fteqcc gmqcc ]);
# Trenchbroom
nixpkgs.config.permittedInsecurePackages = optionals cfg.quake [

View file

@ -19,5 +19,12 @@
make -j6 DO_USERDIRS=1 prefix=$out bindir=$out/bin
'';
});
protontricks = prevPkgs.protontricks.overrideAttrs (prev: {
src = pkgs.fetchFromGitHub {
inherit (prev.src) owner repo;
rev = "f7b1fa33b0438dbd72f7222703f8442e40edc510";
sha256 = "sha256-t794WEMJx/JNX3gTMHfgquFWB7yXkleW07+QURm1NPM=";
};
});
})
]