From 252dd7d899b7a0deea1537cc5d2d48b825afffb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 13 Dec 2018 21:25:24 +0100 Subject: Initial commit published for NUR --- .../private/websites/ludivinecassal/production.nix | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 modules/private/websites/ludivinecassal/production.nix (limited to 'modules/private/websites/ludivinecassal/production.nix') diff --git a/modules/private/websites/ludivinecassal/production.nix b/modules/private/websites/ludivinecassal/production.nix new file mode 100644 index 00000000..3df5613f --- /dev/null +++ b/modules/private/websites/ludivinecassal/production.nix @@ -0,0 +1,33 @@ +{ lib, pkgs, config, myconfig, ... }: +let + ludivinecassal = pkgs.callPackage ./builder.nix { + inherit (pkgs.webapps) ludivinecassal; + config = myconfig.env.websites.ludivinecassal.production; + apacheUser = config.services.httpd.Prod.user; + apacheGroup = config.services.httpd.Prod.group; + }; + + cfg = config.myServices.websites.ludivinecassal.production; +in { + options.myServices.websites.ludivinecassal.production.enable = lib.mkEnableOption "enable Ludivine's website in production"; + + config = lib.mkIf cfg.enable { + secrets.keys = ludivinecassal.keys; + services.webstats.sites = [ { name = "ludivinecassal.com"; } ]; + + systemd.services.phpfpm-ludivinecassal_prod.after = lib.mkAfter ludivinecassal.phpFpm.serviceDeps; + systemd.services.phpfpm-ludivinecassal_prod.wants = ludivinecassal.phpFpm.serviceDeps; + systemd.services.phpfpm-ludivinecassal_prod.preStart = lib.mkAfter ludivinecassal.phpFpm.preStart; + services.phpfpm.poolConfigs.ludivinecassal_prod = ludivinecassal.phpFpm.pool; + system.activationScripts.ludivinecassal_prod = ludivinecassal.activationScript; + myServices.websites.webappDirs."${ludivinecassal.apache.webappName}" = ludivinecassal.app.webRoot; + services.websites.production.modules = ludivinecassal.apache.modules; + services.websites.production.vhostConfs.ludivine = { + certName = "ludivinecassal"; + certMainHost = "ludivinecassal.com"; + hosts = ["ludivinecassal.com" "www.ludivinecassal.com" ]; + root = ludivinecassal.apache.root; + extraConfig = [ ludivinecassal.apache.vhostConf ]; + }; + }; +} -- cgit v1.2.3