Skip to content

Commit 9a37434

Browse files
committed
feat: myGaming module, remove jdks, remove unstable packages
Signed-off-by: saygo-png <saygo.mail@proton.me>
1 parent f22e9b0 commit 9a37434

File tree

5 files changed

+93
-92
lines changed

5 files changed

+93
-92
lines changed

configuration.nix

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
options,
1111
conUsername,
1212
conFlakePath,
13-
pkgs-unstable,
1413
...
1514
}: {
1615
imports =
@@ -63,6 +62,7 @@
6362
"myTmux.nix"
6463
"myAichat.nix"
6564
"myThunar.nix"
65+
"myGaming.nix"
6666
"myPackages.nix"
6767
"myStupid.nix"
6868
"myTemplates.nix"
@@ -539,7 +539,7 @@
539539
home-manager = {
540540
useGlobalPkgs = true;
541541
useUserPackages = true;
542-
extraSpecialArgs = {inherit inputs pkgs-unstable;};
542+
extraSpecialArgs = {inherit inputs;};
543543
backupFileExtension = "backup"; # home-manager breaks without it.
544544
users.${conUsername} = {
545545
lib,
@@ -779,8 +779,8 @@
779779

780780
# Unstable
781781
# nixpkgs-unstable-working-krita.krita # Painting
782-
pkgs-unstable.krita # Painting
783-
pkgs-unstable.inkscape # Vector graphics
782+
krita # Painting
783+
inkscape # Vector graphics
784784
deno
785785
];
786786

hosts/desktop/desktop.nix

-77
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,6 @@
5454
powerManagement.cpuFreqGovernor = "performance";
5555
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
5656

57-
# Taken from https://github.com/fufexan/nix-gaming
58-
boot.kernel.sysctl = {
59-
# 20-shed.conf
60-
"kernel.sched_cfs_bandwidth_slice_us" = 3000;
61-
# 20-net-timeout.conf
62-
# This is required due to some games being unable to reuse their TCP ports
63-
# if they're killed and restarted quickly - the default timeout is too large.
64-
"net.ipv4.tcp_fin_timeout" = 5;
65-
# 30-vm.conf
66-
# USE MAX_INT - MAPCOUNT_ELF_CORE_MARGIN.
67-
# see comment in include/linux/mm.h in the kernel tree.
68-
"vm.max_map_count" = 2147483642;
69-
};
70-
7157
services.xserver.videoDrivers = ["modesetting"];
7258

7359
hardware = {
@@ -100,11 +86,6 @@
10086
# services.easyeffects.enable = true;
10187
# services.easyeffects.preset = "Audio-Technica ATH-M30x";
10288

103-
programs.mangohud = {
104-
enable = true;
105-
enableSessionWide = false;
106-
};
107-
10889
xdg.configFile."zed/settings.json".text = builtins.toJSON {
10990
tab_size = 2;
11091
ensure_final_newline_on_save = false;
@@ -199,15 +180,6 @@
199180
};
200181
};
201182

202-
# Allowed unfree packages
203-
nixpkgs.config.allowUnfreePredicate = pkg:
204-
builtins.elem (lib.getName pkg) [
205-
"steam"
206-
"steam-run"
207-
"steam-original"
208-
"steam-unwrapped"
209-
];
210-
211183
# There is a module for this but i find nix -> yaml weird
212184
services.borgmatic.enable = true;
213185
environment.etc = {
@@ -246,54 +218,5 @@
246218
piper # For ratbagd
247219
borgbackup
248220
pkgs-unstable.zed-editor.fhs # Another text editor
249-
250-
# Game launcher
251-
lutris
252-
winetricks
253-
wineWowPackages.waylandFull
254-
blender-hip
255-
256-
(
257-
writeShellScriptBin
258-
"sgamescope" # [s]team [gamescope]
259-
260-
''
261-
gamescope \
262-
-w ${builtins.toString config.const.screenWidth} \
263-
-W ${builtins.toString config.const.screenWidth} \
264-
-h ${builtins.toString config.const.screenHeight} \
265-
-H ${builtins.toString config.const.screenHeight} \
266-
-r ${builtins.toString config.const.refreshRate} -f steam
267-
''
268-
)
269221
];
270-
271-
# # This is the command for running all 3 programs at once that u put into steam
272-
# # gamemoderun gamescope -w 1920 -h 1080 -f -- mangohud %command%
273-
programs.steam = {
274-
enable = true;
275-
gamescopeSession.enable = true;
276-
# Load the extest library into Steam, to translate X11 input events to uinput events (for using Steam Input on Wayland).
277-
# extest.enable = true;
278-
extraCompatPackages = [pkgs-unstable.proton-ge-bin];
279-
extraPackages = [
280-
pkgs.gamescope
281-
pkgs.gamemode
282-
# pkgs.libpng
283-
# pkgs.libkrb5
284-
# pkgs.keyutils
285-
# pkgs.libvorbis
286-
# pkgs.xorg.libXi
287-
# pkgs.libpulseaudio
288-
# pkgs.xorg.libXcursor
289-
# pkgs.stdenv.cc.cc.lib
290-
# pkgs.xorg.libXinerama
291-
# pkgs.xorg.libXScrnSaver
292-
];
293-
};
294-
programs.gamemode.enable = true;
295-
programs.gamescope = {
296-
enable = true;
297-
capSysNice = true; # Breaks it inside of hyprland
298-
};
299222
}

hosts/thinkpad/thinkpad.nix

-5
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,6 @@
167167
environment.systemPackages = with pkgs; [
168168
acpi # Cli battery interface.
169169
powertop # Power drain check
170-
171-
# Games.
172-
lutris-free
173-
winetricks
174-
wineWowPackages.waylandFull
175170
];
176171

177172
services.libinput.mouse.accelSpeed = lib.strings.floatToString config.const.accelSpeed;

modules/myGaming.nix

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
pkgs,
3+
lib,
4+
config,
5+
conUsername,
6+
...
7+
}: {
8+
# Allowed unfree packages
9+
nixpkgs.config.allowUnfreePredicate = pkg:
10+
builtins.elem (lib.getName pkg) [
11+
"steam"
12+
"steam-run"
13+
"steam-original"
14+
"steam-unwrapped"
15+
];
16+
17+
home-manager.users.${conUsername} = _: {
18+
programs.mangohud = {
19+
enable = true;
20+
enableSessionWide = false;
21+
};
22+
};
23+
24+
# # This is the command for running all 3 programs at once that u put into steam
25+
# # gamemoderun gamescope -w 1920 -h 1080 -f -- mangohud %command%
26+
programs.steam = {
27+
enable = true;
28+
gamescopeSession.enable = true;
29+
# Load the extest library into Steam, to translate X11 input events to uinput events (for using Steam Input on Wayland).
30+
# extest.enable = true;
31+
extraCompatPackages = [pkgs.proton-ge-bin];
32+
extraPackages = [
33+
pkgs.gamescope
34+
pkgs.gamemode
35+
# pkgs.libpng
36+
# pkgs.libkrb5
37+
# pkgs.keyutils
38+
# pkgs.libvorbis
39+
# pkgs.xorg.libXi
40+
# pkgs.libpulseaudio
41+
# pkgs.xorg.libXcursor
42+
# pkgs.stdenv.cc.cc.lib
43+
# pkgs.xorg.libXinerama
44+
# pkgs.xorg.libXScrnSaver
45+
];
46+
};
47+
48+
programs.gamemode.enable = true;
49+
programs.gamescope = {
50+
enable = true;
51+
capSysNice = true; # Breaks it inside of hyprland
52+
};
53+
54+
# Taken from https://github.com/fufexan/nix-gaming
55+
boot.kernel.sysctl = {
56+
# 20-shed.conf
57+
"kernel.sched_cfs_bandwidth_slice_us" = 3000;
58+
# 20-net-timeout.conf
59+
# This is required due to some games being unable to reuse their TCP ports
60+
# if they're killed and restarted quickly - the default timeout is too large.
61+
"net.ipv4.tcp_fin_timeout" = 5;
62+
# 30-vm.conf
63+
# USE MAX_INT - MAPCOUNT_ELF_CORE_MARGIN.
64+
# see comment in include/linux/mm.h in the kernel tree.
65+
"vm.max_map_count" = 2147483642;
66+
};
67+
environment.systemPackages = [
68+
# Game launcher
69+
pkgs.lutris
70+
pkgs.winetricks
71+
pkgs.wineWowPackages.waylandFull
72+
pkgs.blender-hip
73+
74+
(
75+
pkgs.writeShellScriptBin
76+
"sgamescope" # [s]team [gamescope]
77+
78+
''
79+
gamescope \
80+
-w ${builtins.toString config.const.screenWidth} \
81+
-W ${builtins.toString config.const.screenWidth} \
82+
-h ${builtins.toString config.const.screenHeight} \
83+
-H ${builtins.toString config.const.screenHeight} \
84+
-r ${builtins.toString config.const.refreshRate} -f steam
85+
''
86+
)
87+
];
88+
}

modules/myPrismlauncher.nix

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
...
55
}: {
66
home-manager.users.${conUsername} = {
7-
home.packages = with pkgs; [
7+
home.packages = [
88
(let
99
prismlauncher-unwrapped-patched = pkgs.prismlauncher-unwrapped.overrideAttrs {
1010
patches = [
@@ -33,11 +33,6 @@
3333
in
3434
pkgs.prismlauncher.override {
3535
prismlauncher-unwrapped = prismlauncher-unwrapped-patched;
36-
jdks = [
37-
temurin-bin-8
38-
temurin-bin-17
39-
temurin-bin-21
40-
];
4136
})
4237
];
4338
};

0 commit comments

Comments
 (0)