tangled
alpha
login
or
join now
isabelroses.com
/
dotfiles
12
fork
atom
my over complex system configurations
dotfiles.isabelroses.com/
nixos
nix
flake
dotfiles
linux
12
fork
atom
overview
issues
pulls
pipelines
profiles/gaming: remove
isabelroses.com
3 months ago
4fcbf683
4e8eca76
-160
7 changed files
expand all
collapse all
unified
split
home
isabel
gui
chromium.nix
modules
generic
profiles.nix
home
profiles.nix
nixos
default.nix
gaming
default.nix
gamemode.nix
steam.nix
-6
home/isabel/gui/chromium.nix
···
1
1
{
2
2
lib,
3
3
pkgs,
4
4
-
osConfig,
5
4
...
6
5
}:
7
6
let
8
7
inherit (lib)
9
9
-
optionals
10
8
concatLists
11
9
concatMapStrings
12
10
enableFeature
···
21
19
"aihndpeeoneojofmliffjknbegmipbim" # at://wormhole
22
20
"mnjggcdmjocbbbhaepdhchncahnbgone" # SponsorBlock
23
21
"jghecgabfgfdldnmbfkhmffcabddioke" # Volume Master
24
24
-
]
25
25
-
++ optionals osConfig.garden.profiles.gaming.enable [
26
26
-
"ngonfifpkpeefnhelnfdkficaiihklid" # ProtonDB
27
27
-
"dnhpnfgdlenaccegplpojghhmaamnnfp" # Augmented Steam
28
22
];
29
23
30
24
package = pkgs.chromium.override {
-2
modules/generic/profiles.nix
···
7
7
graphical.enable = mkEnableOption "Graphical interface";
8
8
headless.enable = mkEnableOption "Headless";
9
9
workstation.enable = mkEnableOption "Workstation";
10
10
-
gaming.enable = mkEnableOption "Gaming";
11
11
-
12
10
laptop.enable = mkEnableOption "Laptop";
13
11
14
12
server = {
-3
modules/home/profiles.nix
···
11
11
laptop
12
12
;
13
13
14
14
-
# we don't inherit these as there is extra options here
15
15
-
gaming = { inherit (cfg.gaming) enable; };
16
16
-
17
14
server = {
18
15
inherit (cfg.server) enable;
19
16
oracle.enable = cfg.server.oracle.enable;
-1
modules/nixos/default.nix
···
9
9
./emulation.nix
10
10
./environment
11
11
./extras.nix
12
12
-
./gaming
13
12
./hardware
14
13
./headless.nix
15
14
./kernel
-6
modules/nixos/gaming/default.nix
···
1
1
-
{
2
2
-
imports = [
3
3
-
./gamemode.nix # cool scripts, and programs to improve gaming performance
4
4
-
./steam.nix # steam, the gaming platform
5
5
-
];
6
6
-
}
-27
modules/nixos/gaming/gamemode.nix
···
1
1
-
{
2
2
-
lib,
3
3
-
config,
4
4
-
...
5
5
-
}:
6
6
-
let
7
7
-
inherit (lib) mkIf mkEnableOption;
8
8
-
9
9
-
cfg = config.garden.profiles.gaming.gamemode;
10
10
-
in
11
11
-
{
12
12
-
options.garden.profiles.gaming.gamemode.enable = mkEnableOption "Gamemode" // {
13
13
-
default = config.garden.profiles.gaming.enable;
14
14
-
};
15
15
-
16
16
-
config.programs.gamemode = mkIf cfg.enable {
17
17
-
enable = true;
18
18
-
enableRenice = true;
19
19
-
20
20
-
settings = {
21
21
-
general = {
22
22
-
softrealtime = "auto";
23
23
-
renice = 15;
24
24
-
};
25
25
-
};
26
26
-
};
27
27
-
}
-115
modules/nixos/gaming/steam.nix
···
1
1
-
{
2
2
-
lib,
3
3
-
pkgs,
4
4
-
config,
5
5
-
...
6
6
-
}:
7
7
-
let
8
8
-
inherit (lib) mkIf mkOption mkEnableOption;
9
9
-
10
10
-
cfg = config.garden.profiles.gaming.steam;
11
11
-
in
12
12
-
{
13
13
-
options.garden.profiles.gaming.steam = {
14
14
-
enable = mkEnableOption "Enable Steam" // {
15
15
-
default = config.garden.profiles.gaming.enable;
16
16
-
};
17
17
-
18
18
-
gamescopeSession = {
19
19
-
enable = mkEnableOption "gamescope TTY session" // {
20
20
-
default = cfg.enable;
21
21
-
};
22
22
-
23
23
-
tty = mkOption {
24
24
-
default = 4;
25
25
-
type = lib.types.int;
26
26
-
description = "tty to connect gamescope session on";
27
27
-
};
28
28
-
};
29
29
-
};
30
30
-
31
31
-
config = mkIf cfg.enable {
32
32
-
programs.steam = {
33
33
-
enable = true;
34
34
-
# Open ports in the firewall for Steam Remote Play
35
35
-
# remotePlay.openFirewall = true;
36
36
-
# Open ports in the firewall for Source Dedicated Server
37
37
-
# dedicatedServer.openFirewall = true;
38
38
-
# Compatibility tools to install
39
39
-
# this option used to be provided by modules/shared/nixos/steam
40
40
-
extraCompatPackages = [ pkgs.proton-ge-bin.steamcompattool ];
41
41
-
gamescopeSession.enable = true;
42
42
-
};
43
43
-
44
44
-
programs.gamescope = {
45
45
-
enable = true;
46
46
-
capSysNice = true;
47
47
-
};
48
48
-
49
49
-
garden.packages = {
50
50
-
exec-gamescope = pkgs.writeShellApplication {
51
51
-
name = "exec-gamescope";
52
52
-
text = ''
53
53
-
exec gamescope --adaptive-sync --rt --steam -- steam -pipewire-dmabuf -tenfoot
54
54
-
'';
55
55
-
};
56
56
-
};
57
57
-
58
58
-
environment.loginShellInit = mkIf cfg.gamescopeSession.enable ''
59
59
-
[[ "$(tty)" = "/dev/tty${toString cfg.gamescopeSession.tty}" ]] && exec-gamescope
60
60
-
'';
61
61
-
62
62
-
nixpkgs.overlays = [
63
63
-
(_: prev: {
64
64
-
steam = prev.steam.override (
65
65
-
{
66
66
-
extraPkgs ? _: [ ],
67
67
-
...
68
68
-
}:
69
69
-
{
70
70
-
extraPkgs =
71
71
-
pkgs':
72
72
-
builtins.attrValues {
73
73
-
extras = extraPkgs pkgs';
74
74
-
75
75
-
inherit (pkgs')
76
76
-
# keep-sorted start
77
77
-
at-spi2-atk
78
78
-
fmodex
79
79
-
gtk3
80
80
-
gtk3-x11
81
81
-
harfbuzz
82
82
-
icu
83
83
-
inetutils
84
84
-
keyutils
85
85
-
libgdiplus
86
86
-
libkrb5
87
87
-
libpng
88
88
-
libpulseaudio
89
89
-
libthai
90
90
-
libunwind # for titanfall 2 Northstar launcher
91
91
-
libvorbis
92
92
-
mono5
93
93
-
pango
94
94
-
strace
95
95
-
zlib
96
96
-
# keep-sorted end
97
97
-
;
98
98
-
99
99
-
inherit (pkgs.stdenv.cc.cc) lib;
100
100
-
101
101
-
inherit (pkgs.xorg)
102
102
-
# keep-sorted start
103
103
-
libXScrnSaver
104
104
-
libXcursor
105
105
-
libXi
106
106
-
libXinerama
107
107
-
# keep-sorted end
108
108
-
;
109
109
-
};
110
110
-
}
111
111
-
);
112
112
-
})
113
113
-
];
114
114
-
};
115
115
-
}