it-infra/nixbld-etc-nixos/rfq/uwsgi-config.nix

22 lines
563 B
Nix
Raw Normal View History

2020-06-20 17:54:21 +08:00
{ config, pkgs }:
let
pkg = pkgs.callPackage ./pkg.nix {};
in {
type = "normal";
pythonPackages = self: [ pkg ];
module = "rfq:app";
env = [
2022-08-13 11:22:01 +08:00
"FLASK_MAIL_SERVER=mail.m-labs.hk"
2020-06-20 17:54:21 +08:00
"FLASK_MAIL_PORT=465"
"FLASK_MAIL_USE_SSL=True"
2022-08-13 11:22:01 +08:00
"FLASK_MAIL_USERNAME=sysop@m-labs.hk"
"FLASK_MAIL_PASSWORD=${import /etc/nixos/secret/sysop_password.nix}"
2020-06-20 17:54:21 +08:00
"FLASK_MAIL_RECIPIENT=sales@m-labs.hk"
2022-08-13 11:22:01 +08:00
"FLASK_MAIL_SENDER=sysop@m-labs.hk"
2020-06-20 17:54:21 +08:00
];
socket = "${config.services.uwsgi.runDir}/uwsgi-rfq.sock";
# allow access from nginx
chmod-socket = 666;
}