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,
config,
pkgs,
...
}:
let
cfg = config.gaming;
in
{
nixpkgs.allowedUnfree = [
"steam"
"steam-unwrapped"
"lutris"
];
options.gaming.enable = lib.mkEnableOption "gaming";
hardware.graphics = {
enable32Bit = true;
extraPackages = with pkgs; [
dxvk
vkd3d-proton
config = lib.mkIf cfg.enable {
nixpkgs.allowedUnfree = [
"steam"
"steam-unwrapped"
"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";
}
];
}