dotfiles/modules/nixos/gaming.nix

42 lines
815 B
Nix
Raw Normal View History

2024-09-19 21:52:54 +02:00
{
config,
lib,
pkgs,
...
}:
let
cfg = config.dotfiles.gaming;
gamePkgs =
pkgs: with pkgs; [
corefonts
gamescope
mangohud
];
in
{
options.dotfiles.gaming.enable = lib.mkEnableOption "gaming configuration";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
discover-overlay
(lutris.override { extraPkgs = gamePkgs; })
];
programs = {
gamemode = {
enable = true;
settings = {
custom = {
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
};
};
};
steam = {
enable = true;
package = pkgs.steam.override { extraPkgs = gamePkgs; };
};
};
};
}