services.myWebsites.tools.vhostConfs.cloud = {
certName = "eldiron";
hosts = ["cloud.immae.eu" ];
- root = nextcloud.webRoot;
+ root = nextcloud.apache.root;
extraConfig = [
nextcloud.apache.vhostConf
];
in [ occ ];
system.activationScripts.nextcloud = nextcloud.activationScript;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${nextcloud.webRoot} $out/webapps/${nextcloud.apache.webappName}
+ '';
services.myPhpfpm = {
poolPhpConfigs.nextcloud = nextcloud.phpFpm.phpConfig;
fi
'';
};
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "tools_nextcloud";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
- <Directory ${webRoot}>
+ <Directory ${root}>
AcceptPathInfo On
DirectoryIndex index.php
Options FollowSymlinks
buildInputs = [ gettext ];
};
webRoot = "${webapp}/htdocs";
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "tools_davical";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
- Alias /davical "${webRoot}"
- Alias /caldav.php "${webRoot}/caldav.php"
- <Directory "${webRoot}">
+ Alias /davical "${root}"
+ Alias /caldav.php "${root}/caldav.php"
+ <Directory "${root}">
DirectoryIndex index.php index.html
AcceptPathInfo On
AllowOverride None
davical = davical.phpFpm.pool;
};
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${davical.webRoot} $out/webapps/${davical.apache.webappName}
+ ln -s ${infcloud.webRoot} $out/webapps/${infcloud.apache.webappName}
+ '';
};
}
'';
buildInputs = [ ed ];
};
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
+ webappName = "tools_infcloud";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
- Alias /carddavmate ${webRoot}
- Alias /caldavzap ${webRoot}
- Alias /infcloud ${webRoot}
- <Directory ${webRoot}>
+ Alias /carddavmate ${root}
+ Alias /caldavzap ${root}
+ Alias /infcloud ${root}
+ <Directory ${root}>
AllowOverride All
Options FollowSymlinks
Require all granted
env = myconfig.env.tools.diaspora;
};
+ root = "/run/current-system/webapps/tools_diaspora";
cfg = config.services.myWebsites.tools.diaspora;
in {
options.services.myWebsites.tools.diaspora = {
"headers" "proxy" "proxy_http"
];
security.acme.certs."eldiron".extraDomains."diaspora.immae.eu" = null;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${diaspora.railsRoot}/public/ $out/webapps/tools_diaspora
+ '';
services.myWebsites.tools.vhostConfs.diaspora = {
certName = "eldiron";
hosts = [ "diaspora.immae.eu" ];
- root = "${diaspora.railsRoot}/public/";
+ root = root;
extraConfig = [ ''
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
Require all granted
</Proxy>
- <Directory ${diaspora.railsRoot}/public>
+ <Directory ${root}>
Require all granted
Options -MultiViews
</Directory>
services.myWebsites.tools.modules =
gitweb.apache.modules ++
mantisbt.apache.modules;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${gitweb.webRoot} $out/webapps/${gitweb.apache.webappName}
+ ln -s ${mantisbt.webRoot} $out/webapps/${mantisbt.apache.webappName}
+ '';
services.myWebsites.tools.vhostConfs.git = {
certName = "eldiron";
hosts = ["git.immae.eu" ];
- root = gitweb.webRoot;
+ root = gitweb.apache.root;
extraConfig = [
gitweb.apache.vhostConf
mantisbt.apache.vhostConf
$project_list_default_category = "__Others__";
$highlight_bin = "${highlight}/bin/highlight";
'';
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "cgid" ];
+ webappName = "tools_gitweb";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
SetEnv GIT_PROJECT_ROOT ${varDir}/repositories/
ScriptAliasMatch \
git-(upload|receive)-pack))$" \
${git}/libexec/git-core/git-http-backend/$1
- <Directory "${gitolite}">
- Require all granted
- </Directory>
<Directory "${git}/libexec/git-core">
Require all granted
</Directory>
- <Directory "${webRoot}">
+ <Directory "${root}">
DirectoryIndex gitweb.cgi
Require all granted
AllowOverride None
ln -s ${plugins.source-integration}/Source* $out/plugins/
'';
};
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "tools_mantisbt";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
- Alias /mantisbt "${webRoot}"
- <Directory "${webRoot}">
+ Alias /mantisbt "${root}"
+ <Directory "${root}">
DirectoryIndex index.php
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
Options FollowSymlinks
Require all granted
</Directory>
- <Directory "${webRoot}/admin">
+ <Directory "${root}/admin">
#Reenable during upgrade
Require all denied
</Directory>
env = myconfig.env.tools.mastodon;
};
+ root = "/run/current-system/webapps/tools_mastodon";
cfg = config.services.myWebsites.tools.mastodon;
in {
options.services.myWebsites.tools.mastodon = {
"headers" "proxy" "proxy_wstunnel" "proxy_http"
];
security.acme.certs."eldiron".extraDomains."mastodon.immae.eu" = null;
+ system.extraSystemBuilderCmds = ''
+ mkdir -p $out/webapps
+ ln -s ${mastodon.railsRoot}/public/ $out/webapps/tools_mastodon
+ '';
services.myWebsites.tools.vhostConfs.mastodon = {
certName = "eldiron";
hosts = ["mastodon.immae.eu" ];
- root = "${mastodon.railsRoot}/public/";
+ root = root;
extraConfig = [ ''
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set Strict-Transport-Security "max-age=31536000"
Options -MultiViews
</Directory>
- <Directory ${mastodon.railsRoot}/public/>
+ <Directory ${root}>
Require all granted
Options -MultiViews +FollowSymlinks
</Directory>
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);
};
)}
'';
});
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "tools_dokuwiki";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
- Alias /dokuwiki "${webRoot}"
- <Directory "${webRoot}">
+ Alias /dokuwiki "${root}"
+ <Directory "${root}">
DirectoryIndex index.php
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
ln -sf ${config} $out/config/config.php
'';
};
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "tools_ldap";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
- Alias /ldap "${webRoot}/htdocs"
- <Directory "${webRoot}/htdocs">
+ Alias /ldap "${root}"
+ <Directory "${root}">
DirectoryIndex index.php
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
ln -sf ../../../../../../${varDir}/albumart $out/albumart
'';
});
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "headers" "mime" "proxy_fcgi" ];
+ webappName = "tools_rompr";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
- Alias /rompr ${webRoot}
+ Alias /rompr ${root}
- <Directory ${webRoot}>
+ <Directory ${root}>
Options Indexes FollowSymLinks
DirectoryIndex index.php
AllowOverride all
</FilesMatch>
</Directory>
- <Directory ${webRoot}/albumart/small>
+ <Directory ${root}/albumart/small>
Header Set Cache-Control "max-age=0, no-store"
Header Set Cache-Control "no-cache, must-revalidate"
</Directory>
- <Directory ${webRoot}/albumart/asdownloaded>
+ <Directory ${root}/albumart/asdownloaded>
Header Set Cache-Control "max-age=0, no-store"
Header Set Cache-Control "no-cache, must-revalidate"
</Directory>
)}
'';
};
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "tools_roundcubemail";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
- Alias /roundcube "${webRoot}"
- <Directory "${webRoot}">
+ Alias /roundcube "${root}"
+ <Directory "${root}">
DirectoryIndex index.php
AllowOverride All
Options FollowSymlinks
${varDir}/phpSessions
'';
webRoot = shaarli;
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" "rewrite" "env" ];
+ webappName = "tools_shaarli";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
- Alias /Shaarli "${webRoot}"
+ Alias /Shaarli "${root}"
- <Directory "${webRoot}">
+ <Directory "${root}">
SetEnv SHAARLI_LDAP_PASSWORD "${env.ldap.password}"
SetEnv SHAARLI_LDAP_DN "${env.ldap.dn}"
SetEnv SHAARLI_LDAP_HOST "ldaps://${env.ldap.host}"
)}
'';
});
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "tools_ttrss";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
- Alias /ttrss "${webRoot}"
- <Directory "${webRoot}">
+ Alias /ttrss "${root}"
+ <Directory "${root}">
DirectoryIndex index.php
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
webRoot = "${webappDir}/web";
# Domain migration: Table wallabag_entry contains whole
# https://tools.immae.eu/wallabag domain name in preview_picture
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "tools_wallabag";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
- Alias /wallabag "${webRoot}"
- <Directory "${webRoot}">
+ Alias /wallabag "${root}"
+ <Directory "${root}">
AllowOverride None
Require all granted
# For OAuth (apps)
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
</Directory>
- <Directory "${webRoot}/bundles">
+ <Directory "${root}/bundles">
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>
)}
'';
});
- apache = {
+ apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
+ webappName = "tools_yourls";
+ root = "/run/current-system/webapps/${webappName}";
vhostConf = ''
- Alias /url "${webRoot}"
- <Directory "${webRoot}">
+ Alias /url "${root}"
+ <Directory "${root}">
<FilesMatch "\.php$">
SetHandler "proxy:unix:${phpFpm.socket}|fcgi://localhost"
</FilesMatch>