From d1883c7187315749760f3c9bebcb869267748493 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 27 Apr 2022 08:48:40 +0000 Subject: [PATCH] prototype postfix config. disabled until i configure virtual alias map --- configuration.nix | 10 +++------- net-configuration.nix | 10 ++++++++++ services-conf/postfix-configuration.nix | 6 ++++++ user-configuration.nix | 2 ++ 4 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 net-configuration.nix create mode 100644 services-conf/postfix-configuration.nix diff --git a/configuration.nix b/configuration.nix index 0ddd9d95..d3f5ad96 100644 --- a/configuration.nix +++ b/configuration.nix @@ -7,13 +7,15 @@ { imports = [ # Include the results of the hardware scan. - ./hardware-configuration.nix ./fs-configuration.nix + ./hardware-configuration.nix + ./net-configuration.nix ./services-conf/gitea-configuration.nix ./services-conf/jellyfin-configuration.nix ./services-conf/matrix-configuration.nix ./services-conf/nginx-configuration.nix ./services-conf/pleroma-configuration.nix + ./services-conf/postfix-configuration.nix ./services-conf/postgres-configuration.nix ./user-configuration.nix ]; @@ -24,12 +26,6 @@ }) ]; - # TODO colin: re-enable the firewall - # networking.firewall.enable = false; - networking.firewall.allowedTCPPorts = [ 25 80 443 ]; - # DLNA ports: https://jellyfin.org/docs/general/networking/index.html - networking.firewall.allowedUDPPorts = [ 1900 7359 ]; - # XXX colin: UNMODIFIED DEFAULTS BELOW diff --git a/net-configuration.nix b/net-configuration.nix new file mode 100644 index 00000000..52ec2771 --- /dev/null +++ b/net-configuration.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + networking.domain = "uninsane.org"; + + # networking.firewall.enable = false; + networking.firewall.allowedTCPPorts = [ 25 80 443 ]; + # DLNA ports: https://jellyfin.org/docs/general/networking/index.html + networking.firewall.allowedUDPPorts = [ 1900 7359 ]; +} diff --git a/services-conf/postfix-configuration.nix b/services-conf/postfix-configuration.nix new file mode 100644 index 00000000..4a00ea9e --- /dev/null +++ b/services-conf/postfix-configuration.nix @@ -0,0 +1,6 @@ +{ config, pkgs, lib, ... }: + +{ + #services.postfix.enable = true; + services.postfix.hostname = "mx.uninsane.org"; +} diff --git a/user-configuration.nix b/user-configuration.nix index a03e9a5c..fe7f8eba 100644 --- a/user-configuration.nix +++ b/user-configuration.nix @@ -28,8 +28,10 @@ pkgs.htop pkgs.matrix-synapse pkgs.mix2nix + pkgs.netcat pkgs.nmap pkgs.ripgrep + pkgs.telnet pkgs.sudo (pkgs.vim_configurable.customize { name = "vim";