openldapReplication = ./databases/openldap_replication.nix;
websites = ./websites;
- atenInte = ./websites/aten/integration.nix;
- atenProd = ./websites/aten/production.nix;
+ isabelleAtenInte = ./websites/isabelle/aten_integration.nix;
+ isabelleAtenProd = ./websites/isabelle/aten_production.nix;
+ isabelleIridologie = ./websites/isabelle/iridologie.nix;
capitainesProd = ./websites/capitaines/production.nix;
chloeInte = ./websites/chloe/integration.nix;
chloeProd = ./websites/chloe/production.nix;
description = "Websites configurations";
type = submodule {
options = {
- aten = mkOption {
- description = "Aten configurations by environment";
+ isabelle = mkOption {
+ description = "Isabelle configurations by environment";
type =
let
atenSubmodule = mkOption {
in
submodule {
options = {
- production = atenSubmodule;
- integration = atenSubmodule;
+ aten_production = atenSubmodule;
+ aten_integration = atenSubmodule;
};
};
};
_theme = pkgs.webapps.apache-theme.theme;
};
- aten.integration.enable = true;
- aten.production.enable = true;
+ isabelle.aten_integration.enable = true;
+ isabelle.aten_production.enable = true;
+ isabelle.iridologie.enable = true;
capitaines.production.enable = true;
{ lib, pkgs, config, ... }:
let
- secrets = config.myEnv.websites.aten.integration;
+ secrets = config.myEnv.websites.isabelle.aten_integration;
app = pkgs.webapps.aten.override { environment = secrets.environment; };
- cfg = config.myServices.websites.aten.integration;
+ cfg = config.myServices.websites.isabelle.aten_integration;
pcfg = config.services.phpApplication;
in {
- options.myServices.websites.aten.integration.enable = lib.mkEnableOption "enable Aten's website in integration";
+ options.myServices.websites.isabelle.aten_integration.enable = lib.mkEnableOption "enable Aten's website in integration";
config = lib.mkIf cfg.enable {
services.duplyBackup.profiles.aten_dev.rootDir = app.varDir;
{ lib, pkgs, config, ... }:
let
- secrets = config.myEnv.websites.aten.production;
+ secrets = config.myEnv.websites.isabelle.aten_production;
app = pkgs.webapps.aten.override { environment = secrets.environment; };
- cfg = config.myServices.websites.aten.production;
+ cfg = config.myServices.websites.isabelle.aten_production;
pcfg = config.services.phpApplication;
in {
- options.myServices.websites.aten.production.enable = lib.mkEnableOption "enable Aten's website in production";
+ options.myServices.websites.isabelle.aten_production.enable = lib.mkEnableOption "enable Aten's website in production";
config = lib.mkIf cfg.enable {
services.duplyBackup.profiles.aten_prod.rootDir = app.varDir;
--- /dev/null
+{ lib, config, ... }:
+let
+ cfg = config.myServices.websites.isabelle.iridologie;
+ varDir = "/var/lib/ftp/isabelle";
+in {
+ options.myServices.websites.isabelle.iridologie.enable = lib.mkEnableOption "enable Iridologie's website";
+
+ config = lib.mkIf cfg.enable {
+ services.webstats.sites = [ { name = "iridologie.icommandeur.org"; } ];
+ services.websites.env.production.vhostConfs.iridologie = {
+ certName = "aten";
+ hosts = [ "icommandeur.org" "www.icommandeur.org" "iridologie.icommandeur.org" ];
+ root = varDir;
+ extraConfig = [
+ ''
+ Use Stats iridologie.icommandeur.org
+ RewriteEngine On
+ RewriteCond "%{HTTP_HOST}" "!^iridologie\.icommandeur\.org$" [NC]
+ RewriteRule ^(.+)$ https://iridologie.icommandeur.org$1 [R=302,L]
+
+ <Directory ${varDir}>
+ DirectoryIndex index.html
+ AllowOverride None
+ Require all granted
+ </Directory>
+ ''
+ ];
+ };
+ };
+}
+