outputs = { self, nix-lib, my-lib, files-watcher, openarc }:
let
cfg = name': { config, lib, pkgs, name, ... }: {
- imports = [ (my-lib.lib.withNarKey files-watcher "nixosModule") ];
+ imports = [
+ (my-lib.lib.withNarKey files-watcher "nixosModule")
+ (my-lib.lib.withNarKey openarc "nixosModule")
+ #FIXME:
+ #(my-lib.lib.withNarKey secrets "nixosModule")
+ ];
config = lib.mkIf (name == name') {
services.openarc = {
enable = true;
user = "opendkim";
- socket = "local:${config.myServices.mail.milters.sockets.openarc}";
+ socket = "/run/openarc/openarc.sock";
group = config.services.postfix.group;
configFile = pkgs.writeText "openarc.conf" ''
AuthservID mail.immae.eu
'';
};
systemd.services.openarc.serviceConfig.Slice = "mail.slice";
- systemd.services.openarc.postStart = lib.optionalString
- (lib.strings.hasPrefix "local:" config.services.openarc.socket) ''
- while [ ! -S ${lib.strings.removePrefix "local:" config.services.openarc.socket} ]; do
+ systemd.services.openarc.postStart = ''
+ while [ ! -S ${config.services.openarc.socket} ]; do
sleep 0.5
done
- chmod g+w ${lib.strings.removePrefix "local:" config.services.openarc.socket}
+ chmod g+w ${config.services.openarc.socket}
'';
services.filesWatcher.openarc = {
restart = true;