about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2022-12-11 21:17:05 +0000
committerGitHub <noreply@github.com>2022-12-11 21:17:05 +0000
commit36c0938cc5525dd6e2a84bc9b7751f8908b7472e (patch)
tree8d9e21b37c72ce2e353a6c1c5e2e39d0a950428f /nixos
parent823d4b7e8cae198ed3cbbb52a00fe9e7eaef27e6 (diff)
parent5faeb3ba2db1f599ab55d48dddf4f1ff54eaa47f (diff)
downloadnixlib-36c0938cc5525dd6e2a84bc9b7751f8908b7472e.tar
nixlib-36c0938cc5525dd6e2a84bc9b7751f8908b7472e.tar.gz
nixlib-36c0938cc5525dd6e2a84bc9b7751f8908b7472e.tar.bz2
nixlib-36c0938cc5525dd6e2a84bc9b7751f8908b7472e.tar.lz
nixlib-36c0938cc5525dd6e2a84bc9b7751f8908b7472e.tar.xz
nixlib-36c0938cc5525dd6e2a84bc9b7751f8908b7472e.tar.zst
nixlib-36c0938cc5525dd6e2a84bc9b7751f8908b7472e.zip
Merge pull request #198835 from YellowOnion/factorio-patch
factorio: better mod support
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/games/factorio.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/services/games/factorio.nix b/nixos/modules/services/games/factorio.nix
index 844fd2bce517..9b15cac149d5 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,15 @@ 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, in the [mod
+          settings file
+          format](https://wiki.factorio.com/Mod_settings_file_format).
+        '';
+      };
       game-name = mkOption {
         type = types.nullOr types.str;
         default = "Factorio Game";