mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
continuwuity: add conduwuit command
This commit is contained in:
parent
4376336971
commit
9c2521f772
1 changed files with 17 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue