diff options
author | Azat Bahawi <azat@bahawi.net> | 2022-08-20 00:23:51 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-08-20 00:23:51 +0300 |
commit | e7941cee341350e2b59b33abef99dfc1c36c2ea9 (patch) | |
tree | c6fb9caae84c39b714e0267d83b0d98d849ad481 /modules/nixfiles/games | |
parent | 2022-08-17 (diff) |
2022-08-20
Diffstat (limited to 'modules/nixfiles/games')
-rw-r--r-- | modules/nixfiles/games/default.nix | 2 | ||||
-rw-r--r-- | modules/nixfiles/games/gamemode.nix | 2 | ||||
-rw-r--r-- | modules/nixfiles/games/gog.nix | 3 | ||||
-rw-r--r-- | modules/nixfiles/games/lutris.nix | 3 | ||||
-rw-r--r-- | modules/nixfiles/games/mangohud.nix | 3 | ||||
-rw-r--r-- | modules/nixfiles/games/minecraft.nix | 29 | ||||
-rw-r--r-- | modules/nixfiles/games/steam-run.nix | 4 | ||||
-rw-r--r-- | modules/nixfiles/games/steam.nix | 2 |
8 files changed, 33 insertions, 15 deletions
diff --git a/modules/nixfiles/games/default.nix b/modules/nixfiles/games/default.nix index 532fc57..13345fc 100644 --- a/modules/nixfiles/games/default.nix +++ b/modules/nixfiles/games/default.nix @@ -17,7 +17,7 @@ in { ]; options.nixfiles.modules.games.enable32BitSupport = - mkEnableOption "Whether to enable support for games."; + mkEnableOption "support for games"; config = mkIf cfg.enable32BitSupport { services = { diff --git a/modules/nixfiles/games/gamemode.nix b/modules/nixfiles/games/gamemode.nix index a74b651..051d12e 100644 --- a/modules/nixfiles/games/gamemode.nix +++ b/modules/nixfiles/games/gamemode.nix @@ -7,7 +7,7 @@ with lib; let cfg = config.nixfiles.modules.games.gamemode; in { options.nixfiles.modules.games.gamemode.enable = - mkEnableOption "Whether to enable GameMode."; + mkEnableOption "Feral GameMode"; config = mkIf cfg.enable {programs.gamemode.enable = true;}; } diff --git a/modules/nixfiles/games/gog.nix b/modules/nixfiles/games/gog.nix index f1188a2..86039f1 100644 --- a/modules/nixfiles/games/gog.nix +++ b/modules/nixfiles/games/gog.nix @@ -8,8 +8,7 @@ with lib; let cfg = config.nixfiles.modules.games.gog; in { options.nixfiles.modules.games.gog.enable = - mkEnableOption - "Whether to enable GOG clients and the ability to run GOG games."; + mkEnableOption "stand-alone GOG clients and the ability to run GOG games"; config = mkIf cfg.enable { nixfiles.modules.games.steam-run.enable = true; diff --git a/modules/nixfiles/games/lutris.nix b/modules/nixfiles/games/lutris.nix index 6d9fdf5..c474a44 100644 --- a/modules/nixfiles/games/lutris.nix +++ b/modules/nixfiles/games/lutris.nix @@ -7,8 +7,7 @@ with lib; let cfg = config.nixfiles.modules.games.lutris; in { - options.nixfiles.modules.games.lutris.enable = - mkEnableOption "Whether to enable Lutris."; + options.nixfiles.modules.games.lutris.enable = mkEnableOption "Lutris"; config = mkIf cfg.enable { nixfiles.modules.games = { diff --git a/modules/nixfiles/games/mangohud.nix b/modules/nixfiles/games/mangohud.nix index 21d5fd1..0625652 100644 --- a/modules/nixfiles/games/mangohud.nix +++ b/modules/nixfiles/games/mangohud.nix @@ -6,8 +6,7 @@ with lib; let cfg = config.nixfiles.modules.games.mangohud; in { - options.nixfiles.modules.games.mangohud.enable = - mkEnableOption "Whether to enable MangoHud."; + options.nixfiles.modules.games.mangohud.enable = mkEnableOption "MangoHud"; config = mkIf cfg.enable {hm.programs.mangohud.enable = true;}; } diff --git a/modules/nixfiles/games/minecraft.nix b/modules/nixfiles/games/minecraft.nix index 70a98ce..bba7e6b 100644 --- a/modules/nixfiles/games/minecraft.nix +++ b/modules/nixfiles/games/minecraft.nix @@ -2,14 +2,35 @@ config, lib, pkgs, + pkgsPR, ... }: with lib; let cfg = config.nixfiles.modules.games.minecraft; in { - options.nixfiles.modules.games.minecraft.enable = - mkEnableOption "Whether to enable Minecraft."; + options.nixfiles.modules.games.minecraft = { + client.enable = mkEnableOption "Minecraft client"; + server.enable = mkEnableOption "Minecraft client"; + }; - config = - mkIf cfg.enable {hm.home.packages = with pkgs; [jre nixfiles.UltimMC];}; + config = mkMerge [ + (mkIf cfg.client.enable { + hm.home.packages = with pkgs; [ + UltimMC + jre + ]; + }) + (mkIf cfg.server.enable { + services.minecraft-server = { + enable = true; + eula = true; + + package = (pkgsPR "187458" "sha256-kOYkuXvcmqt8Lsh0yMr8reurzU1qTrzh0Z/Tjan0IF0=").papermc; + + jvmOpts = mkDefault "-Xmx4096M -Xms4096M "; + + openFirewall = true; + }; + }) + ]; } diff --git a/modules/nixfiles/games/steam-run.nix b/modules/nixfiles/games/steam-run.nix index 983cc77..08c6063 100644 --- a/modules/nixfiles/games/steam-run.nix +++ b/modules/nixfiles/games/steam-run.nix @@ -8,10 +8,10 @@ with lib; let cfg = config.nixfiles.modules.games.steam-run; in { options.nixfiles.modules.games.steam-run = { - enable = mkEnableOption "Whether to enable native Steam runtime."; + enable = mkEnableOption "native Steam runtime"; quirks = { - mountandblade = mkEnableOption ''Fix "Mount & Blade: Warband" issues.''; + mountandblade = mkEnableOption ''fixes for "Mount & Blade: Warband" issues''; }; }; diff --git a/modules/nixfiles/games/steam.nix b/modules/nixfiles/games/steam.nix index c1d471e..c1d7eb8 100644 --- a/modules/nixfiles/games/steam.nix +++ b/modules/nixfiles/games/steam.nix @@ -8,7 +8,7 @@ with lib; let cfg = config.nixfiles.modules.games.steam; in { options.nixfiles.modules.games.steam.enable = - mkEnableOption "Whether to enable Steam runtime."; + mkEnableOption "Steam runtime"; config = mkIf cfg.enable { nixfiles.modules.games = { |