Guard against portmap and rpcbind both being enabled
This commit is contained in:
parent
c7b427fbca
commit
0b3d54d3cd
1 changed files with 4 additions and 2 deletions
|
@ -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";
|
||||
};
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue