nixos-config/configurations/profile/os/games/steam.nix

118 lines
3.0 KiB
Nix
Raw Permalink Normal View History

{ config, pkgs, lib, materusArg, inputs, ... }:
2023-10-08 11:42:08 +02:00
let
steamPkg = pkgs.steam.override {
extraPkgs = pkgs: [
2023-10-14 14:40:37 +02:00
pkgs.libdecor
2023-10-08 11:42:08 +02:00
pkgs.obs-studio-plugins.obs-vkcapture
pkgs.steamcmd
pkgs.nss_latest
pkgs.libstrangle
pkgs.libkrb5
pkgs.keyutils
pkgs.libGL
pkgs.libglvnd
pkgs.steamPackages.steam
pkgs.libxcrypt
pkgs.gnutls
pkgs.xorg.libXcursor
pkgs.xorg.libXi
pkgs.xorg.libXinerama
pkgs.xorg.libXScrnSaver
pkgs.xorg.xinput
pkgs.xorg.xcbutilwm
pkgs.xorg.xcbutilimage
pkgs.xorg.xcbutilkeysyms
pkgs.xorg.xcbutilerrors
pkgs.xorg.xcbutilrenderutil
pkgs.xorg.xcbutil
pkgs.xorg.xwininfo
pkgs.yad
pkgs.xdotool
pkgs.libinput
pkgs.openvdb
pkgs.openssl
2024-04-19 18:27:36 +02:00
pkgs.tbb
2023-10-08 11:42:08 +02:00
pkgs.gtk4
pkgs.gtk3
pkgs.glib
pkgs.gsettings-desktop-schemas
pkgs.fuse
pkgs.samba4Full
pkgs.tdb
pkgs.jbig2enc
pkgs.jbig2dec
pkgs.vivaldi
pkgs.x264.lib
pkgs.steamtinkerlaunch
2023-12-22 11:53:49 +01:00
pkgs.pipewire
2024-02-10 12:29:42 +01:00
pkgs.gitFull
pkgs.git-lfs
2023-10-08 11:42:08 +02:00
] ++ config.materus.profile.packages.list.fonts ++ config.materus.profile.steam.extraPkgs;
2023-10-08 11:42:08 +02:00
extraLibraries = pkgs: [
pkgs.libkrb5
pkgs.keyutils
pkgs.ncurses6
pkgs.xorg.xinput
pkgs.libinput
pkgs.fontconfig
pkgs.libxcrypt
pkgs.gnutls
2024-03-11 16:19:31 +01:00
pkgs.samba
2023-10-08 11:42:08 +02:00
pkgs.tdb
2024-02-10 12:29:42 +01:00
pkgs.jemalloc
pkgs.gperftools
2023-10-08 11:42:08 +02:00
] ++
(with config.hardware.opengl; if pkgs.hostPlatform.is64bit
then [ package ] ++ extraPackages
else [ package32 ] ++ extraPackages32);
2024-03-30 18:58:33 +01:00
extraEnv = config.materus.profile.steam.extraEnv;
2023-10-08 11:42:08 +02:00
};
cfg = config.materus.profile.steam;
in
{
options.materus.profile.steam.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus steam settings for OS";
2023-10-08 11:42:08 +02:00
options.materus.profile.steam.package = lib.mkOption {
type = lib.types.package;
default = steamPkg;
description = "Package used by steam";
};
options.materus.profile.steam.extraPkgs = lib.mkOption {
2024-03-11 16:19:31 +01:00
default = [ ];
description = "Extra packages for steam";
};
2024-03-30 18:58:33 +01:00
options.materus.profile.steam.extraEnv = lib.mkOption {
default = { };
description = "Extra Env for steam";
};
2023-10-08 11:42:08 +02:00
config = lib.mkIf cfg.enable {
programs.gamescope.enable = lib.mkDefault true;
programs.gamescope.capSysNice = lib.mkDefault false;
2023-10-08 11:42:08 +02:00
hardware.steam-hardware.enable = lib.mkDefault true;
2024-03-30 18:58:33 +01:00
materus.profile.steam.extraEnv = {
XDG_DATA_DIRS = "/usr/share:\${XDG_DATA_DIRS}";
OBS_VKCAPTURE = "1";
};
2023-10-08 11:42:08 +02:00
programs.steam = {
enable = lib.mkDefault true;
dedicatedServer.openFirewall = lib.mkDefault true;
remotePlay.openFirewall = lib.mkDefault true;
gamescopeSession.enable = lib.mkDefault true;
2023-10-08 11:42:08 +02:00
};
environment.sessionVariables = rec {
STEAM_EXTRA_COMPAT_TOOLS_PATHS = lib.mkDefault "\${HOME}/.steam/root/compatibilitytools.d";
};
environment.systemPackages = [
steamPkg
steamPkg.run
];
};
}