gaming: fix repeating code

This commit is contained in:
Anthony Rodriguez 2024-09-24 15:35:06 +02:00
parent 80452cb292
commit 7c4198a58a
Signed by: nezia
GPG key ID: EE3BE97C040A86CE

View file

@ -3,11 +3,9 @@
config,
pkgs,
...
}:
let
}: let
cfg = config.modules.gaming;
in
{
in {
options = {
modules.gaming = {
enable = lib.mkEnableOption "Enable the gaming module";
@ -15,23 +13,23 @@ in
};
config = lib.mkIf cfg.enable {
programs.steam = {
enable = true;
package = with pkgs; steam.override { extraPkgs = pkgs: [ attr ]; };
gamescopeSession.enable = true;
};
programs = {
steam = {
enable = true;
gamescopeSession.enable = true;
};
programs.gamemode.enable = true;
programs.coolercontrol = {
enable = true;
nvidiaSupport = true;
gamemode.enable = true;
coolercontrol = {
enable = true;
nvidiaSupport = true;
};
};
hardware.keyboard.qmk.enable = true;
environment.systemPackages = with pkgs; [
via
];
services.udev.packages = [ pkgs.via ];
services.udev.packages = [pkgs.via];
};
}