This repository has been archived on 2024-07-08. You can view files and clone it, but cannot push or open issues or pull requests.
nix-config-tn/nixos/hosts/common/optional/maddy.nix

24 lines
487 B
Nix
Raw Normal View History

2024-03-17 16:04:32 -05:00
{
inputs,
outputs,
config,
...
}: {
2024-03-16 21:31:36 -05:00
# init secret
2024-03-17 04:43:37 -05:00
config.sops.secrets."system/mail/maddy/envFile" = {
sopsFile = ./maddy.sops.yaml;
owner = "maddy";
group = "maddy";
};
2024-03-16 21:31:36 -05:00
2024-03-17 05:47:39 -05:00
# Restart dnscrypt when secret changes
2024-03-17 16:04:32 -05:00
config.sops.secrets."system/mail/maddy/envFile".restartUnits = ["maddy"];
2024-03-17 05:47:39 -05:00
2024-03-17 16:04:32 -05:00
#
2024-03-17 04:43:37 -05:00
config.services.maddy = {
2024-03-16 21:31:36 -05:00
enable = true;
2024-03-17 16:04:32 -05:00
secrets = [config.sops.secrets."system/mail/maddy/envFile".path];
2024-03-17 04:43:37 -05:00
config = builtins.readFile ./maddy.conf;
2024-03-16 21:31:36 -05:00
};
}