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 Nov 26, 2023
1 parent 1e978a6 commit 390af03
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 @@ -487,6 +487,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.
- `dockerTools.buildImage`, `dockerTools.buildLayeredImage` and `dockerTools.streamLayeredImage` now use `lib.makeOverridable` to allow `dockerTools`-based images to be customized more efficiently at the nix-level.
- `services.influxdb2` now supports doing an automatic initial setup and provisioning of users, organizations, buckets and authentication tokens, see [#249502](https://github.com/NixOS/nixpkgs/pull/249502) for more details.
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 390af03

Please sign in to comment.