mirror of
https://github.com/Mic92/nixos-wiki-infra.git
synced 2024-11-22 08:14:06 +01:00
postfix: fix opendkim issue
This commit is contained in:
parent
1df8159500
commit
eded343e79
@ -1,4 +1,4 @@
|
|||||||
{ config, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
domain = "wiki.nixos.org";
|
domain = "wiki.nixos.org";
|
||||||
@ -12,9 +12,15 @@ in
|
|||||||
sops.secrets.opendkim-private-key.owner = config.services.postfix.user;
|
sops.secrets.opendkim-private-key.owner = config.services.postfix.user;
|
||||||
|
|
||||||
services.opendkim.keyPath = "/run/opendkim-keys";
|
services.opendkim.keyPath = "/run/opendkim-keys";
|
||||||
systemd.tmpfiles.rules = [
|
systemd.services.opendkim.serviceConfig = {
|
||||||
"f /run/opendkim-keys/${config.services.opendkim.selector}.private 0600 ${config.services.postfix.user} ${config.services.postfix.group} - - - ${config.sops.secrets.opendkim-private-key.path}"
|
ExecStartPre = [
|
||||||
|
(
|
||||||
|
"+${pkgs.writeShellScript "opendkim-keys" ''
|
||||||
|
install -o ${config.services.postfix.user} -g ${config.services.postfix.group} -D -m0700 ${config.sops.secrets.opendkim-private-key.path} /run/opendkim-keys/${config.services.opendkim.selector}.private
|
||||||
|
''}"
|
||||||
|
)
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# postfix configuration for sending emails only
|
# postfix configuration for sending emails only
|
||||||
services.postfix = {
|
services.postfix = {
|
||||||
|
Loading…
Reference in New Issue
Block a user