From 7c4198a58a825a1eba05d9adcdd2ed3835109fe5 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Tue, 24 Sep 2024 15:35:06 +0200 Subject: [PATCH] gaming: fix repeating code --- modules/gaming.nix | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/modules/gaming.nix b/modules/gaming.nix index cea3f08..e644a93 100644 --- a/modules/gaming.nix +++ b/modules/gaming.nix @@ -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]; }; }