From c88df9b9546b93b8e0e73d989571361fc7c7e89b Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 6 Aug 2024 13:40:07 +0200 Subject: [PATCH] Move gaming remaining options --- hardware/marmo/configuration.nix | 8 +++--- hardware/spaceship/configuration.nix | 6 ++--- modules/conf.nix | 40 +--------------------------- modules/programs/gaming.nix | 8 +++++- 4 files changed, 15 insertions(+), 47 deletions(-) diff --git a/hardware/marmo/configuration.nix b/hardware/marmo/configuration.nix index ec5f551..9e0a522 100644 --- a/hardware/marmo/configuration.nix +++ b/hardware/marmo/configuration.nix @@ -5,13 +5,13 @@ # variables for system conf = { monitor = "DP-1"; - gaming = { - enable = true; - device = 1; - }; hostname = "marmo"; }; mods = { + gaming = { + enable = true; + gpu_device = 1; + }; stylix.colorscheme = "catppuccin-mocha"; hyprland.monitor = [ # default diff --git a/hardware/spaceship/configuration.nix b/hardware/spaceship/configuration.nix index 9fad99f..4efbeae 100644 --- a/hardware/spaceship/configuration.nix +++ b/hardware/spaceship/configuration.nix @@ -10,13 +10,13 @@ in # config variables conf = { monitor = "DP-1"; - gaming = { - enable = true; - }; streamdeck.enable = true; hostname = "spaceship"; }; mods = { + gaming = { + enable = true; + }; stylix.colorscheme = "catppuccin-mocha"; hyprland = { monitor = [ diff --git a/modules/conf.nix b/modules/conf.nix index fea15a0..98352d4 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -61,44 +61,6 @@ ''; }; - gaming = { - enable = lib.mkOption { - default = false; - example = true; - type = lib.types.bool; - description = '' - Install gaming related programs such as steam, gamemode, and more - ''; - }; - - device = lib.mkOption { - default = 0; - example = 0; - type = lib.types.int; - description = '' - GPU device number - ''; - }; - - kernel = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Install the gaming(xanmod) kernel. - ''; - }; - - gamemode_gpu = lib.mkOption { - default = true; - example = false; - type = lib.types.bool; - description = '' - Use GPU optimization. - ''; - }; - }; - streamdeck = { enable = lib.mkOption { default = false; @@ -176,7 +138,7 @@ }; config = { - conf.kernel = lib.mkIf (config.conf.gaming.enable && config.conf.gaming.kernel) pkgs.linuxPackages_xanmod_latest; + conf.kernel = lib.mkIf (config.mods.gaming.enable && config.mods.gaming.kernel) pkgs.linuxPackages_xanmod_latest; } // (lib.optionalAttrs (options?system.stateVersion) { system.stateVersion = "unstable"; diff --git a/modules/programs/gaming.nix b/modules/programs/gaming.nix index 2cc3d9d..4c620ed 100644 --- a/modules/programs/gaming.nix +++ b/modules/programs/gaming.nix @@ -16,9 +16,15 @@ heroic ]; example = [ ]; - type = with lib.types; listOf packages; + type = with lib.types; listOf package; description = "Install gaming related packages"; }; + kernel = lib.mkOption { + default = true; + example = false; + type = lib.types.bool; + description = "Whether to use the xanmod kernel"; + }; steam = lib.mkOption { default = true; example = false;