Skip to content

Commit

Permalink
nixos/soju: add sojuctl wrapper with config path
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Benjamin-L committed Apr 7, 2024
1 parent 5207bb7 commit d772ac1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/doc/manual/release-notes/rl-2405.section.md
Expand Up @@ -485,7 +485,7 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m

- The `krb5` module has been rewritten and moved to `security.krb5`, moving all options but `security.krb5.enable` and `security.krb5.package` into `security.krb5.settings`.

- `services.soju` now has the option `adminSocket.enable`. This option defaults to `true`, and creates a unix admin socket at `/run/soju/admin`.
- `services.soju` now has a wrapper for the `sojuctl` command, pointed at the service config file. It also has the new option `adminSocket.enable`, which creates a unix admin socket at `/run/soju/admin`.

- Gitea 1.21 upgrade has several breaking changes, including:
- Custom themes and other assets that were previously stored in `custom/public/*` now belong in `custom/public/assets/*`
Expand Down
6 changes: 6 additions & 0 deletions nixos/modules/services/networking/soju.nix
Expand Up @@ -25,6 +25,10 @@ let
${cfg.extraConfig}
'';

sojuctl = pkgs.writeShellScriptBin "sojuctl" ''
exec ${cfg.package}/bin/sojuctl --config ${configFile} "$@"
'';
in
{
###### interface
Expand Down Expand Up @@ -120,6 +124,8 @@ in
}
];

environment.systemPackages = [ sojuctl ];

systemd.services.soju = {
description = "soju IRC bouncer";
wantedBy = [ "multi-user.target" ];
Expand Down

0 comments on commit d772ac1

Please sign in to comment.