From c6e6d44fe5f6c4ee4350ed330eb7996b57232ed8 Mon Sep 17 00:00:00 2001 From: Daniel Hill Date: Tue, 1 Nov 2022 06:57:07 +1300 Subject: factorio: let us change mod settings --- nixos/modules/services/games/factorio.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'nixos/modules/services/games') diff --git a/nixos/modules/services/games/factorio.nix b/nixos/modules/services/games/factorio.nix index f54c265c34b04..0dcd5b1cebdb2 100644 --- a/nixos/modules/services/games/factorio.nix +++ b/nixos/modules/services/games/factorio.nix @@ -39,7 +39,7 @@ let } // cfg.extraSettings; serverSettingsFile = pkgs.writeText "server-settings.json" (builtins.toJSON (filterAttrsRecursive (n: v: v != null) serverSettings)); serverAdminsFile = pkgs.writeText "server-adminlist.json" (builtins.toJSON cfg.admins); - modDir = pkgs.factorio-utils.mkModDirDrv cfg.mods; + modDir = pkgs.factorio-utils.mkModDirDrv cfg.mods cfg.mods-dat; in { options = { @@ -136,6 +136,13 @@ in derivations via nixos-channel. Until then, this is for experts only. ''; }; + mods-dat = mkOption { + type = types.nullOr types.path; + default = null; + description = lib.mdDoc '' + Mods settings can be changed by specifying a dat file. + ''; + }; game-name = mkOption { type = types.nullOr types.str; default = "Factorio Game"; -- cgit 1.4.1