2018-12-18 14:53:37 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
2020-10-11 12:02:58 +02:00
|
|
|
config.project.name = "webapp";
|
2019-10-29 11:04:25 +01:00
|
|
|
config.services = {
|
2018-12-18 14:53:37 +01:00
|
|
|
|
|
|
|
webserver = {
|
|
|
|
service.useHostStore = true;
|
|
|
|
service.command = [ "sh" "-c" ''
|
|
|
|
cd "$$WEB_ROOT"
|
|
|
|
${pkgs.python3}/bin/python -m http.server
|
|
|
|
'' ];
|
|
|
|
service.ports = [
|
|
|
|
"8000:8000" # host:container
|
|
|
|
];
|
|
|
|
service.environment.WEB_ROOT = "${pkgs.nix.doc}/share/doc/nix/manual";
|
2020-10-02 11:39:38 +02:00
|
|
|
service.stop_signal = "SIGINT";
|
2018-12-18 14:53:37 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|