From 0b3d54d3cd39c54b9dafb83bbbdd37dc631c1c7b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 9 Jan 2013 22:53:11 +0100 Subject: [PATCH] Guard against portmap and rpcbind both being enabled --- modules/services/networking/rpcbind.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/services/networking/rpcbind.nix b/modules/services/networking/rpcbind.nix index 8e3e86a515c..f82803e7519 100644 --- a/modules/services/networking/rpcbind.nix +++ b/modules/services/networking/rpcbind.nix @@ -29,6 +29,8 @@ let ''; }; + check = mkAssert (!(config.services.rpcbind.enable && config.services.portmap.enable)) + "Portmap and rpcbind cannot both be enabled."; in @@ -57,7 +59,7 @@ in ###### implementation - config = mkIf config.services.rpcbind.enable { + config = mkIf config.services.rpcbind.enable (check { environment.systemPackages = [ pkgs.rpcbind ]; @@ -77,6 +79,6 @@ in serviceConfig.ExecStart = "@${pkgs.rpcbind}/bin/rpcbind rpcbind"; }; - }; + }); }