From 67fda15ca99b3d8e5aac64af7c445536a9605160 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sun, 15 Feb 2026 18:31:15 -0500 Subject: [PATCH] modified gaming apps --- modules/apps/gaming.nix | 152 ++++++++++----------- modules/machine/cloud/configuration.nix | 1 + modules/machine/thancred/configuration.nix | 2 +- 3 files changed, 77 insertions(+), 78 deletions(-) diff --git a/modules/apps/gaming.nix b/modules/apps/gaming.nix index e1a2c3f..f3f4d93 100644 --- a/modules/apps/gaming.nix +++ b/modules/apps/gaming.nix @@ -2,15 +2,12 @@ config, lib, pkgs, - aagl, - vintage-story, + vintage-story ? null, ... -}: let +} @ args: let cfg = config.gaming; + aagl = args.aagl or null; in { - imports = [ - aagl.nixosModules.default - ]; options.gaming = { steam = { @@ -153,84 +150,85 @@ in { config = let agl = cfg.aagl; - in { - programs.steam = lib.mkIf cfg.steam.enable { - enable = true; - remotePlay.openFirewall = cfg.steam.firewall.remotePlay; - localNetworkGameTransfers.openFirewall = cfg.steam.firewall.localNetworkGameTransfers; - }; + hasAagl = aagl != null; + in lib.mkMerge [ + { + programs.steam = lib.mkIf cfg.steam.enable { + enable = true; + remotePlay.openFirewall = cfg.steam.firewall.remotePlay; + localNetworkGameTransfers.openFirewall = cfg.steam.firewall.localNetworkGameTransfers; + }; - programs.gamemode = lib.mkIf cfg.gamemode.enable { - enable = true; - settings = cfg.gamemode.config; - }; + programs.gamemode = lib.mkIf cfg.gamemode.enable { + enable = true; + settings = cfg.gamemode.config; + }; - programs.gamescope = lib.mkIf cfg.gamescope.enable { - enable = true; + programs.gamescope = lib.mkIf cfg.gamescope.enable { + enable = true; - # Apply custom resolution if specified - args = - lib.optional (cfg.gamescope.settings.resolution != null) [ - "-w" - (toString cfg.gamescope.settings.resolution.width) - "-h" - (toString cfg.gamescope.settings.resolution.height) - ] - ++ lib.optional (cfg.gamescope.settings.refreshRate != null) [ - "-r" - (toString cfg.gamescope.settings.refreshRate) - ]; - }; + # Apply custom resolution if specified + args = + lib.optional (cfg.gamescope.settings.resolution != null) [ + "-w" + (toString cfg.gamescope.settings.resolution.width) + "-h" + (toString cfg.gamescope.settings.resolution.height) + ] + ++ lib.optional (cfg.gamescope.settings.refreshRate != null) [ + "-r" + (toString cfg.gamescope.settings.refreshRate) + ]; + }; - programs.anime-game-launcher = lib.mkIf agl.anime-game-launcher.enable { - enable = true; - }; + environment.systemPackages = + (lib.optionals cfg.lutris.enable ( + [cfg.lutris.package] ++ + (lib.optionals cfg.lutris.wine.enable [ + cfg.lutris.wine.package + pkgs.winetricks + ]) ++ + (lib.optionals cfg.lutris.compatibility.protonSupport [ + pkgs.protonup-ng + pkgs.protonup-qt + ]) ++ + cfg.lutris.compatibility.extraTools ++ + cfg.lutris.extraPackages + )) ++ + (lib.optionals cfg.minecraft.enable [pkgs.prismlauncher]) ++ + (lib.optionals cfg.ffxiv.enable [pkgs.xivlauncher pkgs.fflogs]) ++ + (lib.optionals (cfg.vintage-story.enable && vintage-story != null) [vintage-story.packages.${pkgs.system}.default]) ++ + (lib.optionals cfg.vkbasalt.enable [pkgs.vkbasalt pkgs.vkbasalt-cli]) ++ + (lib.optionals cfg.mangohud.enable [pkgs.mangohud]) ++ + (lib.optionals (cfg.vkbasalt.enable || cfg.mangohud.enable) [pkgs.goverlay pkgs.mesa-demos pkgs.vulkan-tools]); + } + (lib.optionalAttrs hasAagl { + programs.anime-game-launcher = lib.mkIf agl.anime-game-launcher.enable { + enable = true; + }; - programs.honkers-railway-launcher = lib.mkIf agl.honkers-railway-launcher.enable { - enable = true; - }; + programs.honkers-railway-launcher = lib.mkIf agl.honkers-railway-launcher.enable { + enable = true; + }; - programs.honkers-launcher = lib.mkIf agl.honkers-launcher.enable { - enable = true; - }; + programs.honkers-launcher = lib.mkIf agl.honkers-launcher.enable { + enable = true; + }; - programs.wavey-launcher = lib.mkIf agl.wavey-launcher.enable { - enable = true; - }; + programs.wavey-launcher = lib.mkIf agl.wavey-launcher.enable { + enable = true; + }; - programs.sleepy-launcher = lib.mkIf agl.sleepy-launcher.enable { - enable = true; - }; + programs.sleepy-launcher = lib.mkIf agl.sleepy-launcher.enable { + enable = true; + }; - environment.systemPackages = - (lib.optionals cfg.lutris.enable ( - [cfg.lutris.package] ++ - (lib.optionals cfg.lutris.wine.enable [ - cfg.lutris.wine.package - pkgs.winetricks - ]) ++ - (lib.optionals cfg.lutris.compatibility.protonSupport [ - pkgs.protonup-ng - pkgs.protonup-qt - ]) ++ - cfg.lutris.compatibility.extraTools ++ - cfg.lutris.extraPackages - )) ++ - (lib.optionals cfg.minecraft.enable [pkgs.prismlauncher]) ++ - (lib.optionals cfg.ffxiv.enable [pkgs.xivlauncher pkgs.fflogs]) ++ - (lib.optionals cfg.vintage-story.enable [vintage-story.packages.${pkgs.system}.default]) ++ - (lib.optionals cfg.vkbasalt.enable [pkgs.vkbasalt pkgs.vkbasalt-cli]) ++ - (lib.optionals cfg.mangohud.enable [pkgs.mangohud]) ++ - (lib.optionals (cfg.vkbasalt.enable || cfg.mangohud.enable) [pkgs.goverlay pkgs.mesa-demos pkgs.vulkan-tools]); - - nix.settings = let - inherit agl; - in (lib.mkIf - (agl.anime-game-launcher.enable || agl.honkers-railway-laucher.enable || agl.honkers-launcher.enable || agl.wavey-launcher.enable || agl.sleepy-launcher.enable) - { - substituters = [ "https://ezkea.cachix.org" ]; - trusted-public-keys = [ "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" ]; - } - ); - }; + nix.settings = lib.mkIf + (agl.anime-game-launcher.enable || agl.honkers-railway-launcher.enable || agl.honkers-launcher.enable || agl.wavey-launcher.enable || agl.sleepy-launcher.enable) + { + substituters = [ "https://ezkea.cachix.org" ]; + trusted-public-keys = [ "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" ]; + }; + }) + ]; } diff --git a/modules/machine/cloud/configuration.nix b/modules/machine/cloud/configuration.nix index 4e296b9..1ef65c0 100644 --- a/modules/machine/cloud/configuration.nix +++ b/modules/machine/cloud/configuration.nix @@ -20,6 +20,7 @@ in { (import ../../apps/flatpak.nix { inherit lib pkgs flatpakPackages userName aagl; }) + aagl.nixosModules.default ../../apps/gaming.nix ../../apps/appimage.nix ../../graphics diff --git a/modules/machine/thancred/configuration.nix b/modules/machine/thancred/configuration.nix index 7ca30bd..760976f 100644 --- a/modules/machine/thancred/configuration.nix +++ b/modules/machine/thancred/configuration.nix @@ -50,7 +50,7 @@ vintage-story.enable = true; }; - networking = { + network = { firewall = { enable = true; tcpPorts = {