X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fdefault.nix;h=90f24a455ce357512c15059e6e85d2b8d2cf6a38;hb=981fa80354fd6f00f49446777c38f77bd8a65f65;hp=f55f7e3e120331b8869141c6b0da22a3ab464f08;hpb=93531b30f0c08f6c549fac338a1cb8070c3c0a9a;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/default.nix b/modules/private/websites/default.nix index f55f7e3..90f24a4 100644 --- a/modules/private/websites/default.nix +++ b/modules/private/websites/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, myconfig, ... }: +{ lib, pkgs, config, ... }: let www_root = "/run/current-system/webapps/_www"; theme_root = "/run/current-system/webapps/_theme"; @@ -64,15 +64,22 @@ let makeExtraConfig = (builtins.filter (x: x != null) (lib.attrsets.mapAttrsToList (n: v: v.extraConfig or null) apacheConfig)); in { - options.myServices.websites.webappDirs = lib.mkOption { - type = lib.types.attrsOf lib.types.path; - description = '' - Webapp paths to create in /run/current-system/webapps - ''; - default = {}; + options.myServices.websites = { + enable = lib.mkEnableOption "enable websites"; + + webappDirs = lib.mkOption { + type = lib.types.attrsOf lib.types.path; + description = '' + Webapp paths to create in /run/current-system/webapps + ''; + default = {}; + }; }; - config = { + config = lib.mkIf config.myServices.websites.enable { + services.duplyBackup.profiles.php = { + rootDir = "/var/lib/php"; + }; users.users.wwwrun.extraGroups = [ "keys" ]; networking.firewall.allowedTCPPorts = [ 80 443 ]; @@ -107,7 +114,7 @@ in AuthLDAPURL ldap://ldap.immae.eu:389/dc=immae,dc=eu STARTTLS AuthLDAPBindDN cn=httpd,ou=services,dc=immae,dc=eu - AuthLDAPBindPassword "${myconfig.env.httpd.ldap.password}" + AuthLDAPBindPassword "${config.myEnv.httpd.ldap.password}" AuthType Basic AuthName "Authentification requise (Acces LDAP)" AuthBasicProvider ldap @@ -118,7 +125,7 @@ in system.activationScripts = { httpd = '' - install -d -m 0755 ${config.security.acme.directory}/acme-challenge + install -d -m 0755 /var/lib/acme/acme-challenge install -d -m 0750 -o wwwrun -g wwwrun /var/lib/php/sessions ''; }; @@ -147,7 +154,7 @@ in adminAddr = "httpd@immae.eu"; httpdName = "Prod"; ips = - let ips = myconfig.env.servers.eldiron.ips.production; + let ips = config.myEnv.servers.eldiron.ips.production; in [ips.ip4] ++ (ips.ip6 or []); modules = makeModules; extraConfig = makeExtraConfig; @@ -164,7 +171,7 @@ in adminAddr = "httpd@immae.eu"; httpdName = "Inte"; ips = - let ips = myconfig.env.servers.eldiron.ips.integration; + let ips = config.myEnv.servers.eldiron.ips.integration; in [ips.ip4] ++ (ips.ip6 or []); modules = makeModules; extraConfig = makeExtraConfig; @@ -181,7 +188,7 @@ in adminAddr = "httpd@immae.eu"; httpdName = "Tools"; ips = - let ips = myconfig.env.servers.eldiron.ips.main; + let ips = config.myEnv.servers.eldiron.ips.main; in [ips.ip4] ++ (ips.ip6 or []); modules = makeModules; extraConfig = makeExtraConfig ++ @@ -217,8 +224,9 @@ in _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; @@ -231,6 +239,7 @@ in denisejerome.production.enable = true; emilia.production.enable = true; + emilia.richie_production.enable = true; florian.app.enable = true; florian.integration.enable = true; @@ -251,6 +260,7 @@ in telioTortay.production.enable = true; papa.surveillance.enable = true; + papa.maison_bbc.enable = true; piedsjaloux.integration.enable = true; piedsjaloux.production.enable = true;