summary refs log tree commit diff
path: root/nixos/modules/services/games
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2021-03-12 10:34:59 -0800
committerJonathan Ringer <jonringer117@gmail.com>2021-03-12 10:34:59 -0800
commitd980362a95d5f2ac3af8122d521e445271a8afb6 (patch)
tree2e0faa6e2a558246ac19ecda11fa9b9269b13d37 /nixos/modules/services/games
parentfcdb8bfaf11843d6ea75bc7010d037f85630d096 (diff)
downloadnixpkgs-d980362a95d5f2ac3af8122d521e445271a8afb6.tar
nixpkgs-d980362a95d5f2ac3af8122d521e445271a8afb6.tar.gz
nixpkgs-d980362a95d5f2ac3af8122d521e445271a8afb6.tar.bz2
nixpkgs-d980362a95d5f2ac3af8122d521e445271a8afb6.tar.lz
nixpkgs-d980362a95d5f2ac3af8122d521e445271a8afb6.tar.xz
nixpkgs-d980362a95d5f2ac3af8122d521e445271a8afb6.tar.zst
nixpkgs-d980362a95d5f2ac3af8122d521e445271a8afb6.zip
nixos/factorio: add nonBlockingSaving option
Diffstat (limited to 'nixos/modules/services/games')
-rw-r--r--nixos/modules/services/games/factorio.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/modules/services/games/factorio.nix b/nixos/modules/services/games/factorio.nix
index 73099ae3363..a1aa5739d06 100644
--- a/nixos/modules/services/games/factorio.nix
+++ b/nixos/modules/services/games/factorio.nix
@@ -36,6 +36,7 @@ let
     only_admins_can_pause_the_game = true;
     autosave_only_on_server = true;
     admins = [];
+    non_blocking_saving = cfg.nonBlockingSaving;
   } // cfg.extraSettings;
   serverSettingsFile = pkgs.writeText "server-settings.json" (builtins.toJSON (filterAttrsRecursive (n: v: v != null) serverSettings));
   modDir = pkgs.factorio-utils.mkModDirDrv cfg.mods;
@@ -193,6 +194,15 @@ in
           Autosave interval in minutes.
         '';
       };
+      nonBlockingSaving = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Highly experimental feature, enable only at your own risk of losing your saves.
+          On UNIX systems, server will fork itself to create an autosave.
+          Autosaving on connected Windows clients will be disabled regardless of autosave_only_on_server option.
+        '';
+      };
     };
   };