put gaming configuration in module

This commit is contained in:
Anthony Rodriguez 2024-09-05 16:20:22 +02:00
parent dfdd05a0c6
commit 5bd8332da0
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
3 changed files with 35 additions and 19 deletions

View file

@ -6,25 +6,7 @@
];
modules.nvidia.enable = true;
programs.steam = {
enable = true;
package = with pkgs; steam.override { extraPkgs = pkgs: [ attr ]; };
gamescopeSession.enable = true;
};
programs.gamemode.enable = true;
programs.coolercontrol = {
enable = true;
nvidiaSupport = true;
};
hardware.keyboard.qmk.enable = true;
environment.systemPackages = with pkgs; [
via
];
services.udev.packages = [ pkgs.via ];
modules.gaming.enable = true;
stylix.image = ../../wallpapers/lucy-edgerunners-wallpaper.jpg;
}

View file

@ -3,5 +3,6 @@ _:
imports = [
./nvidia.nix
./gnome.nix
./gaming.nix
];
}

33
modules/gaming.nix Normal file
View file

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