continuwuity: add conduwuit command

This commit is contained in:
Turtlepaw 2026-01-28 03:30:24 +00:00
commit 9c2521f772
No known key found for this signature in database
GPG key ID: 0AC96389B1A67B2B

View file

@ -11,6 +11,10 @@ let
format = pkgs.formats.toml { };
configFile = format.generate "continuwuity.toml" cfg.settings;
conduwuitWrapper = pkgs.writeShellScriptBin "conduwuit" ''
exec ${lib.getExe cfg.package} --config ${configFile} "$@"
'';
in
{
meta.maintainers = with lib.maintainers; [
@ -169,9 +173,22 @@ in
for details on supported values.
'';
};
admin = {
enable = lib.mkOption {
type = lib.types.bool;
default = cfg.enable;
defaultText = lib.literalExpression "config.services.matrix-continuwuity.enable";
description = "Add conduwuit command to PATH for administration";
};
};
};
config = lib.mkIf cfg.enable {
environment = lib.mkIf cfg.admin.enable {
systemPackages = [ conduwuitWrapper ];
};
assertions = [
{
assertion = !(cfg.settings ? global.unix_socket_path) || !(cfg.settings ? global.address);