fmt
This commit is contained in:
@@ -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";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user