mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-06-08 18:09:06 +02:00
Added mailserver and hedgedoc service
This commit is contained in:
parent
5e0aeec052
commit
8b47b55ecf
7 changed files with 201 additions and 4 deletions
39
modules/mailserver/default.nix
Normal file
39
modules/mailserver/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ pkgs, config, lib, inputs, ... }:
|
||||
let
|
||||
cfg = config.luj.mailserver;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options.luj.mailserver = {
|
||||
enable = mkEnableOption "Enable mailserver";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
mailserver = {
|
||||
enable = true;
|
||||
fqdn = "mail.julienmalka.me";
|
||||
domains = [ "malka.sh" "ens.school" ];
|
||||
|
||||
# A list of all login accounts. To create the password hashes, use
|
||||
# nix run nixpkgs.apacheHttpd -c htpasswd -nbB "" "super secret password" | cut -d: -f2
|
||||
loginAccounts = {
|
||||
"julien@malka.sh" = {
|
||||
hashedPasswordFile = "/run/secrets/malkash-pw";
|
||||
aliases = [ "postmaster@malka.sh" ];
|
||||
};
|
||||
"julien.malka@ens.school" = {
|
||||
hashedPasswordFile = "/run/secrets/ensmailmalka-pw";
|
||||
};
|
||||
"camille.mondon@ens.school" = {
|
||||
hashedPassword = "/run/secrets/ensmailmondon-pw";
|
||||
};
|
||||
};
|
||||
certificateScheme = 3;
|
||||
};
|
||||
|
||||
sops.secrets.malkash-pw = { };
|
||||
sops.secrets.ensmailmalka-pw = { };
|
||||
sops.secrets.ensmailmondon-pw = { };
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue