diff options
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/mail/opensmtpd.nix | 20 | ||||
-rw-r--r-- | nixos/modules/services/networking/networkmanager.nix | 5 | ||||
-rw-r--r-- | nixos/modules/tasks/network-interfaces.nix | 2 |
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 |