Merge pull request #31970 from The-M1k3y/master
nixos/factorio: add stateDir and requireUserVerification option
This commit is contained in:
commit
0e6ca9e85d
1 changed files with 18 additions and 2 deletions
|
@ -6,7 +6,7 @@ let
|
|||
cfg = config.services.factorio;
|
||||
factorio = pkgs.factorio-headless;
|
||||
name = "Factorio";
|
||||
stateDir = "/var/lib/factorio";
|
||||
stateDir = cfg.stateDir;
|
||||
mkSavePath = name: "${stateDir}/saves/${name}.zip";
|
||||
configFile = pkgs.writeText "factorio.conf" ''
|
||||
use-system-read-write-data-directories=true
|
||||
|
@ -25,7 +25,7 @@ let
|
|||
password = cfg.password;
|
||||
token = cfg.token;
|
||||
game_password = cfg.game-password;
|
||||
require_user_verification = true;
|
||||
require_user_verification = cfg.requireUserVerification;
|
||||
max_upload_in_kilobytes_per_second = 0;
|
||||
minimum_latency_in_ticks = 0;
|
||||
ignore_player_limit_for_returning_players = false;
|
||||
|
@ -80,6 +80,15 @@ in
|
|||
customizations.
|
||||
'';
|
||||
};
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/factorio";
|
||||
description = ''
|
||||
The server's data directory.
|
||||
|
||||
The configuration and map will be stored here.
|
||||
'';
|
||||
};
|
||||
mods = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
|
@ -148,6 +157,13 @@ in
|
|||
Game password.
|
||||
'';
|
||||
};
|
||||
requireUserVerification = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
When set to true, the server will only allow clients that have a valid factorio.com account.
|
||||
'';
|
||||
};
|
||||
autosave-interval = mkOption {
|
||||
type = types.nullOr types.int;
|
||||
default = null;
|
||||
|
|
Loading…
Reference in a new issue