1{config, ...}: {
2 services.couchdb = {
3 enable = true;
4 port = 5999;
5 configFile = "/var/lib/couchdb/config";
6 };
7 services.nginx.virtualHosts."couchdb.gaze.systems" = {
8 useACMEHost = "gaze.systems";
9 forceSSL = true;
10 locations."/".proxyPass = "http://localhost:${toString config.services.couchdb.port}";
11 # locations."/".extraConfig = ''
12 # add_header 'Access-Control-Allow-Credentials' 'true';
13 # add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, HEAD, DELETE';
14 # add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Content-Type,Origin,Referer';
15 # add_header 'Access-Control-Max-Age' 3600;
16 # '';
17 };
18}