adyya-flake/services/couchdb/couchdb.mod.nix

29 lines
940 B
Nix

{
glucose.modules = [
(
{ config, ... }:
{
# services.couchdb = {
# enable = true;
# adminUser = "Admin";
# adminPass = config.sops.secrets.couchdb_admin_pass
# }; # wanted to do this with the couchdb service. but it has no proper way to handle secrets. so i'm just going to use a container since i don't feel like writing my own couchdb package at the moment
virtualisation.oci-containers = {
containers.couchdb = {
image = "couchdb:3.4.2";
ports = [
"5894:5984"
];
environmentFiles = [
"${config.sops.templates."couchdb.env.secrets.yaml".path}"
];
volumes = [
"/var/services/couchdb/data/:/opt/couchdb/data/"
"/var/services/couchdb/etc:/opt/couchdb/etc/local.d/"
];
};
};
}
)
];
}