From ae6c27b08f51eed604cbb15543e6b224ab35bf0a Mon Sep 17 00:00:00 2001 From: LarsZauberer Date: Wed, 17 Apr 2024 15:56:45 +0200 Subject: [PATCH] Added steam --- hosts/lars/hyprland.nix | 4 ++++ hosts/lars/kronos/configuration.nix | 5 +++++ modules/gui/default.nix | 1 + modules/gui/steam.nix | 22 ++++++++++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 modules/gui/steam.nix diff --git a/hosts/lars/hyprland.nix b/hosts/lars/hyprland.nix index 63cfa79..5353ff2 100644 --- a/hosts/lars/hyprland.nix +++ b/hosts/lars/hyprland.nix @@ -120,6 +120,10 @@ in { "$mod, down, movefocus, d" "$mod, F, fullscreen" + # Special Workspaces + "$mod SHIFT, F, movetoworkspacesilent, special" + "$mod, s, togglespecialworkspace," + # Screenshot "$mod SHIFT, s, exec, grim -g \"$(slurp -d)\" - | wl-copy" diff --git a/hosts/lars/kronos/configuration.nix b/hosts/lars/kronos/configuration.nix index be46c8a..01cc83c 100644 --- a/hosts/lars/kronos/configuration.nix +++ b/hosts/lars/kronos/configuration.nix @@ -13,6 +13,11 @@ opacity = 0.8; blur = true; }; + + steam = { + enable = true; + gamescope = true; + }; }; hyprland = { diff --git a/modules/gui/default.nix b/modules/gui/default.nix index 95868e4..d950bdf 100644 --- a/modules/gui/default.nix +++ b/modules/gui/default.nix @@ -13,5 +13,6 @@ _: { ./WM ./alacritty.nix ./firefox.nix + ./steam.nix ]; } diff --git a/modules/gui/steam.nix b/modules/gui/steam.nix new file mode 100644 index 0000000..ca600f2 --- /dev/null +++ b/modules/gui/steam.nix @@ -0,0 +1,22 @@ + +{ config, lib, inputs, pkgs, ... }: +with lib; let + username = config.modules.other.system.username; + cfg = config.modules.programs.steam; +in { + options.modules.programs.steam = { + enable = mkEnableOption "steam"; + gamescope = mkEnableOption "gamescope"; + }; + + config = mkIf cfg.enable { + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + gamescopeSession.enable = mkIf cfg.gamescope true; + }; + home-manager.users.${username} = { + }; + }; +}