From de6593bdd501ab930552c8a23ae56ede7e7b4b93 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Thu, 1 Aug 2024 20:25:37 +0200 Subject: [PATCH] chore: rename lisanew --- lib/luj.nix | 6 +- machines/{lisanew => akhaten}/default.nix | 3 +- machines/{lisanew => akhaten}/disko.nix | 0 machines/{lisanew => akhaten}/hardware.nix | 0 machines/{lisanew => akhaten}/home-julien.nix | 0 machines/akhaten/stalwart.nix | 71 +++++++++++++++++++ 6 files changed, 76 insertions(+), 4 deletions(-) rename machines/{lisanew => akhaten}/default.nix (89%) rename machines/{lisanew => akhaten}/disko.nix (100%) rename machines/{lisanew => akhaten}/hardware.nix (100%) rename machines/{lisanew => akhaten}/home-julien.nix (100%) create mode 100644 machines/akhaten/stalwart.nix diff --git a/lib/luj.nix b/lib/luj.nix index 3328740..812bc98 100644 --- a/lib/luj.nix +++ b/lib/luj.nix @@ -57,11 +57,11 @@ let vpn = "fd7a:115c:a1e0::c"; }; }; - lisanew = { + akhaten = { inherit tld; arch = "x86_64-linux"; - nixpkgs_version = inputs.nixpkgs; - hm_version = inputs.home-manager; + nixpkgs_version = inputs.unstable; + hm_version = inputs.home-manager-unstable; ipv4 = { public = "163.172.91.82"; vpn = "100.100.45.32"; diff --git a/machines/lisanew/default.nix b/machines/akhaten/default.nix similarity index 89% rename from machines/lisanew/default.nix rename to machines/akhaten/default.nix index 1e3929d..b210359 100644 --- a/machines/lisanew/default.nix +++ b/machines/akhaten/default.nix @@ -3,6 +3,7 @@ imports = [ ./hardware.nix ./home-julien.nix + ./stalwart.nix ]; deployment.tags = [ "server" ]; @@ -27,5 +28,5 @@ }; }; - system.stateVersion = "24.05"; + system.stateVersion = "24.11"; } diff --git a/machines/lisanew/disko.nix b/machines/akhaten/disko.nix similarity index 100% rename from machines/lisanew/disko.nix rename to machines/akhaten/disko.nix diff --git a/machines/lisanew/hardware.nix b/machines/akhaten/hardware.nix similarity index 100% rename from machines/lisanew/hardware.nix rename to machines/akhaten/hardware.nix diff --git a/machines/lisanew/home-julien.nix b/machines/akhaten/home-julien.nix similarity index 100% rename from machines/lisanew/home-julien.nix rename to machines/akhaten/home-julien.nix diff --git a/machines/akhaten/stalwart.nix b/machines/akhaten/stalwart.nix new file mode 100644 index 0000000..06b130f --- /dev/null +++ b/machines/akhaten/stalwart.nix @@ -0,0 +1,71 @@ +{ + services.stalwart-mail = { + enable = true; + settings = { + global.tracing.level = "trace"; + authentication.fallback-admin = { + user = "admin"; + secret = "$6$R469iElYzZ7v7TlV$PtJpqLO0Szw.B/r8V.puCC26i5.nfQLJQotTWrNoBsTrFo6/J1pC43OIMKc.2Oli/Of0pjPcgbBNmhfFImuuu0"; + }; + lookup.default.hostname = "mail.luj.fr"; + server = { + max-connections = 8192; + hostname = "mail.luj.fr"; + tls.enable = true; + listener = { + "smtp" = { + bind = [ "[::]:25" ]; + protocol = "smtp"; + }; + "smtp-submission" = { + bind = "[::]:587"; + protocol = "smtp"; + }; + "smtp-submissions" = { + bind = [ "[::]:465" ]; + protocol = "smtp"; + tls.implicit = true; + }; + "imap" = { + bind = [ "[::]:143" ]; + protocol = "imap"; + }; + "imaptls" = { + bind = [ "[::]:993" ]; + protocol = "imap"; + tls.implicit = true; + }; + "http" = { + bind = "[::]:80"; + protocol = "http"; + }; + + "https" = { + bind = "[::]:443"; + protocol = "http"; + tls.implicit = true; + }; + + "sieve" = { + bind = "[::]:4190"; + protocol = "managesieve"; + }; + }; + }; + + }; + }; + + networking.firewall.allowedTCPPorts = [ + 80 + 443 + 8080 + 465 + 993 + 143 + 25 + 4190 + 587 + ]; + +}