-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/teeworlds: migrate to rfc42 settings #185492
Conversation
f78961e
to
64eb620
Compare
description = lib.mdDoc '' | ||
See [Teeworlds Documentation](https://www.teeworlds.com/?page=docs&wiki=server_settings) for all configuration options. | ||
''; | ||
type = lib.types.submodule { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a freeformType
. Probably something like attrsOf (nullOr (oneOf [ str int bool ]))
. bool
should be mapped to 0/1, null
shouldn't be emitted.
}; | ||
|
||
sv_register = mkOption { | ||
type = types.int; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we change the type, we should use mkChangedOptionModule
; however here we should keep this as bool
and map to 0/1 when writing the config.
|
||
extraOptions = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep this for backwards compatibility and append those lines to the generated config. Maybe add a warning to switch to settings
if extraOptions
is defined.
example = [ "sv_map dm1" "sv_gametype dm" ]; | ||
settings = mkOption { | ||
default = {}; | ||
example = literalExpression '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
literalExpression
is not needed here.
@@ -1,96 +1,116 @@ | |||
{ config, lib, pkgs, ... }: | |||
{ config, lib, options, pkgs, ... }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused
64eb620
to
f831afe
Compare
Description of changes
related: #144575
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes