Start all secrets on boot

This commit is contained in:
niten 2023-10-01 22:47:24 -07:00
parent 49009f67e7
commit 37bd62f950
3 changed files with 8 additions and 8 deletions

View File

@ -15,8 +15,8 @@ let
make-user-aliases = entries:
concatStringsSep "\n" (mapAttrsToList (user: aliases:
concatStringsSep "\n"
(map (alias: "${alias} ${user}@${cfg.domain}") aliases)) entries);
concatStringsSep "\n" (map (alias: "${alias} ${user}") aliases))
entries);
make-alias-users = domains: entries:
concatStringsSep "\n" (flatten (mapAttrsToList (alias: users:

View File

@ -1,8 +1,7 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.fudo.mail-server;
let cfg = config.fudo.mail-server;
in {
config = mkIf cfg.enable {
@ -73,7 +72,7 @@ in {
mode = "0666";
}
];
includes = [];
includes = [ ];
};
};
@ -87,6 +86,7 @@ in {
requires = [ "rspamd.service" ];
};
users.extraUsers.${config.services.postfix.user}.extraGroups = [ config.services.rspamd.group ];
users.extraUsers.${config.services.postfix.user}.extraGroups =
[ config.services.rspamd.group ];
};
}

View File

@ -39,8 +39,8 @@ let
{ source-file, target-file, user, group, permissions, ... }: {
description =
"decrypt secret ${secret-name} at ${target-host}:${target-file}.";
wantedBy = [ cfg.secret-target ];
before = [ cfg.secret-target ];
wantedBy = [ cfg.secret-target "multi-user.target" ];
before = [ cfg.secret-target "multi-user.target" ];
serviceConfig = {
Type = "simple";
RemainAfterExit = true;