This commit is contained in:
2025-08-29 15:25:40 +02:00
parent 26440bfeee
commit f3821f0dfa
201 changed files with 2461 additions and 1546 deletions

View File

@@ -4,12 +4,20 @@
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption concatStringsSep head filter getExe;
}:
let
inherit (lib)
mkIf
mkEnableOption
concatStringsSep
head
filter
getExe
;
cfg = config.home.programs.steam;
steam-with-pkgs = pkgs.steam.override {
extraPkgs = pkgs:
with pkgs; [
extraPkgs =
pkgs: with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
@@ -25,32 +33,34 @@
};
monitor = head (filter (m: m.primary) config.monitors);
steam-session = let
gamescope = concatStringsSep " " [
(getExe pkgs.gamescope)
"--output-width ${toString monitor.width}"
"--output-height ${toString monitor.height}"
"--framerate-limit ${toString monitor.refreshRate}"
"--prefer-output ${monitor.name}"
# "--adaptive-sync"
"--expose-wayland"
"--hdr-enabled"
"--steam"
];
steam = concatStringsSep " " [
"steam"
"steam://open/bigpicture"
];
in
steam-session =
let
gamescope = concatStringsSep " " [
(getExe pkgs.gamescope)
"--output-width ${toString monitor.width}"
"--output-height ${toString monitor.height}"
"--framerate-limit ${toString monitor.refreshRate}"
"--prefer-output ${monitor.name}"
# "--adaptive-sync"
"--expose-wayland"
"--hdr-enabled"
"--steam"
];
steam = concatStringsSep " " [
"steam"
"steam://open/bigpicture"
];
in
pkgs.writeTextDir "share/wayland-sessions/steam-sesson.desktop" # ini
''
[Desktop Entry]
Name=Steam Session
Exec=${gamescope} -- ${steam}
Type=Application
'';
in {
''
[Desktop Entry]
Name=Steam Session
Exec=${gamescope} -- ${steam}
Type=Application
'';
in
{
options = {
home.programs.steam.enable = mkEnableOption "Enables steam";
};