Simple conduit instance
This commit is contained in:
parent
21c8317fd2
commit
3b4f0563d6
41
modules/cloud/conduit/default.nix
Normal file
41
modules/cloud/conduit/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.cloud.conduit;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options.cloud.conduit = {
|
||||
enable = mkEnableOption "Enable the conduit server";
|
||||
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
default = "m.nkagami.me";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 6167;
|
||||
};
|
||||
|
||||
allow_registration = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
|
||||
config.services.matrix-conduit = mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
||||
settings.global = {
|
||||
inherit (cfg) port allow_registration;
|
||||
server_name = cfg.host;
|
||||
database_backend = "rocksdb";
|
||||
};
|
||||
};
|
||||
|
||||
config.cloud.traefik.hosts.conduit = mkIf cfg.enable {
|
||||
inherit (cfg) port host;
|
||||
};
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
../modules/cloud/traefik
|
||||
../modules/cloud/bitwarden
|
||||
../modules/cloud/mail
|
||||
../modules/cloud/conduit
|
||||
];
|
||||
|
||||
boot.cleanTmpDir = true;
|
||||
|
@ -55,6 +56,8 @@
|
|||
usersFile = config.sops.secrets.traefik-dashboard-users.path;
|
||||
};
|
||||
cloud.traefik.certsDumper.enable = true;
|
||||
cloud.conduit.enable = true;
|
||||
cloud.conduit.allow_registration = true;
|
||||
|
||||
# Mail
|
||||
sops.secrets.mail-users = { owner = "maddy"; };
|
||||
|
|
Loading…
Reference in a new issue