mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
55 lines
1,021 B
Nix
Executable file
55 lines
1,021 B
Nix
Executable file
{
|
|
pkgs,
|
|
flake,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
inherit (flake.config.services.instances) roundcube web;
|
|
|
|
service = roundcube;
|
|
host = service.domains.address0;
|
|
in
|
|
{
|
|
services = {
|
|
roundcube = {
|
|
enable = true;
|
|
configureNginx = false;
|
|
dicts = builtins.attrValues {
|
|
inherit (pkgs.aspellDicts)
|
|
en
|
|
;
|
|
};
|
|
plugins = [
|
|
];
|
|
# hostName = host;
|
|
database = {
|
|
host = web.localhost.address1;
|
|
dbname = service.name;
|
|
username = "";
|
|
passwordFile = config.sops.secrets."${service.name}-pass".path;
|
|
};
|
|
};
|
|
};
|
|
sops =
|
|
let
|
|
sopsPath = secret: {
|
|
path = "${service.sops.path0}/${service.name}-${secret}";
|
|
owner = "root";
|
|
mode = "600";
|
|
};
|
|
in
|
|
{
|
|
secrets = builtins.listToAttrs (
|
|
map
|
|
(secret: {
|
|
name = "${service.name}-${secret}";
|
|
value = sopsPath secret;
|
|
})
|
|
[
|
|
"pass"
|
|
]
|
|
);
|
|
};
|
|
|
|
}
|