]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - nixops/modules/websites/tellesflorian/default.nix
Move integration websites to use stable web directory
[perso/Immae/Config/Nix.git] / nixops / modules / websites / tellesflorian / default.nix
CommitLineData
9d90e7e2 1{ lib, pkgs, config, myconfig, mylibs, ... }:
2f0f1c48
IB
2let
3 adminer = pkgs.callPackage ../commons/adminer.nix {};
4
9d90e7e2
IB
5 tellesflorian = pkgs.callPackage ./tellesflorian.nix { inherit (mylibs) fetchedGitPrivate; };
6 tellesflorian_dev = tellesflorian {
7 config = myconfig.env.websites.tellesflorian.integration;
8 };
2f0f1c48
IB
9
10 cfg = config.services.myWebsites.TellesFlorian;
11in {
12 options.services.myWebsites.TellesFlorian = {
13 integration = {
14 enable = lib.mkEnableOption "enable Florian Telles's website in integration";
15 };
16 };
17
18 config = lib.mkIf cfg.integration.enable {
19 security.acme.certs."eldiron".extraDomains."app.tellesflorian.com" = null;
20 services.myPhpfpm.poolConfigs.tellesflorian_dev = tellesflorian_dev.phpFpm.pool;
21 system.activationScripts.tellesflorian_dev = tellesflorian_dev.activationScript;
e5073add
IB
22 system.extraSystemBuilderCmds = ''
23 mkdir -p $out/webapps
24 ln -s ${tellesflorian_dev.webRoot} $out/webapps/${tellesflorian_dev.apache.webappName}
25 '';
2f0f1c48
IB
26 services.myWebsites.integration.modules = adminer.apache.modules ++ tellesflorian_dev.apache.modules;
27 services.myWebsites.integration.vhostConfs.tellesflorian = {
28 certName = "eldiron";
29 hosts = ["app.tellesflorian.com" ];
e5073add 30 root = tellesflorian_dev.apache.root;
2f0f1c48
IB
31 extraConfig = [
32 tellesflorian_dev.apache.vhostConf
33 adminer.apache.vhostConf
34 ];
35 };
36 };
37}