]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/tools/tools/default.nix
Add bouya.org and outils.immae.eu domains
[perso/Immae/Config/Nix.git] / nixops / modules / websites / tools / tools / default.nix
index 2060c79156490f7e6ecbc490dbf68bd0e41d94b1..e0181c4f82a9bcd4d616e654fe818334b690ae92 100644 (file)
@@ -80,6 +80,32 @@ in {
       ];
     };
 
+    security.acme.certs."eldiron".extraDomains."outils.immae.eu" = null;
+    services.myWebsites.tools.vhostConfs.outils = {
+      certName = "eldiron";
+      hosts    = [ "outils.immae.eu" ];
+      root     = null;
+      extraConfig = [
+        ''
+        RedirectMatch 301 ^/mediagoblin(.*)$ https://mgoblin.immae.eu$1
+
+        RedirectMatch 301 ^/ether(.*)$       https://ether.immae.eu$1
+
+        RedirectMatch 301 ^/nextcloud(.*)$   https://cloud.immae.eu$1
+        RedirectMatch 301 ^/owncloud(.*)$    https://cloud.immae.eu$1
+
+        RedirectMatch 301 ^/carddavmate(.*)$ https://dav.immae.eu/infcloud$1
+        RedirectMatch 301 ^/caldavzap(.*)$   https://dav.immae.eu/infcloud$1
+        RedirectMatch 301 ^/caldav.php(.*)$  https://dav.immae.eu/caldav.php$1
+        RedirectMatch 301 ^/davical(.*)$     https://dav.immae.eu/davical$1
+
+        RedirectMatch 301 ^/taskweb(.*)$     https://task.immae.eu/taskweb$1
+
+        RedirectMatch 301 ^/(.*)$            https://tools.immae.eu/$1
+        ''
+      ];
+    };
+
     services.myPhpfpm.poolConfigs = {
       adminer = adminer.phpFpm.pool;
       ttrss = ttrss.phpFpm.pool;
@@ -118,6 +144,18 @@ in {
       dokuwiki = dokuwiki.activationScript;
     };
 
+    system.extraSystemBuilderCmds = ''
+      mkdir -p $out/webapps
+      ln -s ${dokuwiki.webRoot} $out/webapps/${dokuwiki.apache.webappName}
+      ln -s ${ldap.webRoot}/htdocs $out/webapps/${ldap.apache.webappName}
+      ln -s ${rompr.webRoot} $out/webapps/${rompr.apache.webappName}
+      ln -s ${roundcubemail.webRoot} $out/webapps/${roundcubemail.apache.webappName}
+      ln -s ${shaarli.webRoot} $out/webapps/${shaarli.apache.webappName}
+      ln -s ${ttrss.webRoot} $out/webapps/${ttrss.apache.webappName}
+      ln -s ${wallabag.webRoot} $out/webapps/${wallabag.apache.webappName}
+      ln -s ${yourls.webRoot} $out/webapps/${yourls.apache.webappName}
+      '';
+
     nixpkgs.config.packageOverrides = oldpkgs: rec {
       ympd = oldpkgs.ympd.overrideAttrs(old: mylibs.fetchedGithub ./ympd.json);
     };