diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-10-19 14:40:23 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2022-01-07 10:22:32 +0000 |
commit | cc62bcb55359ba8c5e0fe3a48e778444c89060d8 (patch) | |
tree | ca0e21d44eaf8837b687395e614445f7761d7bbd /nixpkgs/nixos/modules/services/games | |
parent | d6625e8d25efd829c3cfa227d025ca4e606ae4b7 (diff) | |
parent | a323570a264da96a0b0bcc1c9aa017794acdc752 (diff) | |
download | nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.gz nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.bz2 nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.lz nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.xz nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.tar.zst nixlib-cc62bcb55359ba8c5e0fe3a48e778444c89060d8.zip |
Merge commit 'a323570a264da96a0b0bcc1c9aa017794acdc752'
Diffstat (limited to 'nixpkgs/nixos/modules/services/games')
4 files changed, 55 insertions, 51 deletions
diff --git a/nixpkgs/nixos/modules/services/games/crossfire-server.nix b/nixpkgs/nixos/modules/services/games/crossfire-server.nix index 974aea0cd671..a33025e0c3e1 100644 --- a/nixpkgs/nixos/modules/services/games/crossfire-server.nix +++ b/nixpkgs/nixos/modules/services/games/crossfire-server.nix @@ -18,7 +18,7 @@ in { package = mkOption { type = types.package; default = pkgs.crossfire-server; - defaultText = "pkgs.crossfire-server"; + defaultText = literalExpression "pkgs.crossfire-server"; description = '' The package to use for the Crossfire server (and map/arch data, if you don't change dataDir). @@ -28,7 +28,7 @@ in { dataDir = mkOption { type = types.str; default = "${cfg.package}/share/crossfire"; - defaultText = "\${config.services.crossfire.package}/share/crossfire"; + defaultText = literalExpression ''"''${config.services.crossfire.package}/share/crossfire"''; description = '' Where to load readonly data from -- maps, archetypes, treasure tables, and the like. If you plan to edit the data on the live server (rather @@ -72,30 +72,32 @@ in { overwrite the example files that come with the server, rather than being appended to them as the other configuration files are. ''; - example = literalExample '' - dm_file = ''' - admin:secret_password:localhost - jane:xyzzy:* - '''; - ban_file = ''' - # Bob is a jerk - bob@* - # So is everyone on 192.168.86.255/24 - *@192.168.86. - '''; - metaserver2 = ''' - metaserver2_notification on - localhostname crossfire.example.net - '''; - motd = "Welcome to CrossFire!"; - news = "No news yet."; - rules = "Don't be a jerk."; - settings = ''' - # be nicer to newbies and harsher to experienced players - balanced_stat_loss true - # don't let players pick up and use admin-created items - real_wiz false - '''; + example = literalExpression '' + { + dm_file = ''' + admin:secret_password:localhost + jane:xyzzy:* + '''; + ban_file = ''' + # Bob is a jerk + bob@* + # So is everyone on 192.168.86.255/24 + *@192.168.86. + '''; + metaserver2 = ''' + metaserver2_notification on + localhostname crossfire.example.net + '''; + motd = "Welcome to CrossFire!"; + news = "No news yet."; + rules = "Don't be a jerk."; + settings = ''' + # be nicer to newbies and harsher to experienced players + balanced_stat_loss true + # don't let players pick up and use admin-created items + real_wiz false + '''; + } ''; default = {}; }; diff --git a/nixpkgs/nixos/modules/services/games/deliantra-server.nix b/nixpkgs/nixos/modules/services/games/deliantra-server.nix index 36bf60417626..b7011f4c3542 100644 --- a/nixpkgs/nixos/modules/services/games/deliantra-server.nix +++ b/nixpkgs/nixos/modules/services/games/deliantra-server.nix @@ -18,7 +18,7 @@ in { package = mkOption { type = types.package; default = pkgs.deliantra-server; - defaultText = "pkgs.deliantra-server"; + defaultText = literalExpression "pkgs.deliantra-server"; description = '' The package to use for the Deliantra server (and map/arch data, if you don't change dataDir). @@ -28,7 +28,7 @@ in { dataDir = mkOption { type = types.str; default = "${pkgs.deliantra-data}"; - defaultText = "\${pkgs.deliantra-data}"; + defaultText = literalExpression ''"''${pkgs.deliantra-data}"''; description = '' Where to store readonly data (maps, archetypes, sprites, etc). Note that if you plan to use the live map editor (rather than editing @@ -69,22 +69,24 @@ in { The example here is not comprehensive. See the files in /etc/deliantra-server after enabling this module for full documentation. ''; - example = literalExample '' - dm_file = ''' - admin:secret_password:localhost - jane:xyzzy:* - '''; - motd = "Welcome to Deliantra!"; - settings = ''' - # Settings for game mechanics. - stat_loss_on_death true - armor_max_enchant 7 - '''; - config = ''' - # Settings for the server daemon. - hiscore_url https://deliantra.example.net/scores/ - max_map_reset 86400 - '''; + example = literalExpression '' + { + dm_file = ''' + admin:secret_password:localhost + jane:xyzzy:* + '''; + motd = "Welcome to Deliantra!"; + settings = ''' + # Settings for game mechanics. + stat_loss_on_death true + armor_max_enchant 7 + '''; + config = ''' + # Settings for the server daemon. + hiscore_url https://deliantra.example.net/scores/ + max_map_reset 86400 + '''; + } ''; default = { motd = ""; diff --git a/nixpkgs/nixos/modules/services/games/factorio.nix b/nixpkgs/nixos/modules/services/games/factorio.nix index 3cb142757927..0e8860a02819 100644 --- a/nixpkgs/nixos/modules/services/games/factorio.nix +++ b/nixpkgs/nixos/modules/services/games/factorio.nix @@ -86,7 +86,7 @@ in configFile = mkOption { type = types.path; default = configFile; - defaultText = "configFile"; + defaultText = literalExpression "configFile"; description = '' The server's configuration file. @@ -162,8 +162,8 @@ in package = mkOption { type = types.package; default = pkgs.factorio-headless; - defaultText = "pkgs.factorio-headless"; - example = "pkgs.factorio-headless-experimental"; + defaultText = literalExpression "pkgs.factorio-headless"; + example = literalExpression "pkgs.factorio-headless-experimental"; description = '' Factorio version to use. This defaults to the stable channel. ''; diff --git a/nixpkgs/nixos/modules/services/games/minecraft-server.nix b/nixpkgs/nixos/modules/services/games/minecraft-server.nix index 458e57fef846..ddbe9508a4dc 100644 --- a/nixpkgs/nixos/modules/services/games/minecraft-server.nix +++ b/nixpkgs/nixos/modules/services/games/minecraft-server.nix @@ -109,7 +109,7 @@ in { You can use <link xlink:href="https://mcuuid.net/"/> to get a Minecraft UUID for a username. ''; - example = literalExample '' + example = literalExpression '' { username1 = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; username2 = "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"; @@ -120,7 +120,7 @@ in { serverProperties = mkOption { type = with types; attrsOf (oneOf [ bool int str ]); default = {}; - example = literalExample '' + example = literalExpression '' { server-port = 43000; difficulty = 3; @@ -144,8 +144,8 @@ in { package = mkOption { type = types.package; default = pkgs.minecraft-server; - defaultText = "pkgs.minecraft-server"; - example = literalExample "pkgs.minecraft-server_1_12_2"; + defaultText = literalExpression "pkgs.minecraft-server"; + example = literalExpression "pkgs.minecraft-server_1_12_2"; description = "Version of minecraft-server to run."; }; |