{pkgs, lib, config, system, ...}: let inherit (lib) types; inherit (config.services) dovecot2; in { imports = [ friot/nginx.nix friot/shorewall.nix friot/postfix.nix friot/postgrey.nix friot/dovecot.nix friot/rmilter.nix friot/nsd.nix ]; options = { enable = lib.mkEnableOption "friot"; fqdn = lib.mkOption { type = types.str; example = "example.coop"; description = "Fully Qualified Domain Name of the machine."; }; networking.fqdn = lib.mkOption { type = types.str; example = "some.example.coop"; default = "${config.networking.hostName}.${config.networking.domain}"; description = "Fully Qualified Domain Name of the machine."; }; networking.zones = lib.mkOption { type = types.attrsOf (types.submodule ({zone, ...}: { options = { iface = lib.mkOption { type = types.str; description = "Interface name."; example = "eth0"; }; ipv4 = lib.mkOption { type = types.str; description = "Static IPv4 address of the machine."; example = "1.2.3.4"; }; ipv6 = lib.mkOption { type = types.str; description = "Static IPv6 address of the machine."; example = "fe80::1"; }; }; })); }; }; config = { fqdn = "commonade.coop"; networking = { domain = "commonade.coop"; }; #fqdn = "machine1.logic.coop"; services = { nixosManual = { enable = false; # NOTE: useless on this machine, and CPU intensive. }; disnix = { enable = false; }; openssh = { enable = true; }; openldap = { enable = true; }; dovecot2 = { #debug = true; }; journald = { extraConfig = '' SystemMaxUse=50M ''; }; x509 = { domains = builtins.attrNames dovecot2.domains; }; postfix.aliases = { "root@${config.networking.domain}" = [ "test@${config.networking.domain}" ]; "postmaster@${config.networking.domain}" = [ "test@${config.networking.domain}" ]; "abuse@${config.networking.domain}" = [ "test@${config.networking.domain}" ]; }; dovecot2.domains = { "${config.networking.domain}" = { accounts = { test = { password = builtins.extraBuiltins.pass "${config.networking.domain}/dovecot2/test"; # "${config.networking.domain}/dovecot2/test"; # "{SSHA512}uyjL1KYx4z7HpfNvnKzuVxpMLD2KVueGGBvOcj7AF1EZCTVhT++IIKUVOC4xpZtWdqVD0OVmZqgYr2qpn/3t3Aj4oU0="; aliases = ["test-alias@${config.networking.domain}"]; quota = "512M"; }; }; }; }; }; environment = { systemPackages = with pkgs; [ htop tree vim postgresql dnsutils tcpdump #mysql #procmail postgrey duplicity pypolicyd-spf unbound nsd dropbear cryptsetup openssl gitolite postgresql cgit openldap #mail sympa multitail ]; }; }; }