networking = {
firewall = {
enable = true;
- allowedTCPPorts = [ 22 80 443 3306 5432 ];
+ allowedTCPPorts = [ 22 80 443 3306 5432 9418 ];
};
};
AuthorizedKeysCommandUser nobody
'';
+ users.users.wwwrun.extraGroups = [ "gitolite" ];
+
# FIXME: after initial install, need to
# (1) copy rc file (adjust gitolite_ldap_groups.sh)
# (2) (mark old readonly and) sync repos except gitolite-admin
connexionswing_dev = mypkgs.connexionswing_dev.phpFpm.pool;
connexionswing_prod = mypkgs.connexionswing_prod.phpFpm.pool;
nextcloud = mypkgs.nextcloud.phpFpm.pool;
+ mantisbt = mypkgs.mantisbt.phpFpm.pool;
};
};
text = ''
if [ -d /var/lib/gitolite ]; then
ln -sf ${gitolite_ldap_groups} /var/lib/gitolite/gitolite_ldap_groups.sh
+ chmod g+rx /var/lib/gitolite
+ fi
+ if [ -f /var/lib/gitolite/projects.list ]; then
+ chmod g+r /var/lib/gitolite/projects.list
fi
'';
};
source = ldap_authorized_keys;
};
+ services.gitDaemon = {
+ enable = true;
+ user = "gitolite";
+ group = "gitolite";
+ basePath = "${mypkgs.git.web.varDir}/repositories";
+ };
+
services.httpd = let
withSSL = domain: {
enableSSL = true;
mypkgs.connexionswing_dev.apache.modules ++
mypkgs.connexionswing_prod.apache.modules ++
mypkgs.ympd.apache.modules ++
+ mypkgs.git.web.apache.modules ++
+ mypkgs.mantisbt.apache.modules ++
pkgs.lib.lists.flatten (pkgs.lib.attrsets.mapAttrsToList (n: v: v.modules) apacheConfig) ++
[ "macro" ]);
extraConfig = builtins.concatStringsSep "\n"
mypkgs.nextcloud.apache.vhostConf
];
})
+ (withSSL "eldiron" // {
+ listen = [ { ip = "*"; port = 443; } ];
+ hostName = "git.immae.eu";
+ documentRoot = mypkgs.git.web.webRoot;
+ extraConfig = builtins.concatStringsSep "\n" [
+ mypkgs.git.web.apache.vhostConf
+ mypkgs.mantisbt.apache.vhostConf
+ ] + ''
+ RewriteEngine on
+ RewriteCond %{REQUEST_URI} ^/releases
+ RewriteRule /releases(.*) https://release.immae.eu$1 [P,L]
+ '';
+ })
{ # Should go last, default fallback
listen = [ { ip = "*"; port = 80; } ];
hostName = "redirectSSL";
authentication = ''
local all postgres ident
local all all md5
+ host all all samehost md5
host all all 178.33.252.96/32 md5
host all all 188.165.209.148/32 md5
#host all all all pam