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

23 lines
488 B
Nix
Raw Normal View History

2024-03-16 21:31:36 -05:00
{ inputs, outputs, config, ... }: {
# 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
config.sops.secrets."system/mail/maddy/envFile".restartUnits = [ "maddy" ];
2024-03-17 04:43:37 -05:00
#
config.services.maddy = {
2024-03-16 21:31:36 -05:00
enable = true;
2024-03-17 04:43:37 -05:00
secrets = [ config.sops.secrets."system/mail/maddy/envFile".path ];
config = builtins.readFile ./maddy.conf;
2024-03-16 21:31:36 -05:00
};
}