nixos/hosts/mail/configuration.nix

48 lines
1.1 KiB
Nix

{ config, pkgs, ... }:
{
imports = [
./utils/bento.nix
./utils/modules/sops.nix
./utils/modules/lego/lego.nix
# ./modules/self-service-password.nix
./modules/rspamd.nix
./modules/openldap.nix
./modules/dovecot.nix
./modules/postfix.nix
./utils/modules/borgbackup.nix
./utils/modules/promtail
./modules/metrics
./modules/set-nix-channel.nix # Automatically manage nix-channel from /var/bento/channel
./hardware-configuration.nix
];
sops.defaultSopsFile = ./secrets.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
networking.hostName = "mail";
networking.domain = "cloonar.com";
environment.systemPackages = with pkgs; [ vim ];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = import ./utils/ssh-keys.nix;
# backups
borgbackup.repo = "u149513-sub7@u149513-sub7.your-backup.de:borg";
networking.firewall = {
enable = true;
allowedTCPPorts = [ 22 80 443 ];
};
nix.gc = {
automatic = true;
options = "--delete-older-than 60d";
};
system.stateVersion = "22.11";
}