This repository has no description
754 B
22 lines
1{ pkgs, ... }:
2{
3 # Mailbox password for hermes@lassul.us. Generated once and shared: neoprism
4 # (configs/mailserver.nix) consumes the hash, coaxmetal
5 # (machines/coaxmetal/hermes.nix) the plaintext, but only at generation time
6 # via the hermes-env generator, so the plaintext is never deployed. Both
7 # machines import this file so the shared generator definition stays identical.
8 clan.core.vars.generators.hermes-mail = {
9 share = true;
10 files."password".deploy = false;
11 files."password-hash" = { };
12 runtimeInputs = with pkgs; [
13 coreutils
14 mkpasswd
15 pwgen
16 ];
17 script = ''
18 pwgen -s 32 1 | tr -d '\n' > "$out/password"
19 mkpasswd -sm bcrypt < "$out/password" > "$out/password-hash"
20 '';
21 };
22}