Updated nginx config; added missing mkIf; added fail2ban to Ophanim's services list.

This commit is contained in:
Kevin Baensch 2019-03-20 04:37:00 +01:00
parent 14332b2c7b
commit 63e40a5a29
4 changed files with 111 additions and 104 deletions

View file

@ -8,14 +8,14 @@ in mkIf (elem "mariaDB" config.machine.services) {
services.mysql = {
enable = true;
package = pkgs.mariadb;
initialDatabases = [ mkIf config.services.gitea.enable {
initialDatabases = if config.services.gitea.enable then [ {
name = "gitea";
schema = pkgs.writeText "gitea.sql"
''
create user if not exists 'git'@'localhost' identified by ${giteapwd};
grant all privileges on gitea.* to 'git'@'localhost' identified by ${giteapwd};
'';
} ];
} ] else [];
};
}