-
-
Save dasPolygon/965bc17c8e25b588366c2ec0cd5e6eba to your computer and use it in GitHub Desktop.
config module for polygon's mailserver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: { | |
imports = [ | |
(builtins.fetchTarball { | |
# Pick a release version you are interested in and set its hash, e.g. | |
url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-23.05/nixos-mailserver-nixos-23.05.tar.gz"; | |
# To get the sha256 of the nixos-mailserver tarball, we can use the nix-prefetch-url command: | |
# release="nixos-23.05"; nix-prefetch-url "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/${release}/nixos-mailserver-${release}.tar.gz" --unpack | |
sha256 = "1ngil2shzkf61qxiqw11awyl81cr7ks2kv3r3k243zz7v2xakm5c"; | |
}) | |
]; | |
mailserver = { | |
enable = true; | |
fqdn = "mail.gaykitty.lol"; | |
domains = [ "gaykitty.lol" ]; | |
policydSPFExtraConfig = '' | |
skip_addresses = 0.0.0.0/24 | |
''; | |
# A list of all login accounts. To create the password hashes, use | |
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' | |
loginAccounts = { | |
"polygon@gaykitty.lol" = { | |
hashedPasswordFile = "/var/secrets/mail_polygon"; | |
aliases = [ "admin@gaykitty.lol" "webmaster@gaykitty.lol" "abuse@gaykitty.lol" ]; | |
}; | |
}; | |
# Use Let's Encrypt certificates. Note that this needs to set up a stripped | |
# down nginx and opens port 80. | |
certificateScheme = "acme-nginx"; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment