diff options
| author | vin <vin@vineetk.net> | 2025-03-02 02:01:28 -0500 |
|---|---|---|
| committer | vin <vin@vineetk.net> | 2025-03-02 04:49:18 -0500 |
| commit | abe0ef21cf91e3a638f899d5091e82bc4c4fdee5 (patch) | |
| tree | aa60c28cf42ba319c43aa6cce1e6323392df7fe2 | |
| parent | 2b873d6e9db9f8536a96298f42455295f8fa7204 (diff) | |
saklas: try using the nixos-mailserver flake
| -rw-r--r-- | flake.nix | 5 | ||||
| -rw-r--r-- | hosts/saklas/default.nix | 2 | ||||
| -rw-r--r-- | hosts/saklas/mail.nix | 59 |
3 files changed, 64 insertions, 2 deletions
| @@ -15,9 +15,11 @@ | |||
| 15 | url = "github:everblush/gtk"; | 15 | url = "github:everblush/gtk"; |
| 16 | inputs.nixpkgs.follows = "nixpkgs"; | 16 | inputs.nixpkgs.follows = "nixpkgs"; |
| 17 | }; | 17 | }; |
| 18 | |||
| 19 | simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.11"; | ||
| 18 | }; | 20 | }; |
| 19 | 21 | ||
| 20 | outputs = { self, home-manager, nixpkgs, nixpkgs-stable, everblush-gtk, ... }@inputs: { | 22 | outputs = { self, home-manager, nixpkgs, nixpkgs-stable, everblush-gtk, simple-nixos-mailserver, ... }@inputs: { |
| 21 | # TODO: deduplicate this | 23 | # TODO: deduplicate this |
| 22 | nixosConfigurations = { | 24 | nixosConfigurations = { |
| 23 | demiurge = nixpkgs.lib.nixosSystem { | 25 | demiurge = nixpkgs.lib.nixosSystem { |
| @@ -61,6 +63,7 @@ | |||
| 61 | specialArgs = inputs; | 63 | specialArgs = inputs; |
| 62 | modules = [ | 64 | modules = [ |
| 63 | ./hosts/saklas | 65 | ./hosts/saklas |
| 66 | simple-nixos-mailserver.nixosModules.default ./hosts/saklas/mail.nix | ||
| 64 | ]; | 67 | ]; |
| 65 | }; | 68 | }; |
| 66 | }; | 69 | }; |
diff --git a/hosts/saklas/default.nix b/hosts/saklas/default.nix index 0d949ec..e8203ea 100644 --- a/hosts/saklas/default.nix +++ b/hosts/saklas/default.nix | |||
| @@ -88,7 +88,7 @@ | |||
| 88 | }; | 88 | }; |
| 89 | 89 | ||
| 90 | services = { | 90 | services = { |
| 91 | # reverse proxy | 91 | # web server and reverse proxy |
| 92 | nginx = { | 92 | nginx = { |
| 93 | enable = false; | 93 | enable = false; |
| 94 | 94 | ||
diff --git a/hosts/saklas/mail.nix b/hosts/saklas/mail.nix new file mode 100644 index 0000000..7593b2a --- /dev/null +++ b/hosts/saklas/mail.nix | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | { | ||
| 2 | mailserver = { | ||
| 3 | enable = true; | ||
| 4 | fqdn = "mail.vineetk.net"; | ||
| 5 | domains = [ "vineetk.net" "vinbiz.ca" "13f0.net" ]; | ||
| 6 | |||
| 7 | # A list of all login accounts. To create the password hashes, use | ||
| 8 | # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' | ||
| 9 | loginAccounts = { | ||
| 10 | "vineet@vineetk.net" = { | ||
| 11 | hashedPassword = "$2b$05$7chAoNcCtw8ajVQYjmb7T.JLcOjtlVsS/LipIvc3LY4/qUPrFTP/."; | ||
| 12 | aliases = ["@vineetk.net"]; | ||
| 13 | }; | ||
| 14 | |||
| 15 | "kar@13f0.net" = { | ||
| 16 | hashedPassword = "$2b$05$w0rQk32VTQ8YMPQa.Mb28eX8zmYpDqI9FMPShQ7o2tYVzpbtvEyPq"; | ||
| 17 | aliases = ["@13f0.net"]; | ||
| 18 | sieveScript = '' | ||
| 19 | require [ "fileinto", "mailbox" ]; | ||
| 20 | |||
| 21 | if address :matches [ "to", "cc" ] "announce@openbsd.org" { | ||
| 22 | fileinto :create "openbsd_announce"; | ||
| 23 | stop; | ||
| 24 | } | ||
| 25 | if address :matches [ "to", "cc" ] "arm@openbsd.org" { | ||
| 26 | fileinto :create "openbsd_arm"; | ||
| 27 | stop; | ||
| 28 | } | ||
| 29 | if address :matches [ "to", "cc" ] "misc@openbsd.org" { | ||
| 30 | fileinto :create "openbsd_misc"; | ||
| 31 | stop; | ||
| 32 | } | ||
| 33 | if address :matches [ "to", "cc" ] "misc@opensmtpd.org" { | ||
| 34 | fileinto :create "opensmtpd_misc"; | ||
| 35 | stop; | ||
| 36 | } | ||
| 37 | if address :matches [ "to", "cc" ] "oss-security@lists.openwall.com" { | ||
| 38 | fileinto :create "oss_security"; | ||
| 39 | stop; | ||
| 40 | } | ||
| 41 | if address :matches [ "to", "cc" ] "tuhs@tuhs.org" { | ||
| 42 | fileinto :create "tuhs"; | ||
| 43 | stop; | ||
| 44 | } | ||
| 45 | ''; | ||
| 46 | }; | ||
| 47 | |||
| 48 | "vineet@vinbiz.ca" = { | ||
| 49 | hashedPassword = "$2b$05$lyCFvoxfoJX8jtI3FsePLenhcIn.hqN53twq/zJ316f4WHQJeUji6"; | ||
| 50 | aliases = ["postmaster@vinbiz.ca"]; | ||
| 51 | }; | ||
| 52 | "suresh@vinbiz.ca".hashedPassword = "$2b$05$Vpqk62qIbRsFQipSd2aA0.EqL011nSmhA6VD.YjjfoYbO3zZVybDS"; | ||
| 53 | "revathy@vinbiz.ca".hashedPassword = "$2b$05$RkABB76JTCNa0cotOfS28..mJME7a/A4gaTRpZnSdTJi3wr2X3t.C"; | ||
| 54 | "suren@vinbiz.ca".hashedPassword = "$2b$05$.VTHKaBu0JQf2MpLNa7GXeliyZxOdXms59VslMmEjnu.IOzjVgHzy"; | ||
| 55 | }; | ||
| 56 | |||
| 57 | certificateScheme = "acme"; | ||
| 58 | }; | ||
| 59 | } | ||
