nixos-config/modules/programs/gaming/default.nix

40 lines
866 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.ptw.programs.gaming;
in {
options.ptw.programs.gaming = {
enable = lib.mkEnableOption "Configure gaming options";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
wineWowPackages.staging winetricks
protontricks
lutris-free-wrapped
(pkgs.callPackage ./wrapper.nix {
inherit (pkgs) retroarch;
cores = with pkgs.libretro; [
mgba mupen64plus melonds desmume dolphin
];
})
#steam-wrapped # Custom package
#gamescope
corectrl
];
security.wrappers.gamescope = {
owner = "root";
group = "root";
source = "${pkgs.gamescope}/bin/gamescope";
capabilities = "cap_sys_nice+ep,cap_setgid+ep,cap_setuid+ep";
};
hardware.steam-hardware.enable = true;
};
}