summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-11-14 12:32:51 -0800
committerWilliam A. Kennington III <william@wkennington.com>2015-11-14 12:32:51 -0800
commit6602f49495c94e8533c8b482698bcf570a8d8933 (patch)
tree07065424002052ed9e726b4feb689697845ff4a7 /nixos/modules
parente4feccce818416c39c8e86e6f9ac01674ad98c88 (diff)
downloadnixpkgs-6602f49495c94e8533c8b482698bcf570a8d8933.tar
nixpkgs-6602f49495c94e8533c8b482698bcf570a8d8933.tar.gz
nixpkgs-6602f49495c94e8533c8b482698bcf570a8d8933.tar.bz2
nixpkgs-6602f49495c94e8533c8b482698bcf570a8d8933.tar.lz
nixpkgs-6602f49495c94e8533c8b482698bcf570a8d8933.tar.xz
nixpkgs-6602f49495c94e8533c8b482698bcf570a8d8933.tar.zst
nixpkgs-6602f49495c94e8533c8b482698bcf570a8d8933.zip
Revert "Revert "Merge pull request #9543 from NixOS/staging.post-15.06""
This reverts commit 741bf840dad05cd1728481045466811ae8ae8281.

This reverts the fallout from reverting the major changes.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/mail/opensmtpd.nix20
-rw-r--r--nixos/modules/services/networking/networkmanager.nix5
-rw-r--r--nixos/modules/tasks/network-interfaces.nix2
3 files changed, 22 insertions, 5 deletions
diff --git a/nixos/modules/services/mail/opensmtpd.nix b/nixos/modules/services/mail/opensmtpd.nix
index a3e50b42292..a1cfd84365a 100644
--- a/nixos/modules/services/mail/opensmtpd.nix
+++ b/nixos/modules/services/mail/opensmtpd.nix
@@ -46,6 +46,17 @@ in {
           is left empty, the OpenSMTPD server will not start.
         '';
       };
+
+      procPackages = mkOption {
+        type = types.listOf types.path;
+        default = [];
+        description = ''
+          Packages to search for filters, tables, queues, and schedulers.
+
+          Add OpenSMTPD-extras here if you want to use the filters, etc. from
+          that package.
+        '';
+      };
     };
 
   };
@@ -72,12 +83,19 @@ in {
       };
     };
 
-    systemd.services.opensmtpd = {
+    systemd.services.opensmtpd = let
+      procEnv = pkgs.buildEnv {
+        name = "opensmtpd-procs";
+        paths = [ opensmtpd ] ++ cfg.procPackages;
+        pathsToLink = [ "/libexec/opensmtpd" ];
+      };
+    in {
       wantedBy = [ "multi-user.target" ];
       wants = [ "network.target" ];
       after = [ "network.target" ];
       preStart = "mkdir -p /var/spool";
       serviceConfig.ExecStart = "${opensmtpd}/sbin/smtpd -d -f ${conf} ${args}";
+      environment.OPENSMTPD_PROC_PATH = "${procEnv}/libexec/opensmtpd";
     };
 
     environment.systemPackages = [ (pkgs.runCommand "opensmtpd-sendmail" {} ''
diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix
index 19ff73ad1b8..7df194fa419 100644
--- a/nixos/modules/services/networking/networkmanager.nix
+++ b/nixos/modules/services/networking/networkmanager.nix
@@ -72,11 +72,10 @@ let
     ${coreutils}/bin/rm -f $tmp $tmp.ns
   '';
 
-  # pre-up and pre-down hooks were added in NM 0.9.10, but we still use 0.9.0
   dispatcherTypesSubdirMap = {
     "basic" = "";
-    /*"pre-up" = "pre-up.d/";
-    "pre-down" = "pre-down.d/";*/
+    "pre-up" = "pre-up.d/";
+    "pre-down" = "pre-down.d/";
   };
 
 in {
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index d042ee094cf..ee21d735f95 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -59,7 +59,7 @@ let
   # place the interface which is named after the device at the beginning.
   wlanListDeviceFirst = device: interfaces:
     if hasAttr device interfaces
-    then [{"${device}"=interfaces.device; _iName=device;}] ++ mapAttrsToList (n: v: v//{_iName=n;}) (filterAttrs (n: _: n!=device) interfaces)
+    then mapAttrsToList (n: v: v//{_iName=n;}) (filterAttrs (n: _: n==device) interfaces) ++ mapAttrsToList (n: v: v//{_iName=n;}) (filterAttrs (n: _: n!=device) interfaces)
     else mapAttrsToList (n: v: v // {_iName = n;}) interfaces;
 
   # udev script that configures a physical wlan device and adds virtual interfaces