summaryrefslogtreecommitdiff
path: root/system/gaming/default.nix
blob: 606f56545d94fa2e1b8dd4acc91d852b0a4bb138 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
  config,
  lib,
  pkgs,
  ...
}: let
  inherit (lib) mkIf;
  cfg = config.gaming;
in {
  imports = [
    ./steam.nix
  ];

  config = mkIf cfg.enable {
    boot.kernelParams = [
      # lower latency
      "tsc=reliable"
      "clocksource=tsc"
      "preempt=full"
      # no watchdog
      "nmi_watchdog=0"
      "nowatchdog"
    ];

    programs.wine = {
      enable = true;
      package = pkgs.wineWow64Packages.staging;
      binfmt = true;
      ntsync = true;
    };

    services.ananicy = {
      enable = true;
      package = pkgs.ananicy-cpp;
      rulesProvider = pkgs.ananicy-rules-cachyos;
    };

    services.hardware.openrgb = {
      enable = cfg.openrgb.enable;
      package = pkgs.openrgb-with-all-plugins;
    };

    services.scx = {
      enable = true;
      package = pkgs.scx.rustscheds;
      scheduler = "scx_pandemonium";
    };

    environment.systemPackages = with pkgs; [
      winetricks
    ];
  };
}