about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-03-18 00:14:27 +0100
committeraszlig <aszlig@redmoonstudios.org>2015-03-18 00:17:13 +0100
commit6b857eebbafba660cc57b19bd11f6484c91f8fd7 (patch)
tree3432dce53097598149cc64087d908ad35e038437
parentbdb1643acdb75d92f10559be06ea9448461ddf12 (diff)
Integrate Postfix config into module-list.nix.
This currently is just a dummy module for now with a big fat TODO, but
at least we now have a homogenous module namespace starting with
"labernix." and categorized by services/config/tasks/whatnot.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
-rw-r--r--machines/mailserver.nix7
-rw-r--r--modules/module-list.nix1
-rw-r--r--modules/services/postfix/default.nix1
-rw-r--r--modules/services/postfix/restrictions.nix (renamed from modules/postfix/restrictions.nix)4
4 files changed, 6 insertions, 7 deletions
diff --git a/machines/mailserver.nix b/machines/mailserver.nix
index 86f6edac..7d4bd397 100644
--- a/machines/mailserver.nix
+++ b/machines/mailserver.nix
@@ -35,10 +35,7 @@
   ''}";
 
 in {
-  imports = [
-    ../common.nix
-    ../modules/postfix/restrictions.nix # XXX: Refactor and remove!
-  ];
+  imports = [ ../common.nix ];
 
   services.spamassassin.enable = true;
 
@@ -49,7 +46,7 @@ in {
   fileSystems."/".label = "root";
   boot.loader.grub.device = "nodev";
 
-  openlab.postfix.restrictions = {
+  labernix.postfix.restrictions = {
     sender = [
       "reject_authenticated_sender_login_mismatch"
       "reject_unknown_sender_domain"
diff --git a/modules/module-list.nix b/modules/module-list.nix
index 864019b1..5137c672 100644
--- a/modules/module-list.nix
+++ b/modules/module-list.nix
@@ -1,3 +1,4 @@
 [
   ./config/labernix-pkgs.nix
+  ./services/postfix
 ]
diff --git a/modules/services/postfix/default.nix b/modules/services/postfix/default.nix
new file mode 100644
index 00000000..4103a41b
--- /dev/null
+++ b/modules/services/postfix/default.nix
@@ -0,0 +1 @@
+import ./restrictions.nix # TODO: Dummy for now, implement me!
diff --git a/modules/postfix/restrictions.nix b/modules/services/postfix/restrictions.nix
index 8f2412ca..fbb47f10 100644
--- a/modules/postfix/restrictions.nix
+++ b/modules/services/postfix/restrictions.nix
@@ -14,7 +14,7 @@ let
       '';
     };
     config = let
-      cfg = config.openlab.postfix.restrictions.${name};
+      cfg = config.labernix.postfix.restrictions.${name};
     in mkIf (cfg != null) ''
       smtpd_${name}_restrictions = ${concatStringsSep ", " cfg}
     '';
@@ -49,5 +49,5 @@ let
     '';
   };
 in {
-  options.openlab.postfix.restrictions = mapAttrs mkRestriction restrictions;
+  options.labernix.postfix.restrictions = mapAttrs mkRestriction restrictions;
 }