From d980362a95d5f2ac3af8122d521e445271a8afb6 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Fri, 12 Mar 2021 10:34:59 -0800 Subject: [PATCH] nixos/factorio: add nonBlockingSaving option --- nixos/modules/services/games/factorio.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) 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. + ''; + }; }; };