modified gaming apps
This commit is contained in:
@@ -2,15 +2,12 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
aagl,
|
vintage-story ? null,
|
||||||
vintage-story,
|
|
||||||
...
|
...
|
||||||
}: let
|
} @ args: let
|
||||||
cfg = config.gaming;
|
cfg = config.gaming;
|
||||||
|
aagl = args.aagl or null;
|
||||||
in {
|
in {
|
||||||
imports = [
|
|
||||||
aagl.nixosModules.default
|
|
||||||
];
|
|
||||||
|
|
||||||
options.gaming = {
|
options.gaming = {
|
||||||
steam = {
|
steam = {
|
||||||
@@ -153,84 +150,85 @@ in {
|
|||||||
|
|
||||||
config = let
|
config = let
|
||||||
agl = cfg.aagl;
|
agl = cfg.aagl;
|
||||||
in {
|
hasAagl = aagl != null;
|
||||||
programs.steam = lib.mkIf cfg.steam.enable {
|
in lib.mkMerge [
|
||||||
enable = true;
|
{
|
||||||
remotePlay.openFirewall = cfg.steam.firewall.remotePlay;
|
programs.steam = lib.mkIf cfg.steam.enable {
|
||||||
localNetworkGameTransfers.openFirewall = cfg.steam.firewall.localNetworkGameTransfers;
|
enable = true;
|
||||||
};
|
remotePlay.openFirewall = cfg.steam.firewall.remotePlay;
|
||||||
|
localNetworkGameTransfers.openFirewall = cfg.steam.firewall.localNetworkGameTransfers;
|
||||||
|
};
|
||||||
|
|
||||||
programs.gamemode = lib.mkIf cfg.gamemode.enable {
|
programs.gamemode = lib.mkIf cfg.gamemode.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = cfg.gamemode.config;
|
settings = cfg.gamemode.config;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.gamescope = lib.mkIf cfg.gamescope.enable {
|
programs.gamescope = lib.mkIf cfg.gamescope.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Apply custom resolution if specified
|
# Apply custom resolution if specified
|
||||||
args =
|
args =
|
||||||
lib.optional (cfg.gamescope.settings.resolution != null) [
|
lib.optional (cfg.gamescope.settings.resolution != null) [
|
||||||
"-w"
|
"-w"
|
||||||
(toString cfg.gamescope.settings.resolution.width)
|
(toString cfg.gamescope.settings.resolution.width)
|
||||||
"-h"
|
"-h"
|
||||||
(toString cfg.gamescope.settings.resolution.height)
|
(toString cfg.gamescope.settings.resolution.height)
|
||||||
]
|
]
|
||||||
++ lib.optional (cfg.gamescope.settings.refreshRate != null) [
|
++ lib.optional (cfg.gamescope.settings.refreshRate != null) [
|
||||||
"-r"
|
"-r"
|
||||||
(toString cfg.gamescope.settings.refreshRate)
|
(toString cfg.gamescope.settings.refreshRate)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.anime-game-launcher = lib.mkIf agl.anime-game-launcher.enable {
|
environment.systemPackages =
|
||||||
enable = true;
|
(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 {
|
programs.honkers-railway-launcher = lib.mkIf agl.honkers-railway-launcher.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.honkers-launcher = lib.mkIf agl.honkers-launcher.enable {
|
programs.honkers-launcher = lib.mkIf agl.honkers-launcher.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.wavey-launcher = lib.mkIf agl.wavey-launcher.enable {
|
programs.wavey-launcher = lib.mkIf agl.wavey-launcher.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.sleepy-launcher = lib.mkIf agl.sleepy-launcher.enable {
|
programs.sleepy-launcher = lib.mkIf agl.sleepy-launcher.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages =
|
nix.settings = lib.mkIf
|
||||||
(lib.optionals cfg.lutris.enable (
|
(agl.anime-game-launcher.enable || agl.honkers-railway-launcher.enable || agl.honkers-launcher.enable || agl.wavey-launcher.enable || agl.sleepy-launcher.enable)
|
||||||
[cfg.lutris.package] ++
|
{
|
||||||
(lib.optionals cfg.lutris.wine.enable [
|
substituters = [ "https://ezkea.cachix.org" ];
|
||||||
cfg.lutris.wine.package
|
trusted-public-keys = [ "ezkea.cachix.org-1:ioBmUbJTZIKsHmWWXPe1FSFbeVe+afhfgqgTSNd34eI=" ];
|
||||||
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=" ];
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ in {
|
|||||||
(import ../../apps/flatpak.nix {
|
(import ../../apps/flatpak.nix {
|
||||||
inherit lib pkgs flatpakPackages userName aagl;
|
inherit lib pkgs flatpakPackages userName aagl;
|
||||||
})
|
})
|
||||||
|
aagl.nixosModules.default
|
||||||
../../apps/gaming.nix
|
../../apps/gaming.nix
|
||||||
../../apps/appimage.nix
|
../../apps/appimage.nix
|
||||||
../../graphics
|
../../graphics
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
vintage-story.enable = true;
|
vintage-story.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
network = {
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
tcpPorts = {
|
tcpPorts = {
|
||||||
|
|||||||
Reference in New Issue
Block a user