httpd: added serviceExpression which extends the serviceType concept -> allows that httpd services can live outside of nixpkgs (#22269)

This commit is contained in:
Joachim Schiele 2017-02-06 01:08:58 +01:00 committed by GitHub
parent b5957eaf2f
commit d491728653

View File

@ -63,6 +63,8 @@ let
let
svcFunction =
if svc ? function then svc.function
# instead of using serviceType="mediawiki"; you can copy mediawiki.nix to any location outside nixpkgs, modify it at will, and use serviceExpression=./mediawiki.nix;
else if svc ? serviceExpression then import (toString svc.serviceExpression)
else import (toString "${toString ./.}/${if svc ? serviceType then svc.serviceType else svc.serviceName}.nix");
config = (evalModules
{ modules = [ { options = res.options; config = svc.config or svc; } ];