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 Oct 2, 2023
1 parent 07eb2bf commit 50ced2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2311.section.md
Expand Up @@ -376,6 +376,8 @@ The module update takes care of the new config syntax and the data itself (user

- `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 includes a wrapper for the `sojuctl` command, pointed at the service config file.


## Nixpkgs internals {#sec-release-23.11-nixpkgs-internals}

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 ${pkgs.soju}/bin/sojuctl --config ${configFile} "$@"
'';
in
{
###### interface
Expand Down Expand Up @@ -118,6 +122,8 @@ in
}
];

environment.systemPackages = [ sojuctl ];

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

0 comments on commit 50ced2d

Please sign in to comment.