DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

7ef6a72fc0800a78267b341ad08404720cf2db14 — Jonni Liljamo 4 days ago a00bc15
feat: gaming and friends
3 files changed, 60 insertions(+), 0 deletions(-)

A modules/home/mangohud.nix
A modules/nixos/gaming.nix
A modules/nixos/steam.nix
A modules/home/mangohud.nix => modules/home/mangohud.nix +28 -0
@@ 0,0 1,28 @@
{
  flake.modules.homeManager.mangohud = {...}: {
    programs.mangohud = {
      enable = true;
      enableSessionWide = false;
      settings = {
        fps_limit = "60,90,120,200";
        time = true;

        gpu_stats = true;
        gpu_temp = true;
        gpu_text = "GPU";

        cpu_stats = true;
        cpu_temp = true;
        cpu_text = "CPU";

        vram = true;
        ram = true;

        fps = true;
        frametime = true;
        frame_timing = true;
        show_fps_limit = true;
      };
    };
  };
}

A modules/nixos/gaming.nix => modules/nixos/gaming.nix +7 -0
@@ 0,0 1,7 @@
{
  flake.modules.nixos.gaming = {...}: {
    boot.kernel.sysctl."vm.max_map_count" = 1048576;

    programs.gamemode.enable = true;
  };
}

A modules/nixos/steam.nix => modules/nixos/steam.nix +25 -0
@@ 0,0 1,25 @@
{config, ...}: {
  flake.modules.nixos.steam = {...}: {
    imports = with config.flake.modules.nixos; [
      unfree
      gaming
    ];

    arta.unfree.allow = [
      "steam"
      "steam-unwrapped"
    ];

    programs.steam = {
      enable = true;
      # TODO: verify if needed anymore
      /*
        extraPackages = with pkgs; [
        # Fallback fonts (e.g. for Don't Get Lost).
        liberation_ttf
      ];
      */
    };
    hardware.steam-hardware.enable = true;
  };
}