1
0
Fork 0

Remove obsolete module

This commit is contained in:
Malte Brandy 2020-09-17 02:49:16 +02:00
parent eb82d55f6c
commit bf699b96a0
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9

View file

@ -1,55 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
# TODO: Replace by upstreamed module
let
cfg = config.services.go-neb;
configFile = pkgs.writeText "config.yml" (builtins.toJSON cfg.config);
in {
options.services.go-neb = {
enable = mkEnableOption "Extensible matrix bot written in Go";
bindAddress = mkOption {
type = types.str;
description = "Port (and optionally address) to listen on.";
default = ":4050";
};
baseUrl = mkOption {
type = types.str;
description = "Public-facing endpoint that can receive webhooks.";
};
config = mkOption {
type = types.attrs;
description = ''
Your <filename>config.yaml</filename> as a Nix attribute set.
See <link xlink:href="https://github.com/matrix-org/go-neb/blob/master/config.sample.yaml">config.sample.yaml</link>
for possible options.
'';
};
};
config = mkIf cfg.enable {
systemd.services.go-neb = {
description = "Extensible matrix bot written in Go";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Environment = [
"BASE_URL=${cfg.baseUrl}"
"BIND_ADDRESS=${cfg.bindAddress}"
"CONFIG_FILE=${configFile}"
];
ExecStart = "${pkgs.go-neb}/bin/go-neb";
DynamicUser = true;
};
};
};
meta.maintainers = with maintainers; [ hexa maralorn ];
}