Files
nix/modules/nixos/programs/steam.nix

35 lines
652 B
Nix
Raw Normal View History

2024-04-18 10:43:47 -03:00
{
config,
lib,
pkgs,
...
}: let
cfg = config.programs.steam;
in {
imports = [];
options.programs.steam = with lib;
with lib.types; {
wayland = mkOption {
type = bool;
default = config.programs.hyprland.enable;
};
};
config = with lib;
mkIf cfg.enable {
environment.systemPackages = with pkgs; [steam-run];
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-run"
];
programs.steam = {
gamescopeSession = mkIf cfg.wayland {
enable = true;
};
};
};
}