Compare commits

...

1 commit
main ... dev

Author SHA1 Message Date
Dmitry Voronin 540aae3e58 WIP Chat: Add Mattermost container. 2024-10-21 14:32:24 +03:00

57
container/Chat.nix Normal file
View file

@ -0,0 +1,57 @@
{
container,
lib,
config,
...
}:
let
cfg = config.container.module.chat;
in
{
options = {
container.module.chat = {
enable = lib.mkEnableOption "chat container.";
address = lib.mkOption {
default = "10.1.0.20";
type = lib.types.str;
};
port = lib.mkOption {
default = 80;
type = lib.types.int;
};
domain = lib.mkOption {
default = "chat.${config.container.domain}";
type = lib.types.str;
};
storage = lib.mkOption {
default = "${config.container.storage}/chat";
type = lib.types.str;
};
};
};
# WIP: https://search.nixos.org/options?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=mattermost
config = lib.mkIf cfg.enable {
systemd.tmpfiles.rules = container.mkContainerDir cfg [ "data" ];
containers.chat = container.mkContainer cfg {
bindMounts = {
# "/var/lib/changedetection-io" = {
# hostPath = "${cfg.storage}/data";
# isReadOnly = false;
# };
};
config =
{ ... }:
container.mkContainerConfig cfg {
# services.changedetection-io = {
# enable = true;
# baseURL = cfg.domain;
# behindProxy = true;
# listenAddress = cfg.address;
# };
};
};
};
}