summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2020-06-10 20:00:44 +0200
committerVladimír Čunát <v@cunat.cz>2020-06-10 20:00:44 +0200
commit13add13388cde09f5f60c598123c8d3f64244f50 (patch)
tree953bc63b7ae1dd8371da0c2a88f89e05ca6d802f /nixos
parent34d58cb8396b5e031abe4ffbb1b30da8549bf79d (diff)
parenta6941d2b2adc66d10ebfa4058fa481e735ee2916 (diff)
downloadnixpkgs-13add13388cde09f5f60c598123c8d3f64244f50.tar
nixpkgs-13add13388cde09f5f60c598123c8d3f64244f50.tar.gz
nixpkgs-13add13388cde09f5f60c598123c8d3f64244f50.tar.bz2
nixpkgs-13add13388cde09f5f60c598123c8d3f64244f50.tar.lz
nixpkgs-13add13388cde09f5f60c598123c8d3f64244f50.tar.xz
nixpkgs-13add13388cde09f5f60c598123c8d3f64244f50.tar.zst
nixpkgs-13add13388cde09f5f60c598123c8d3f64244f50.zip
Merge branch 'master' into staging-next
... to resolve a trivial conflict in libpcap.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/mail/opensmtpd.nix23
-rw-r--r--nixos/modules/services/torrent/transmission.nix2
2 files changed, 17 insertions, 8 deletions
diff --git a/nixos/modules/services/mail/opensmtpd.nix b/nixos/modules/services/mail/opensmtpd.nix
index 1fabe2da45c..c838d3b949d 100644
--- a/nixos/modules/services/mail/opensmtpd.nix
+++ b/nixos/modules/services/mail/opensmtpd.nix
@@ -17,6 +17,10 @@ in {
 
   ###### interface
 
+  imports = [
+    (mkRenamedOptionModule [ "services" "opensmtpd" "addSendmailToSystemPath" ] [ "services" "opensmtpd" "setSendmail" ])
+  ];
+
   options = {
 
     services.opensmtpd = {
@@ -34,13 +38,10 @@ in {
         description = "The OpenSMTPD package to use.";
       };
 
-      addSendmailToSystemPath = mkOption {
+      setSendmail = mkOption {
         type = types.bool;
         default = true;
-        description = ''
-          Whether to add OpenSMTPD's sendmail binary to the
-          system path or not.
-        '';
+        description = "Whether to set the system sendmail to OpenSMTPD's.";
       };
 
       extraServerArgs = mkOption {
@@ -82,7 +83,7 @@ in {
 
   ###### implementation
 
-  config = mkIf cfg.enable {
+  config = mkIf cfg.enable rec {
     users.groups = {
       smtpd.gid = config.ids.gids.smtpd;
       smtpq.gid = config.ids.gids.smtpq;
@@ -101,6 +102,14 @@ in {
       };
     };
 
+    security.wrappers.smtpctl = {
+      group = "smtpq";
+      setgid = true;
+      source = "${cfg.package}/bin/smtpctl";
+    };
+
+    services.mail.sendmailSetuidWrapper = mkIf cfg.setSendmail security.wrappers.smtpctl;
+
     systemd.tmpfiles.rules = [
       "d /var/spool/smtpd 711 root - - -"
       "d /var/spool/smtpd/offline 770 root smtpq - -"
@@ -119,7 +128,5 @@ in {
       serviceConfig.ExecStart = "${cfg.package}/sbin/smtpd -d -f ${conf} ${args}";
       environment.OPENSMTPD_PROC_PATH = "${procEnv}/libexec/opensmtpd";
     };
-
-    environment.systemPackages = mkIf cfg.addSendmailToSystemPath [ sendmail ];
   };
 }
diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix
index e7f5aaed844..1bfcf2de82f 100644
--- a/nixos/modules/services/torrent/transmission.nix
+++ b/nixos/modules/services/torrent/transmission.nix
@@ -179,6 +179,8 @@ in
           ${getLib pkgs.utillinuxMinimal.out}/lib/libblkid.so.* mr,
           ${getLib pkgs.utillinuxMinimal.out}/lib/libmount.so.* mr,
           ${getLib pkgs.utillinuxMinimal.out}/lib/libuuid.so.* mr,
+          ${getLib pkgs.gcc.cc.lib}/lib/libstdc++.so.* mr,
+          ${getLib pkgs.gcc.cc.lib}/lib/libgcc_s.so.* mr,
 
           @{PROC}/sys/kernel/random/uuid   r,
           @{PROC}/sys/vm/overcommit_memory r,