File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 40
40
} ;
41
41
42
42
vhosts = mkOption {
43
- type = with types ; listOf ( submodule {
43
+ type = with types ; listOf ( submodule ( { config , ... } : {
44
44
options = {
45
45
port = mkOption { type = int ; } ;
46
46
docroot = mkOption { type = str ; } ;
56
56
description = "Overrides for underlying NixOS Pool options" ;
57
57
default = { } ;
58
58
} ;
59
+ name = mkOption {
60
+ type = str ;
61
+ default = "lamp-${ toString config . port } " ;
62
+ } ;
59
63
} ;
60
- } ) ;
64
+ } ) ) ;
61
65
default = [ ] ;
62
66
} ;
63
67
206
210
DirectoryIndex index.html index.php
207
211
</Directory>
208
212
<FilesMatch "\.php$">
209
- SetHandler "proxy:unix:${ config . services . phpfpm . pools . "lamp- ${ port } " . socket } |fcgi://localhost/"
213
+ SetHandler "proxy:unix:${ config . services . phpfpm . pools . "${ vhost . name } " . socket } |fcgi://localhost/"
210
214
</FilesMatch>
211
215
${ vhost . apacheExtraConfig }
212
216
</VirtualHost>
222
226
223
227
services . phpfpm . pools = builtins . listToAttrs ( map
224
228
( vhost : {
225
- name = "lamp- ${ toString vhost . port } " ;
229
+ inherit ( vhost ) name ;
226
230
value = lib . attrsets . recursiveUpdate {
227
231
user = config . services . httpd . user ;
228
232
group = config . services . httpd . group ;
You can’t perform that action at this time.
0 commit comments