{pkgs, lib, config, system, ...}: let inherit (lib) types; inherit (config.services) dovecot2; in { imports = [ machine1/nginx.nix machine1/shorewall.nix machine1/postfix.nix machine1/postgrey.nix machine1/dovecot.nix machine1/rmilter.nix machine1/nsd.nix ]; options = { enable = lib.mkEnableOption "machine1"; 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 = "cologic.coop"; networking = { domain = "cologic.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 ]; }; }; }