Guard against portmap and rpcbind both being enabled
This commit is contained in:
parent
c7b427fbca
commit
0b3d54d3cd
@ -29,6 +29,8 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
check = mkAssert (!(config.services.rpcbind.enable && config.services.portmap.enable))
|
||||||
|
"Portmap and rpcbind cannot both be enabled.";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -57,7 +59,7 @@ in
|
|||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf config.services.rpcbind.enable {
|
config = mkIf config.services.rpcbind.enable (check {
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.rpcbind ];
|
environment.systemPackages = [ pkgs.rpcbind ];
|
||||||
|
|
||||||
@ -77,6 +79,6 @@ in
|
|||||||
serviceConfig.ExecStart = "@${pkgs.rpcbind}/bin/rpcbind rpcbind";
|
serviceConfig.ExecStart = "@${pkgs.rpcbind}/bin/rpcbind rpcbind";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user