mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-09 20:16:16 +03:00
Merge branch 'master.upstream' into staging.post-15.06
This commit is contained in:
commit
2ef6508c7f
43 changed files with 587 additions and 121 deletions
|
@ -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" {} ''
|
||||
|
|
|
@ -71,11 +71,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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue