From e8e62c81e3680e0137aa640f4c0e348bec2cd3d2 Mon Sep 17 00:00:00 2001 From: William Date: Fri, 6 Feb 2026 22:36:30 -0300 Subject: [PATCH] add aspects/gaming/ modules Gaming-related NixOS and home-manager configuration: flatpak, hardware, launchers, mangohud, steam Co-Authored-By: Claude Opus 4.5 --- aspects/gaming/flatpak.nix | 23 +++++++++++++++++++ aspects/gaming/hardware.nix | 11 +++++++++ aspects/gaming/launchers.nix | 11 +++++++++ aspects/gaming/mangohud.nix | 43 ++++++++++++++++++++++++++++++++++++ aspects/gaming/steam.nix | 17 ++++++++++++++ 5 files changed, 105 insertions(+) create mode 100644 aspects/gaming/flatpak.nix create mode 100644 aspects/gaming/hardware.nix create mode 100644 aspects/gaming/launchers.nix create mode 100644 aspects/gaming/mangohud.nix create mode 100644 aspects/gaming/steam.nix diff --git a/aspects/gaming/flatpak.nix b/aspects/gaming/flatpak.nix new file mode 100644 index 0000000..ad50c7c --- /dev/null +++ b/aspects/gaming/flatpak.nix @@ -0,0 +1,23 @@ +{ ... }: + +{ + flake.modules.nixos.gaming-flatpak = { pkgs, ... }: { + services.flatpak.packages = [ + "com.github.k4zmu2a.spacecadetpinball" + "com.steamgriddb.SGDBoop" + "io.github.Foldex.AdwSteamGtk" + "io.itch.itch" + "io.mrarm.mcpelauncher" + "net.retrodeck.retrodeck" + "org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/25.08" + rec { + appId = "com.hypixel.HytaleLauncher"; + sha256 = "01307s44bklc1ldcigcn9n4lm8hf8q793v9fv7w4w04xd5zyh4rv"; + bundle = "${pkgs.fetchurl { + url = "https://launcher.hytale.com/builds/release/linux/amd64/hytale-launcher-latest.flatpak"; + inherit sha256; + }}"; + } + ]; + }; +} diff --git a/aspects/gaming/hardware.nix b/aspects/gaming/hardware.nix new file mode 100644 index 0000000..f1bd75b --- /dev/null +++ b/aspects/gaming/hardware.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + flake.modules.nixos.gaming-hardware = { ... }: { + hardware = { + xpadneo.enable = true; + steam-hardware.enable = true; # Allow steam client to manage controllers + graphics.enable32Bit = true; # For OpenGL games + }; + }; +} diff --git a/aspects/gaming/launchers.nix b/aspects/gaming/launchers.nix new file mode 100644 index 0000000..5684f9f --- /dev/null +++ b/aspects/gaming/launchers.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + flake.modules.nixos.gaming-launchers = { pkgs, ... }: { + environment.systemPackages = with pkgs; [ + clonehero + heroic + prismlauncher + ]; + }; +} diff --git a/aspects/gaming/mangohud.nix b/aspects/gaming/mangohud.nix new file mode 100644 index 0000000..7f83644 --- /dev/null +++ b/aspects/gaming/mangohud.nix @@ -0,0 +1,43 @@ +{ ... }: + +{ + flake.modules = { + nixos.gaming-mangohud = { pkgs, ... }: { + environment.systemPackages = with pkgs; [ + mangohud + ]; + }; + + homeManager.gaming-mangohud = { config, ... }: { + programs.mangohud = { + enable = true; + enableSessionWide = true; + settings = { + position = "top-left"; + fps = true; + frametime = false; + frame_timing = false; + gpu_stats = true; + gpu_temp = true; + gpu_power = true; + cpu_stats = true; + cpu_temp = true; + cpu_power = true; + ram = true; + vram = true; + gamemode = false; + vkbasalt = false; + version = false; + engine_version = false; + vulkan_driver = false; + wine = false; + time = false; + fps_sampling_period = 500; + toggle_hud = "Shift_L+F12"; + toggle_logging = "Ctrl_L+F2"; + output_folder = "${config.home.homeDirectory}/.local/share/mangohud"; + }; + }; + }; + }; +} diff --git a/aspects/gaming/steam.nix b/aspects/gaming/steam.nix new file mode 100644 index 0000000..e0ab9a8 --- /dev/null +++ b/aspects/gaming/steam.nix @@ -0,0 +1,17 @@ +{ ... }: + +{ + flake.modules.nixos.gaming-steam = { pkgs, ... }: { + environment.systemPackages = with pkgs; [ + steam-run + ]; + + programs = { + steam = { + enable = true; + extraCompatPackages = [ pkgs.proton-ge-bin ]; + }; + gamemode.enable = true; + }; + }; +}