-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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/factorio: add extraSettings and package options #77478
Conversation
Currently there is no way to set game settings, such as administrators. extraSettings allows users to override default game settings without adding many more settings. The package option allows users to use the experimental version, or override to a specific version with their own modified package.
@@ -37,7 +36,7 @@ let | |||
only_admins_can_pause_the_game = true; | |||
autosave_only_on_server = true; | |||
admins = []; | |||
}; | |||
} // cfg.extraSettings; |
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.
instead of adding an option to override all of the other configuration, why don't you extend the current options to include admins and others.
Also, you should probably be using something like mkMerge to ensure that the keys are gracefully composed.
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.
Extending the current options seems like a good idea. I didn't want to bloat the options too much, but that would definately help with documentation. I'll update this PR and add an option for admins.
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.
I wanted to create a factorio server with services.factorio
and everything worked straight away. However, I can't make myself an admin, not even when I delete the state directory and restart the service with extraConfig = { admins = [ "username" ] }
in place. Is extraConfig
currently broken or am I doing something wrong? As far as I see it's generally not possible to connect a TTY to the server and run /promote <username>
.
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.
I had this issue as well, I'll look into it. But probably not til after the 20.09 release
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.
Great, thank you!
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.
that being said, do you mind making an issue on github? better way to track than a comment, and please cc me
Motivation for this change
Currently there is no way to set game settings, such as administrators, other than those specified. There is also no way to use the experimental version.
Things done
The package option allows users to use the experimental version, or
override to a specific version with their own modified package.
extraSettings allows users to override default game settings without
adding many more settings.
I also tested this change and successfully ran a factorio server based on this.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)