mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-26 18:16:13 +01:00
a5a651dbb9
Signed-off-by: main <magic_rb@redalder.org>
41 lines
801 B
Nix
41 lines
801 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
options,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.magic_rb.gaming;
|
|
in {
|
|
options.magic_rb.gaming = {
|
|
enable = mkEnableOption "Enable Gaming support.";
|
|
|
|
steam.remotePlay = mkOption {
|
|
description = ''
|
|
Open ports required for remote play;
|
|
'';
|
|
type = types.bool;
|
|
default = false;
|
|
};
|
|
};
|
|
|
|
config = mkMerge [
|
|
(optionalAttrs (options ? "home-manager")
|
|
{
|
|
home-manager.users."main" = mkIf cfg.enable ({...}: {
|
|
magic_rb = {
|
|
packageCollections.wine.enable = true;
|
|
programs.multimc.enable = true;
|
|
};
|
|
});
|
|
})
|
|
(mkIf cfg.enable {
|
|
programs.steam = {
|
|
enable = cfg.enable;
|
|
remotePlay.openFirewall = cfg.steam.remotePlay;
|
|
};
|
|
})
|
|
];
|
|
}
|