From daf64e3f7de98e4267823d14fa34891b27b5f657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Tue, 14 May 2019 08:47:00 +0200 Subject: Start moving websites configuration to modules --- modules/private/default.nix | 2 +- modules/private/httpd-service-builder.nix | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/private') diff --git a/modules/private/default.nix b/modules/private/default.nix index ba46374..6c71af3 100644 --- a/modules/private/default.nix +++ b/modules/private/default.nix @@ -1,6 +1,6 @@ { # adatped from nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix - httpdProd = import ./httpd-service-builder.nix { httpdName = "Prod"; withUsers = false; }; httpdInte = import ./httpd-service-builder.nix { httpdName = "Inte"; withUsers = false; }; + httpdProd = import ./httpd-service-builder.nix { httpdName = "Prod"; withUsers = false; }; httpdTools = import ./httpd-service-builder.nix { httpdName = "Tools"; withUsers = true; }; } diff --git a/modules/private/httpd-service-builder.nix b/modules/private/httpd-service-builder.nix index 0f0fe22..d049202 100644 --- a/modules/private/httpd-service-builder.nix +++ b/modules/private/httpd-service-builder.nix @@ -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 -- cgit v1.2.3