Skip to content
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/soju: add admin socket option and sojuctl wrapper #258520

Merged
merged 4 commits into from Apr 8, 2024

Conversation

Benjamin-L
Copy link
Contributor

Description of changes

Add a adminSocket.enable option to the services.soju module, a wrapper for the sojuctl command pointed at the service config file, and some tests.

Using sojuctl to create the first admin user is necessary when setting up a soju server. Before these changes, doing this was pretty awkward. You have to do something like this:

services.soju.listen = [ "unix+admin:///run/soju/admin", ":6667" ];
systemd.services.soju.serviceConfig.RuntimeDirectory = "soju";

And then you need to find the config file path in the nix store by inspecting the systemd unit.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/1016/76

Copy link
Member

@azahi azahi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I didn't test it on my deployment because I use a custom module for soju, but your tests pass. I think we should wait for 23.11 to release and we can merge it after that.

nixos/modules/services/networking/soju.nix Show resolved Hide resolved
nixos/modules/services/networking/soju.nix Outdated Show resolved Hide resolved
nixos/doc/manual/release-notes/rl-2405.section.md Outdated Show resolved Hide resolved
nixos/modules/services/networking/soju.nix Outdated Show resolved Hide resolved
nixos/tests/soju.nix Outdated Show resolved Hide resolved
@Benjamin-L
Copy link
Contributor Author

CI failure is #301490, which is now fixed, but I don't think I have a way to retrigger job without pushing new commits.

The config is a in an arbitrary nix store path, and is necessary to
invoke sojuctl. Without the wrapper, you have to read the systemd unit
or use a similar trick to find it.
For now, just try creating a user with sojuctl. Actually connecting an
irc client is pretty annoying.
@SuperSandro2000 SuperSandro2000 merged commit b32f206 into NixOS:master Apr 8, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants