nix/modules/stuff/gaming.nix

38 lines
No EOL
1.1 KiB
Nix

{ lib, pkgs, config, ...}: let
inherit (lib) mkIf mkEnableOption mkOption types optionals;
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";
};
config = {
programs.steam.enable = cfg.steam;
home-manager.users.${user}.home.packages = with pkgs; ([
wineWowPackages.stable
winetricks
]
++ 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
'')
]);
# Trenchbroom
nixpkgs.config.permittedInsecurePackages = optionals cfg.quake [
"freeimage-unstable-2021-11-01"
];
};
}