Skip to content

Commit a797490

Browse files
committed
fix: blurry resolution when using gamescope
1 parent 1c48e9d commit a797490

File tree

4 files changed

+27
-10
lines changed

4 files changed

+27
-10
lines changed

hosts/desktop/configuration.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666

6767
gaming = {
6868
enable = true;
69+
gamescope.enable = true;
6970
steam.enable = true;
7071
};
7172

modules/gaming/default.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
options.myConfig.gaming = {
55
enable = lib.mkEnableOption "Enable gaming configuration";
66

7+
gamescope = {
8+
enable = lib.mkEnableOption "Enable gamescope";
9+
};
10+
711
steam = {
812
enable = lib.mkEnableOption "Enable Steam gaming platform";
913
};
1014
};
1115

1216
imports = [
17+
./gamescope.nix
1318
./steam.nix
1419
];
1520
}

modules/gaming/gamescope.nix

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
inputs,
3+
config,
4+
lib,
5+
pkgs,
6+
...
7+
}:
8+
9+
let
10+
cfg = config.myConfig.gaming.gamescope;
11+
in
12+
{
13+
config = lib.mkIf (config.myConfig.gaming.enable && cfg.enable) {
14+
programs.gamescope = {
15+
enable = true;
16+
package = pkgs.gamescope.overrideAttrs (_: {
17+
NIX_CFLAGS_COMPILE = [ "-fno-fast-math" ];
18+
});
19+
};
20+
};
21+
}

modules/gaming/steam.nix

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ in
1414
programs = {
1515
steam = {
1616
enable = true;
17-
gamescopeSession = {
18-
enable = true;
19-
args = [
20-
"-w 1920"
21-
"-h 1080"
22-
"-r 180"
23-
"--adaptive-sync"
24-
"--immediate-flips"
25-
];
26-
};
2717
};
2818
gamemode.enable = true;
2919
};

0 commit comments

Comments
 (0)