File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 113113
114114 SENTRY_ENVIRONMENT = "prod" ;
115115 }
116- // ( lib . mapAttrs' (
117- ms :
118- { port , ... } :
119- {
120- name = "${ lib . toUpper ms } _URL" ;
121- value = "http://127.0.0.1:${ toString port } /" ;
122- }
123- ) config . academy . backend . microservices )
124- // ( lib . mapAttrs' (
125- ms :
126- { redis , ... } :
127- {
128- name = "${ lib . toUpper ms } _REDIS_URL" ;
129- value = "redis://127.0.0.1:6379/${ toString redis . database } " ;
130- }
131- ) config . academy . backend . microservices )
116+ // ( lib . mapAttrs' ( ms : { port , ... } : {
117+ name = "${ lib . toUpper ms } _URL" ;
118+ value = "http://127.0.0.1:${ toString port } /" ;
119+ } ) config . academy . backend . microservices )
120+ // ( lib . mapAttrs' ( ms : { redis , ... } : {
121+ name = "${ lib . toUpper ms } _REDIS_URL" ;
122+ value = "redis://127.0.0.1:6379/${ toString redis . database } " ;
123+ } ) config . academy . backend . microservices )
132124 // {
133125 AUTH_URL = "http://127.0.0.1:8000/auth/" ;
134126 SHOP_URL = "http://127.0.0.1:8000/shop/" ;
Original file line number Diff line number Diff line change 115115
116116 SENTRY_ENVIRONMENT = "test" ;
117117 }
118- // ( lib . mapAttrs' (
119- ms :
120- { port , ... } :
121- {
122- name = "${ lib . toUpper ms } _URL" ;
123- value = "http://127.0.0.1:${ toString port } /" ;
124- }
125- ) config . academy . backend . microservices )
126- // ( lib . mapAttrs' (
127- ms :
128- { redis , ... } :
129- {
130- name = "${ lib . toUpper ms } _REDIS_URL" ;
131- value = "redis://127.0.0.1:6379/${ toString redis . database } " ;
132- }
133- ) config . academy . backend . microservices )
118+ // ( lib . mapAttrs' ( ms : { port , ... } : {
119+ name = "${ lib . toUpper ms } _URL" ;
120+ value = "http://127.0.0.1:${ toString port } /" ;
121+ } ) config . academy . backend . microservices )
122+ // ( lib . mapAttrs' ( ms : { redis , ... } : {
123+ name = "${ lib . toUpper ms } _REDIS_URL" ;
124+ value = "redis://127.0.0.1:6379/${ toString redis . database } " ;
125+ } ) config . academy . backend . microservices )
134126 // {
135127 AUTH_URL = "http://127.0.0.1:8000/auth/" ;
136128 SHOP_URL = "http://127.0.0.1:8000/shop/" ;
Original file line number Diff line number Diff line change 1- { config , lib , ... } :
2- {
1+ { config , lib , ... } : {
32 security . acme = {
43 acceptTerms = true ;
54 defaults . email = "admin@bootstrap.academy" ;
Original file line number Diff line number Diff line change 1- { lib , ... } :
2- {
1+ { lib , ... } : {
32 imports = [
43 ./nginx.nix
54 ./postgresql.nix
Original file line number Diff line number Diff line change 3434 }
3535 '' ;
3636 locations =
37- lib . mapAttrs' (
38- ms :
39- { port , ... } :
40- {
41- name = "/${ ms } /" ;
42- value = {
43- proxyPass = "http://127.0.0.1:${ toString port } /" ;
44- proxyWebsockets = true ;
45- } ;
46- }
47- ) cfg . microservices
48- // ( lib . mapAttrs' (
49- ms :
50- { port , ... } :
51- {
52- name = "= /${ ms } /" ;
53- value = {
54- return = "307 /${ ms } /docs" ;
55- } ;
56- }
57- ) cfg . microservices )
37+ lib . mapAttrs' ( ms : { port , ... } : {
38+ name = "/${ ms } /" ;
39+ value = {
40+ proxyPass = "http://127.0.0.1:${ toString port } /" ;
41+ proxyWebsockets = true ;
42+ } ;
43+ } ) cfg . microservices
44+ // ( lib . mapAttrs' ( ms : { port , ... } : {
45+ name = "= /${ ms } /" ;
46+ value = {
47+ return = "307 /${ ms } /docs" ;
48+ } ;
49+ } ) cfg . microservices )
5850 // ( lib . optionalAttrs ( cfg . protectInternalEndpoints ) { "~* (:*/_internal/.*)" . return = "403" ; } )
5951 // {
6052 "= /" = {
Original file line number Diff line number Diff line change 1- { lib , config , ... } :
2- {
1+ { lib , config , ... } : {
32 config =
43 let
54 cfg = config . academy . backend ;
Original file line number Diff line number Diff line change 1- { config , lib , ... } :
2- {
1+ { config , lib , ... } : {
32 config =
43 let
54 cfg = config . academy . backend ;
Original file line number Diff line number Diff line change 1- { config , lib , ... } :
2- {
1+ { config , lib , ... } : {
32 options . filesystems = {
43 defaultLayout = lib . mkOption {
54 type = lib . types . bool ;
Original file line number Diff line number Diff line change 1- { config , lib , ... } :
2- {
1+ { config , lib , ... } : {
32 options . monitoring = {
43 enable = lib . mkOption {
54 type = lib . types . bool ;
Original file line number Diff line number Diff line change 1- { pkgs , ... } :
2- {
1+ { pkgs , ... } : {
32 environment . systemPackages = builtins . attrValues {
43 inherit ( pkgs )
54 dig
You can’t perform that action at this time.
0 commit comments