Update gaming package-set and add home cfg

This commit is contained in:
NullBite 2024-04-12 13:15:56 -04:00
parent a04af4bde6
commit dc7ff4cac7
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
3 changed files with 42 additions and 0 deletions

View File

@ -5,5 +5,6 @@
./dev.nix
./multimedia.nix
./productivity.nix
./gaming.nix
];
}

View File

@ -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;
};
};
}

View File

@ -38,6 +38,7 @@ in
virtualisation.waydroid.enable = lib.mkDefault true;
environment.systemPackages = with pkgs; [
protontricks
mangohud
goverlay
prismlauncher