feat(gaming): add enable option

This commit is contained in:
2026-05-22 20:19:37 +02:00
parent cd1880e7c9
commit a3fd052204

View File

@@ -1,50 +1,56 @@
{ {
config,
lib, lib,
config,
pkgs, pkgs,
... ...
}: }:
let
cfg = config.gaming;
in
{ {
nixpkgs.allowedUnfree = [ options.gaming.enable = lib.mkEnableOption "gaming";
"steam"
"steam-unwrapped"
"lutris"
];
hardware.graphics = { config = lib.mkIf cfg.enable {
enable32Bit = true; nixpkgs.allowedUnfree = [
extraPackages = with pkgs; [ "steam"
dxvk "steam-unwrapped"
vkd3d-proton "lutris"
];
hardware.graphics = {
enable32Bit = true;
extraPackages = with pkgs; [
dxvk
vkd3d-proton
];
};
programs.steam = {
enable = true;
remotePlay.openFirewall = false;
dedicatedServer.openFirewall = false;
};
programs.gamemode.enable = true;
environment.systemPackages = with pkgs; [
mangohud
];
home-manager.users.${config.host.username} = {
xdg.configFile."lutris/system.yml".text = lib.generators.toJSON { } {
system.game_path = "/home/${config.host.username}/games";
};
};
security.pam.loginLimits = [
{
domain = config.host.username;
type = "hard";
item = "nofile";
value = "524288";
}
]; ];
}; };
programs.steam = {
enable = true;
remotePlay.openFirewall = false;
dedicatedServer.openFirewall = false;
};
programs.gamemode.enable = true;
environment.systemPackages = with pkgs; [
# lutris
mangohud
];
home-manager.users.${config.host.username} = {
xdg.configFile."lutris/system.yml".text = lib.generators.toJSON { } {
system.game_path = "/home/${config.host.username}/games";
};
};
security.pam.loginLimits = [
{
domain = config.host.username;
type = "hard";
item = "nofile";
value = "524288";
}
];
} }