1
1
Fork 0

conduwuit: migrate to container

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-10-16 20:39:08 -05:00
parent b0262c229f
commit eb1c5d0b56
Signed by: myned
GPG key ID: C7224454F7881A34
4 changed files with 45 additions and 1 deletions

View file

@ -0,0 +1,42 @@
{
config,
inputs,
lib,
...
}:
with lib; let
cfg = config.custom.containers.conduwuit;
in {
options.custom.containers.conduwuit.enable = mkOption {default = false;};
config = mkIf cfg.enable {
age.secrets = let
secret = filename: {
file = "${inputs.self}/secrets/${filename}";
};
in {
"${config.custom.profile}/conduwuit/conduwuit.toml" = secret "${config.custom.profile}/conduwuit/conduwuit.toml";
};
#?? arion-conduwuit pull
environment.shellAliases.arion-conduwuit = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.conduwuit.settings.out.dockerComposeYaml}";
virtualisation.arion.projects.conduwuit.settings.services = {
conduwuit.service = {
container_name = "conduwuit";
image = "girlbossceo/conduwuit:main";
ports = ["127.0.0.1:6167:6167"];
restart = "unless-stopped";
environment = {
CONDUWUIT_CONFIG = "/etc/conduwuit/conduwuit.toml";
};
volumes = [
"${config.custom.containers.directory}/conduwuit/db:/var/lib/conduwuit"
"${config.age.secrets."${config.custom.profile}/conduwuit/conduwuit.toml".path}:/etc/conduwuit/conduwuit.toml"
];
};
};
};
}

View file

@ -7,6 +7,7 @@
enable = true;
boot = true;
#// actualbudget.enable = true;
conduwuit.enable = true;
coturn.enable = true;
forgejo.enable = true;
foundryvtt.enable = true;
@ -20,7 +21,7 @@
services = {
caddy.enable = true;
matrix-conduit.enable = true;
#// matrix-conduit.enable = true;
#// modufur.enable = true;
#// tailscale.cert = true;

View file

@ -67,6 +67,7 @@ in {
### Server
"server/borgmatic/borgbase".publicKeys = server;
"server/caddy/Caddyfile".publicKeys = server;
"server/conduwuit/conduwuit.toml".publicKeys = server;
"server/coturn/coturn.conf".publicKeys = server;
"server/forgejo/.env".publicKeys = server;
"server/forgejo/db.env".publicKeys = server;

Binary file not shown.