]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/httpd-service-builder.nix
Start moving websites configuration to modules
[perso/Immae/Config/Nix.git] / modules / private / httpd-service-builder.nix
index 0f0fe2244564ecdb97e4ed83271b36096360565a..d049202c1d59c5c9e8b496240cd38f4cb7b83122 100644 (file)
@@ -7,7 +7,7 @@ with lib;
 
 let
 
-  mainCfg = config.services."httpd${httpdName}";
+  mainCfg = config.services.httpd."${httpdName}";
 
   httpd = mainCfg.package.out;
 
@@ -438,7 +438,7 @@ in
 
   options = {
 
-    services."httpd${httpdName}" = {
+    services.httpd."${httpdName}" = {
 
       enable = mkOption {
         type = types.bool;
@@ -655,7 +655,7 @@ in
 
   ###### implementation
 
-  config = mkIf config.services."httpd${httpdName}".enable {
+  config = mkIf config.services.httpd."${httpdName}".enable {
 
     assertions = [ { assertion = mainCfg.enableSSL == true
                                -> mainCfg.sslServerCert != null
@@ -679,7 +679,7 @@ in
 
     environment.systemPackages = [httpd] ++ concatMap (svc: svc.extraPath) allSubservices;
 
-    services."httpd${httpdName}".phpOptions =
+    services.httpd."${httpdName}".phpOptions =
       ''
         ; Needed for PHP's mail() function.
         sendmail_path = sendmail -t -i