diff --git a/home/package-sets/default.nix b/home/package-sets/default.nix index 73d5b3e..a7553ac 100644 --- a/home/package-sets/default.nix +++ b/home/package-sets/default.nix @@ -5,5 +5,6 @@ ./dev.nix ./multimedia.nix ./productivity.nix + ./gaming.nix ]; } diff --git a/home/package-sets/gaming.nix b/home/package-sets/gaming.nix new file mode 100644 index 0000000..94b19aa --- /dev/null +++ b/home/package-sets/gaming.nix @@ -0,0 +1,40 @@ +{ config, osConfig ? { }, lib, pkgs, ... }: +let + cfg = config.nixfiles.packageSets.gaming; + default = osConfig.nixfiles.packageSets.gaming.enable or false; +in +{ + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + ludusavi + rclone # needed to sync ludusavi + protontricks + ] ++ lib.optionals cfg.enableLaunchers [ + steam + prismlauncher + heroic + legendary-gl + ]; + }; + options.nixfiles.packageSets.gaming = { + enable = lib.mkOption { + description = "Whether to install gaming-related packages"; + inherit default; + type = lib.types.bool; + example = true; + }; + enableLaunchers = lib.mkOption { + description = '' + Whether to install launchers as user-level config. This is left + disabled by default as to not conflict with any game launchers provided + by the user's distribution (for example, installing another Steam on + the Steam Deck seems like an absolutely AWFUL idea). Nix (on non-NixOS) + also has not-so-great handling of OpenGL, so launchers should probably + be installed via the user's distribution instead. + ''; + type = lib.types.bool; + default = false; + example = true; + }; + }; +} diff --git a/system/package-sets/gaming.nix b/system/package-sets/gaming.nix index 8e5f202..e1b1917 100644 --- a/system/package-sets/gaming.nix +++ b/system/package-sets/gaming.nix @@ -38,6 +38,7 @@ in virtualisation.waydroid.enable = lib.mkDefault true; environment.systemPackages = with pkgs; [ + protontricks mangohud goverlay prismlauncher