nix/modules/stuff/gaming.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

2024-08-01 21:22:47 +02:00
{ lib, pkgs, config, ...}: let
inherit (lib) mkIf mkEnableOption mkOption types optionals;
cfg = config.chuj.stuff.gaming;
user = config.chuj.system.user;
in {
2024-08-01 23:35:09 +02:00
options.chuj.stuff.gaming = {
2024-08-01 21:22:47 +02:00
enable = mkEnableOption "gaming";
2024-08-01 23:35:09 +02:00
quake = mkEnableOption "quake";
homm3 = mkEnableOption "homm3";
dosbox = mkEnableOption "dosbox";
ror2 = mkEnableOption "ror2";
steam = mkEnableOption "steam";
2024-08-01 21:22:47 +02:00
};
2024-08-10 01:03:29 +02:00
config = mkIf cfg.enable {
2024-08-01 23:35:09 +02:00
programs.steam.enable = cfg.steam;
2024-08-01 21:22:47 +02:00
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"
];
};
}