eldiron = { config, pkgs, ... }:
let mypkgs = import ./packages.nix;
+ mylibs = import ../libs.nix;
in
{
networking = {
extraDomains = {
"db-1.immae.eu" = null;
"tools.immae.eu" = null;
+ "connexionswing.immae.eu" = null;
+ "sandetludo.immae.eu" = null;
};
};
};
'';
poolConfigs = {
adminer = mypkgs.adminer.phpFpm.pool;
+ connexionswing_dev = mypkgs.connexionswing_dev.phpFpm.pool;
www = ''
listen = /var/run/phpfpm/www.sock
user = wwwrun
};
};
+ system.activationScripts = {
+ connexionswing_dev = mypkgs.connexionswing_dev.activationScript;
+ };
+
services.httpd = let
withSSL = domain: {
enableSSL = true;
logPerVirtualHost = true;
multiProcessingModule = "worker";
adminAddr = "httpd@immae.eu";
- extraModules = [
- "proxy_fcgi" # for PHP
- "macro"
- "ldap"
- "authnz_ldap"
- ];
- extraConfig = ''
+ # FIXME: http2
+ extraModules = pkgs.lib.lists.unique (
+ mypkgs.adminer.apache.modules ++
+ mypkgs.connexionswing_dev.apache.modules ++
+ [
+ "macro"
+ "ldap"
+ "authnz_ldap"
+ ]);
+ extraConfig = assert mylibs.checkEnv "NIXOPS_HTTP_LDAP_PASSWORD"; ''
<IfModule ldap_module>
LDAPSharedCacheSize 500000
LDAPCacheEntries 1024
mypkgs.ympd.apache.vhostConf
];
})
+ (withSSL "eldiron" // {
+ listen = [ { ip = "*"; port = 443; } ];
+ hostName = "connexionswing.immae.eu";
+ serverAliases = [ "sandetludo.immae.eu" ];
+ documentRoot = mypkgs.connexionswing_dev.webRoot;
+ extraConfig = builtins.concatStringsSep "\n" [
+ mypkgs.connexionswing_dev.apache.vhostConf
+ ];
+ })
{ # Should go last, default fallback
listen = [ { ip = "*"; port = 80; } ];
hostName = "redirectSSL";
# FIXME: environment variables ?
security.pam.services = let
pam_ldap = pkgs.pam_ldap;
- pam_ldap_mysql = pkgs.writeText "mysql.conf" ''
+ pam_ldap_mysql = assert mylibs.checkEnv "NIXOPS_MYSQL_PAM_PASSWORD";
+ pkgs.writeText "mysql.conf" ''
host ldap.immae.eu
base dc=immae,dc=eu
binddn cn=mysql,cn=pam,ou=services,dc=immae,dc=eu