diff --git a/nixos/modules/services/games/factorio.nix b/nixos/modules/services/games/factorio.nix index 0dcd5b1cebdb..1b2f5bd840b5 100644 --- a/nixos/modules/services/games/factorio.nix +++ b/nixos/modules/services/games/factorio.nix @@ -140,7 +140,9 @@ in type = types.nullOr types.path; default = null; description = lib.mdDoc '' - Mods settings can be changed by specifying a dat file. + 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 { diff --git a/pkgs/games/factorio/utils.nix b/pkgs/games/factorio/utils.nix index 86b0b2f85104..d2b52ae48366 100644 --- a/pkgs/games/factorio/utils.nix +++ b/pkgs/games/factorio/utils.nix @@ -18,9 +18,9 @@ with lib; # NB: there will only ever be a single zip file in each mod derivation's output dir ln -s $modDrv/*.zip $out done - '' + (if modsDatFile != null then '' + '' + (lib.optionalString (modsDatFile != null) '' cp ${modsDatFile} $out/mod-settings.dat - '' else ""); + ''); }; modDrv = { allRecommendedMods, allOptionalMods }: