httpd: added serviceExpression which extends the serviceType concept -> allows that httpd services can live outside of nixpkgs (#22269)
This commit is contained in:
parent
b5957eaf2f
commit
d491728653
@ -63,6 +63,8 @@ let
|
|||||||
let
|
let
|
||||||
svcFunction =
|
svcFunction =
|
||||||
if svc ? function then svc.function
|
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");
|
else import (toString "${toString ./.}/${if svc ? serviceType then svc.serviceType else svc.serviceName}.nix");
|
||||||
config = (evalModules
|
config = (evalModules
|
||||||
{ modules = [ { options = res.options; config = svc.config or svc; } ];
|
{ modules = [ { options = res.options; config = svc.config or svc; } ];
|
||||||
|
Loading…
Reference in New Issue
Block a user