From 7e82f983e721a6513d9e9dba68f70ac38189f418 Mon Sep 17 00:00:00 2001 From: xeovalyte Date: Sun, 17 Mar 2024 10:00:27 +0100 Subject: [PATCH] Added steam --- hosts/desktop/default.nix | 1 + modules/system/desktop/nvidia.nix | 1 + modules/system/programs/steam.nix | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 modules/system/programs/steam.nix diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 3f42b2b..f6ee956 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -9,6 +9,7 @@ ../../modules/system/programs/sunshine.nix ../../modules/system/programs/syncthing.nix ../../modules/system/programs/thunar.nix + ../../modules/system/programs/steam.nix ../../modules/system/utils/common.nix ../../modules/system/utils/firewall.nix #../../modules/system/utils/fprint.nix diff --git a/modules/system/desktop/nvidia.nix b/modules/system/desktop/nvidia.nix index 87ccc77..936c870 100644 --- a/modules/system/desktop/nvidia.nix +++ b/modules/system/desktop/nvidia.nix @@ -5,6 +5,7 @@ "nvidia-x11" "nvidia-settings" ]; + hardware.opengl = { enable = true; driSupport = true; diff --git a/modules/system/programs/steam.nix b/modules/system/programs/steam.nix new file mode 100644 index 0000000..fa52670 --- /dev/null +++ b/modules/system/programs/steam.nix @@ -0,0 +1,16 @@ +{ config, lib, nixpkgs, ... }: + +{ + nixpkgs.config.allowUnfree = true; + nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "steam" + "steam-original" + "steam-run" + ]; + + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; +}