diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-10-03 14:45:56 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-10-03 15:23:13 +0200 |
commit | f361938b210e057906dcdd5471275ddf265e4a4e (patch) | |
tree | ea69e01503464f511e388d36fe69c3c689b42fbc /nixos/modules | |
parent | f2cb132c34d115761a19728a2a6a595f4fa08761 (diff) | |
parent | b233ecdca68e08940024da6e4e55e6ef2a20863f (diff) | |
download | nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar.gz nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar.bz2 nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar.lz nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar.xz nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.tar.zst nixlib-f361938b210e057906dcdd5471275ddf265e4a4e.zip |
Merge staging into closure-size
This makes gcc5 the default builder, etc.
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 a3e50b422920..a1cfd84365a2 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 adbc6099c95a..8370eca21e52 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -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 { diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 9ffede48bf52..03e647b1b1e7 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 |