conduwuit: migrate to container
Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
parent
b0262c229f
commit
eb1c5d0b56
4 changed files with 45 additions and 1 deletions
42
options/custom/containers/conduwuit.nix
Normal file
42
options/custom/containers/conduwuit.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
BIN
secrets/server/conduwuit/conduwuit.toml
Normal file
BIN
secrets/server/conduwuit/conduwuit.toml
Normal file
Binary file not shown.
Loading…
Reference in a new issue