init
This commit is contained in:
29
modules/laptop/gaming.nix
Normal file
29
modules/laptop/gaming.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
# Module: Gaming Support
|
||||
# Description: Enables Steam and gamepad drivers (xpadneo for Xbox controllers)
|
||||
# Services: Steam, steam-hardware
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.custom.gaming = {
|
||||
enable = lib.mkEnableOption "gaming support (Steam, gamepad drivers)";
|
||||
|
||||
enableXpadneo = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable xpadneo driver for Xbox controllers";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.custom.gaming.enable {
|
||||
hardware.steam-hardware.enable = true;
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
boot.extraModulePackages = lib.mkIf config.custom.gaming.enableXpadneo [
|
||||
pkgs.linuxPackages.xpadneo
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user