From 5dd1dbe196f74a82d622a84b7895ddedfbc5ed1a Mon Sep 17 00:00:00 2001 From: Superredstone Date: Tue, 6 May 2025 08:17:16 +0200 Subject: [PATCH] Added a parameter for gaming systems --- flake.nix | 1 + lib/mksystem.nix | 2 ++ modules/packages.nix | 26 +++++++++++++------------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index e62b137..f2706a8 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,7 @@ system = "x86_64-linux"; user = "r3ddy"; email = personalEmail; + gamingSystem = true; }; }; } diff --git a/lib/mksystem.nix b/lib/mksystem.nix index c5e5872..804251f 100644 --- a/lib/mksystem.nix +++ b/lib/mksystem.nix @@ -11,6 +11,7 @@ name: email, wsl ? false, stable ? false, + gamingSystem ? false }: let # True if this is a WSL system. @@ -61,6 +62,7 @@ let currentSystemName = name; currentSystemUser = user; currentSystemEmail = email; + gamingSystem = gamingSystem; isWSL = isWSL; isDarwin = isDarwin; inputs = inputs; diff --git a/modules/packages.nix b/modules/packages.nix index 74e6041..e2efe23 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, gamingSystem, ... }: { environment.systemPackages = with pkgs; [ # CLI utils @@ -38,28 +38,28 @@ # Video card vulkan-tools - # Gaming - dolphin-emu - heroic - mangohud - prismlauncher - steam - vesktop - # GUI applications baobab brave kdePackages.xdg-desktop-portal-kde kitty - libresprite mpv nextcloud-client spotube telegram-desktop - ]; - programs.steam = { + ] ++ (if gamingSystem then [ + libresprite + dolphin-emu + heroic + mangohud + prismlauncher + steam + vesktop + ] else []); + + programs.steam = if gamingSystem then { enable = true; remotePlay.openFirewall = true; - }; + } else {}; }