From a4a651133b81baffd7162f2a82167120cb347b1b Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Thu, 5 Sep 2024 22:47:19 +0200 Subject: [PATCH] steam: Move to system instead of Flatpak - Support of gamescope for HDR - Best integration with udev devices - Add proton-ge --- hosts/perso-desktop/configuration.nix | 4 ++++ modules/home/apps/default.nix | 2 +- modules/home/apps/flatpak/default.nix | 1 - modules/system/apps/default.nix | 7 +++++++ modules/system/apps/steam/default.nix | 22 ++++++++++++++++++++++ modules/system/default.nix | 1 + 6 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 modules/system/apps/default.nix create mode 100644 modules/system/apps/steam/default.nix diff --git a/hosts/perso-desktop/configuration.nix b/hosts/perso-desktop/configuration.nix index f931f79..8a538d4 100644 --- a/hosts/perso-desktop/configuration.nix +++ b/hosts/perso-desktop/configuration.nix @@ -20,6 +20,10 @@ networking.hostName = "nixos-desktop-perso"; # Define your hostname. modules.system = { + apps = { + steam.enable = true; + }; + desktop = { plasma.enable = true; }; diff --git a/modules/home/apps/default.nix b/modules/home/apps/default.nix index 981aa5c..5f6f130 100644 --- a/modules/home/apps/default.nix +++ b/modules/home/apps/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ ... }: { imports = [ diff --git a/modules/home/apps/flatpak/default.nix b/modules/home/apps/flatpak/default.nix index 7084ec5..2e66e1a 100644 --- a/modules/home/apps/flatpak/default.nix +++ b/modules/home/apps/flatpak/default.nix @@ -21,7 +21,6 @@ in packages = [ # Gaming { appId = "com.discordapp.Discord"; origin = "flathub"; } - { appId = "com.valvesoftware.Steam"; origin = "flathub"; } { appId = "net.lutris.Lutris"; origin = "flathub"; } # Pro diff --git a/modules/system/apps/default.nix b/modules/system/apps/default.nix new file mode 100644 index 0000000..557c5f2 --- /dev/null +++ b/modules/system/apps/default.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + imports = [ + ./steam + ]; +} diff --git a/modules/system/apps/steam/default.nix b/modules/system/apps/steam/default.nix new file mode 100644 index 0000000..448421c --- /dev/null +++ b/modules/system/apps/steam/default.nix @@ -0,0 +1,22 @@ +{ config, pkgs, lib, ... }: + +with lib; +let + cfg = config.modules.system.apps.steam; +in +{ + options.modules.system.apps.steam = { + enable = mkEnableOption '' + Enable steam with my custom configurations + ''; + }; + config = mkIf cfg.enable { + programs.steam = { + enable = true; + extraPackages = with pkgs; [ gamescope ]; + extraCompatPackages = with pkgs; [ proton-ge-bin ]; + }; + + hardware.steam-hardware.enable = true; + }; +} diff --git a/modules/system/default.nix b/modules/system/default.nix index 49a302c..08983d8 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./apps ./desktop ./hardware ./server