about summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-09-12 22:49:43 +0200
committerJan Tojnar <jtojnar@gmail.com>2019-09-12 22:49:43 +0200
commita441eaa7b16ee0e264f74303ef36e37ecb3fe9dc (patch)
treec8dee9fa804b516d2447f816359e8f15b3d85110 /pkgs/servers
parent20c7a35429c4882227f1fb9788aeebc7c12726bf (diff)
parent7d39ecdf58cc000013e4bf05d9c2f32ab4bf93a7 (diff)
downloadnixlib-a441eaa7b16ee0e264f74303ef36e37ecb3fe9dc.tar
nixlib-a441eaa7b16ee0e264f74303ef36e37ecb3fe9dc.tar.gz
nixlib-a441eaa7b16ee0e264f74303ef36e37ecb3fe9dc.tar.bz2
nixlib-a441eaa7b16ee0e264f74303ef36e37ecb3fe9dc.tar.lz
nixlib-a441eaa7b16ee0e264f74303ef36e37ecb3fe9dc.tar.xz
nixlib-a441eaa7b16ee0e264f74303ef36e37ecb3fe9dc.tar.zst
nixlib-a441eaa7b16ee0e264f74303ef36e37ecb3fe9dc.zip
Merge branch 'staging-next' into staging
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/echoip/default.nix20
-rw-r--r--pkgs/servers/echoip/deps.nix74
-rw-r--r--pkgs/servers/home-assistant/default.nix4
-rw-r--r--pkgs/servers/mail/mailman/settings.py512
-rw-r--r--pkgs/servers/mail/mailman/urls.py34
-rw-r--r--pkgs/servers/mail/mailman/web.nix37
-rw-r--r--pkgs/servers/mail/mailman/wsgi.py17
-rw-r--r--pkgs/servers/matrix-synapse/default.nix1
-rw-r--r--pkgs/servers/mautrix-telegram/default.nix1
-rw-r--r--pkgs/servers/mirrorbits/default.nix5
-rw-r--r--pkgs/servers/monitoring/plugins/labs_consol_de.nix24
-rw-r--r--pkgs/servers/monitoring/prometheus/blackbox-exporter.nix4
-rw-r--r--pkgs/servers/prayer/default.nix17
-rw-r--r--pkgs/servers/routinator/default.nix6
-rw-r--r--pkgs/servers/sql/postgresql/ext/repmgr.nix30
-rw-r--r--pkgs/servers/sql/postgresql/packages.nix2
-rw-r--r--pkgs/servers/web-apps/moodle/default.nix4
17 files changed, 681 insertions, 111 deletions
diff --git a/pkgs/servers/echoip/default.nix b/pkgs/servers/echoip/default.nix
index d55eb1d0bbdf..b3402933f9fe 100644
--- a/pkgs/servers/echoip/default.nix
+++ b/pkgs/servers/echoip/default.nix
@@ -1,25 +1,23 @@
-{ lib, buildGoPackage, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub }:
 
-buildGoPackage {
+buildGoModule {
   pname = "echoip";
-  version = "unstable-2018-11-20";
-
-  goPackagePath = "github.com/mpolden/echoip";
+  version = "unstable-2019-07-12";
 
   src = fetchFromGitHub {
     owner = "mpolden";
     repo = "echoip";
-    rev = "4bfaf671b9f75a7b2b37543b2991401cbf57f1f0";
-    sha256 = "0n5d9i8cc5lqgy5apqd3zhyl3h1xjacf612z8xpvbm75jnllcvxy";
+    rev = "fb5fac92d2173c2a5b07ed4ecc7b5fefe8484ed2";
+    sha256 = "17gkh1qfxasvxy25lmjdwk5fsjkcp7lmw9si3xzf01m7qnj5zi4b";
   };
 
-  goDeps = ./deps.nix;
+  modSha256 = "025p891klwpid5fw4z39fimgfkwgkcwqpn5276hflzdp1hfv35ly";
 
-  outputs = [ "bin" "out" ];
+  outputs = [ "out" "index" ];
 
   postInstall = ''
-    mkdir -p $out
-    cp $src/index.html $out/index.html
+    mkdir -p $index
+    cp $src/index.html $index/index.html
   '';
 
   meta = with lib; {
diff --git a/pkgs/servers/echoip/deps.nix b/pkgs/servers/echoip/deps.nix
deleted file mode 100644
index 4e4f0799bdae..000000000000
--- a/pkgs/servers/echoip/deps.nix
+++ /dev/null
@@ -1,74 +0,0 @@
-# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
-[
-
-  {
-    goPackagePath = "github.com/davecgh/go-spew";
-    fetch = {
-      type = "git";
-      url = "https://github.com/davecgh/go-spew";
-      rev = "v1.1.1";
-      sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y";
-    };
-  }
-
-  {
-    goPackagePath = "github.com/jessevdk/go-flags";
-    fetch = {
-      type = "git";
-      url = "https://github.com/jessevdk/go-flags";
-      rev = "v1.4.0";
-      sha256 = "0algnnigph27spgn655zm4723yfjxjjvlf4k14z9drj3682df25a";
-    };
-  }
-
-  {
-    goPackagePath = "github.com/oschwald/geoip2-golang";
-    fetch = {
-      type = "FromGitHub";
-      owner = "oschwald";
-      repo = "geoip2-golang";
-      rev = "v1.2.1";
-      sha256 = "0zpgpz577rghvgis6ji9l99pq87z5izbgzmnbyn3dy533bayrgpw";
-    };
-  }
-
-  {
-    goPackagePath = "github.com/oschwald/maxminddb-golang";
-    fetch = {
-      type = "git";
-      url = "https://github.com/oschwald/maxminddb-golang";
-      rev = "v1.2.1";
-      sha256 = "0nlip5a2yiig0sv9y3ky4kn8730236wal3zjcs4yfgnw6nxl3rjr";
-    };
-  }
-
-  {
-    goPackagePath = "github.com/pmezard/go-difflib";
-    fetch = {
-      type = "git";
-      url = "https://github.com/pmezard/go-difflib";
-      rev = "v1.0.0";
-      sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
-    };
-  }
-
-  {
-    goPackagePath = "github.com/stretchr/testify";
-    fetch = {
-      type = "git";
-      url = "https://github.com/stretchr/testify";
-      rev = "v1.2.2";
-      sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs";
-    };
-  }
-
-  {
-    goPackagePath = "golang.org/x/sys";
-    fetch = {
-      type = "git";
-      url = "https://go.googlesource.com/sys";
-      rev = "37707fdb30a5";
-      sha256 = "1abrr2507a737hdqv4q7pw7hv6ls9pdiq9crhdi52r3gcz6hvizg";
-    };
-  }
-]
diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix
index 43633b07818f..30e4b99ccbcf 100644
--- a/pkgs/servers/home-assistant/default.nix
+++ b/pkgs/servers/home-assistant/default.nix
@@ -65,10 +65,6 @@ let
       };
     })
 
-    (self: super: {
-      pyyaml = super.pyyaml_3;
-    })
-
     # hass-frontend does not exist in python3.pkgs
     (self: super: {
       hass-frontend = self.callPackage ./frontend.nix { };
diff --git a/pkgs/servers/mail/mailman/settings.py b/pkgs/servers/mail/mailman/settings.py
new file mode 100644
index 000000000000..5f246db41ad1
--- /dev/null
+++ b/pkgs/servers/mail/mailman/settings.py
@@ -0,0 +1,512 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 1998-2019 by the Free Software Foundation, Inc.
+#
+# This file is part of Postorius.
+#
+# Postorius is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# Postorius is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Postorius.  If not, see <http://www.gnu.org/licenses/>.
+
+"""
+Django settings for postorius project.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.9/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/1.9/ref/settings/
+"""
+
+# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
+import os
+
+# Compatibility with Bootstrap 3
+from django.contrib.messages import constants as messages
+
+
+BASE_DIR = os.path.dirname(os.path.abspath(__file__))
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = '$!-7^wl#wiifjbh)5@f7ji%x!vp7s1vzbvwt26hxv$idixq0u0'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = False
+
+ADMINS = (
+    #('Admin', 'webmaster@example.com'),
+)
+
+SITE_ID = 1
+
+# Hosts/domain names that are valid for this site; required if DEBUG is False
+# See https://docs.djangoproject.com/en/1.8/ref/settings/#allowed-hosts
+ALLOWED_HOSTS = [
+    "localhost",  # Archiving API from Mailman, keep it.
+    "127.0.0.1",
+    # Add here all production URLs you may have.
+    @ALLOWED_HOSTS@
+]
+
+# Mailman API credentials
+MAILMAN_REST_API_URL = 'http://localhost:8001'
+MAILMAN_REST_API_USER = 'restadmin'
+MAILMAN_REST_API_PASS = 'restpass'
+MAILMAN_ARCHIVER_KEY = "@ARCHIVER_KEY@"
+MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
+
+# Application definition
+
+INSTALLED_APPS = (
+    'hyperkitty',
+    'postorius',
+    'django_mailman3',
+    # Uncomment the next line to enable the admin:
+    'django.contrib.admin',
+    # Uncomment the next line to enable admin documentation:
+    # 'django.contrib.admindocs',
+    'django.contrib.auth',
+    'django.contrib.contenttypes',
+    'django.contrib.sessions',
+    'django.contrib.sites',
+    'django.contrib.messages',
+    'django.contrib.staticfiles',
+    'rest_framework',
+    'django_gravatar',
+    'compressor',
+    'haystack',
+    'django_extensions',
+    'django_q',
+    'allauth',
+    'allauth.account',
+    'allauth.socialaccount',
+    'django_mailman3.lib.auth.fedora',
+    'allauth.socialaccount.providers.openid',
+    'allauth.socialaccount.providers.github',
+    'allauth.socialaccount.providers.gitlab',
+    'allauth.socialaccount.providers.google',
+   #'allauth.socialaccount.providers.facebook',
+   #'allauth.socialaccount.providers.twitter',
+    'allauth.socialaccount.providers.stackexchange',
+)
+
+
+MIDDLEWARE = (
+    'django.middleware.security.SecurityMiddleware',
+    'django.contrib.sessions.middleware.SessionMiddleware',
+    'django.middleware.common.CommonMiddleware',
+    'django.middleware.csrf.CsrfViewMiddleware',
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.contrib.messages.middleware.MessageMiddleware',
+    'django.middleware.clickjacking.XFrameOptionsMiddleware',
+    'django_mailman3.middleware.TimezoneMiddleware',
+)
+
+ROOT_URLCONF = 'urls'
+
+
+TEMPLATES = [
+    {
+        'BACKEND': 'django.template.backends.django.DjangoTemplates',
+        'DIRS': [],
+        'APP_DIRS': True,
+        'OPTIONS': {
+            'context_processors': [
+                'django.template.context_processors.debug',
+                'django.template.context_processors.i18n',
+                'django.template.context_processors.media',
+                'django.template.context_processors.static',
+                'django.template.context_processors.tz',
+                'django.template.context_processors.csrf',
+                'django.template.context_processors.request',
+                'django.contrib.auth.context_processors.auth',
+                'django.contrib.messages.context_processors.messages',
+                'django_mailman3.context_processors.common',
+                'hyperkitty.context_processors.common',
+            ],
+        },
+    },
+]
+
+WSGI_APPLICATION = 'wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
+
+DATABASES = {
+    'default': {
+        'ENGINE': 'django.db.backends.sqlite3',
+        'NAME': '/var/lib/mailman-web/mailman-web.db'
+    }
+}
+
+# Password validation
+# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
+
+AUTH_PASSWORD_VALIDATORS = [
+    {
+        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
+    },
+    {
+        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
+    },
+    {
+        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
+    },
+    {
+        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
+    },
+]
+
+
+# If you're behind a proxy, use the X-Forwarded-Host header
+# See https://docs.djangoproject.com/en/1.8/ref/settings/#use-x-forwarded-host
+# USE_X_FORWARDED_HOST = True
+
+# And if your proxy does your SSL encoding for you, set SECURE_PROXY_SSL_HEADER
+# https://docs.djangoproject.com/en/1.8/ref/settings/#secure-proxy-ssl-header
+# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
+# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_SCHEME', 'https')
+
+# Other security settings
+# SECURE_SSL_REDIRECT = True
+# If you set SECURE_SSL_REDIRECT to True, make sure the SECURE_REDIRECT_EXEMPT
+# contains at least this line:
+# SECURE_REDIRECT_EXEMPT = [
+#     "archives/api/mailman/.*",  # Request from Mailman.
+#     ]
+# SESSION_COOKIE_SECURE = True
+# SECURE_CONTENT_TYPE_NOSNIFF = True
+# SECURE_BROWSER_XSS_FILTER = True
+# CSRF_COOKIE_SECURE = True
+# CSRF_COOKIE_HTTPONLY = True
+# X_FRAME_OPTIONS = 'DENY'
+
+
+# Internationalization
+# https://docs.djangoproject.com/en/1.9/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_L10N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/1.9/howto/static-files/
+
+
+# Absolute path to the directory static files should be collected to.
+# Don't put anything in this directory yourself; store your static files
+# in apps' "static/" subdirectories and in STATICFILES_DIRS.
+# Example: "/var/www/example.com/static/"
+STATIC_ROOT = 'static'
+
+# URL prefix for static files.
+# Example: "http://example.com/static/", "http://static.example.com/"
+STATIC_URL = '/static/'
+
+# Additional locations of static files
+STATICFILES_DIRS = (
+    # Put strings here, like "/home/html/static" or "C:/www/django/static".
+    # Always use forward slashes, even on Windows.
+    # Don't forget to use absolute paths, not relative paths.
+    # BASE_DIR + '/static/',
+)
+
+# List of finder classes that know how to find static files in
+# various locations.
+STATICFILES_FINDERS = (
+    'django.contrib.staticfiles.finders.FileSystemFinder',
+    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
+    # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
+    'compressor.finders.CompressorFinder',
+)
+
+# Django 1.6+ defaults to a JSON serializer, but it won't work with
+# django-openid, see
+# https://bugs.launchpad.net/django-openid-auth/+bug/1252826
+SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
+
+
+LOGIN_URL = 'account_login'
+LOGIN_REDIRECT_URL = 'hk_root'
+LOGOUT_URL = 'account_logout'
+
+
+# If you enable internal authentication, this is the address that the emails
+# will appear to be coming from. Make sure you set a valid domain name,
+# otherwise the emails may get rejected.
+# https://docs.djangoproject.com/en/1.8/ref/settings/#default-from-email
+DEFAULT_FROM_EMAIL = "@SERVER_EMAIL@"
+
+# If you enable email reporting for error messages, this is where those emails
+# will appear to be coming from. Make sure you set a valid domain name,
+# otherwise the emails may get rejected.
+# https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-SERVER_EMAIL
+SERVER_EMAIL = "@SERVER_EMAIL@"
+
+
+MESSAGE_TAGS = {
+    messages.ERROR: 'danger'
+}
+
+
+#
+# Social auth
+#
+AUTHENTICATION_BACKENDS = (
+    'django.contrib.auth.backends.ModelBackend',
+    'allauth.account.auth_backends.AuthenticationBackend',
+)
+
+# Django Allauth
+ACCOUNT_AUTHENTICATION_METHOD = "username_email"
+ACCOUNT_EMAIL_REQUIRED = True
+ACCOUNT_EMAIL_VERIFICATION = "mandatory"
+ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
+ACCOUNT_UNIQUE_EMAIL  = True
+
+SOCIALACCOUNT_PROVIDERS = {
+    'openid': {
+        'SERVERS': [
+            dict(id='yahoo',
+                 name='Yahoo',
+                 openid_url='http://me.yahoo.com'),
+        ],
+    },
+    'google': {
+        'SCOPE': ['profile', 'email'],
+        'AUTH_PARAMS': {'access_type': 'online'},
+    },
+    'facebook': {
+       'METHOD': 'oauth2',
+       'SCOPE': ['email'],
+       'FIELDS': [
+           'email',
+           'name',
+           'first_name',
+           'last_name',
+           'locale',
+           'timezone',
+           ],
+       'VERSION': 'v2.4',
+    },
+    'gitlab': {
+        'GITLAB_URL': 'https://gitlab.com',
+        'SCOPE': ['read_user'],
+    },
+}
+
+
+#
+# Gravatar
+# https://github.com/twaddington/django-gravatar
+#
+# Gravatar base url.
+# GRAVATAR_URL = 'http://cdn.libravatar.org/'
+# Gravatar base secure https url.
+# GRAVATAR_SECURE_URL = 'https://seccdn.libravatar.org/'
+# Gravatar size in pixels.
+# GRAVATAR_DEFAULT_SIZE = '80'
+# An image url or one of the following: 'mm', 'identicon', 'monsterid',
+# 'wavatar', 'retro'.
+# GRAVATAR_DEFAULT_IMAGE = 'mm'
+# One of the following: 'g', 'pg', 'r', 'x'.
+# GRAVATAR_DEFAULT_RATING = 'g'
+# True to use https by default, False for plain http.
+# GRAVATAR_DEFAULT_SECURE = True
+
+# These can be set to override the defaults but are not mandatory:
+# EMAIL_CONFIRMATION_TEMPLATE = 'postorius/address_confirmation_message.txt'
+# EMAIL_CONFIRMATION_SUBJECT = 'Confirmation needed'
+
+#
+# django-compressor
+# https://pypi.python.org/pypi/django_compressor
+#
+COMPRESS_PRECOMPILERS = (
+   ('text/x-scss', '/run/current-system/sw/bin/sassc -t compressed {infile} {outfile}'),
+   ('text/x-sass', '/run/current-system/sw/bin/sassc -t compressed {infile} {outfile}'),
+)
+# On a production setup, setting COMPRESS_OFFLINE to True will bring a
+# significant performance improvement, as CSS files will not need to be
+# recompiled on each requests. It means running an additional "compress"
+# management command after each code upgrade.
+# http://django-compressor.readthedocs.io/en/latest/usage/#offline-compression
+COMPRESS_ENABLED = True
+COMPRESS_OFFLINE = True
+
+# Needed for debug mode
+# INTERNAL_IPS = ('127.0.0.1',)
+
+
+#
+# Full-text search engine
+#
+HAYSTACK_CONNECTIONS = {
+    'default': {
+        'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
+        'PATH': "/var/lib/mailman-web/fulltext_index",
+        # You can also use the Xapian engine, it's faster and more accurate,
+        # but requires another library.
+        # http://django-haystack.readthedocs.io/en/v2.4.1/installing_search_engines.html#xapian
+        # Example configuration for Xapian:
+        #'ENGINE': 'xapian_backend.XapianEngine'
+    },
+}
+
+
+#
+# REST framework
+#
+REST_FRAMEWORK = {
+    'PAGE_SIZE': 10,
+    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
+    'DEFAULT_FILTER_BACKENDS': (
+        'rest_framework.filters.OrderingFilter',
+    ),
+}
+
+
+#
+# Asynchronous tasks
+#
+Q_CLUSTER = {
+    'timeout': 300,
+    'save_limit': 100,
+    'orm': 'default',
+}
+
+
+# A sample logging configuration. The only tangible logging
+# performed by this configuration is to send an email to
+# the site admins on every HTTP 500 error when DEBUG=False.
+# See http://docs.djangoproject.com/en/dev/topics/logging for
+# more details on how to customize your logging configuration.
+LOGGING = {
+    'version': 1,
+    'disable_existing_loggers': False,
+    'filters': {
+        'require_debug_false': {
+            '()': 'django.utils.log.RequireDebugFalse'
+        }
+    },
+    'handlers': {
+        'console': {
+            'class': 'logging.StreamHandler',
+            'formatter': 'simple',
+        },
+        'mail_admins': {
+            'level': 'ERROR',
+            'filters': ['require_debug_false'],
+            'class': 'django.utils.log.AdminEmailHandler'
+        },
+        'file':{
+            'level': 'INFO',
+            #'class': 'logging.handlers.RotatingFileHandler',
+            'class': 'logging.handlers.WatchedFileHandler',
+            'filename': 'mailman-web.log',
+            'formatter': 'verbose',
+        },
+    },
+    'loggers': {
+        'django': {
+            'handlers': ['console', 'file'],
+            'level': 'INFO',
+        },
+        'django.request': {
+            'handlers': ['console', 'mail_admins', 'file'],
+            'level': 'ERROR',
+            'propagate': True,
+        },
+        'postorius': {
+            'handlers': ['console', 'file'],
+            'level': 'INFO',
+        },
+        'django': {
+            'handlers': ['file'],
+            'level': 'ERROR',
+            'propagate': True,
+        },
+        'hyperkitty': {
+            'handlers': ['file'],
+            'level': 'DEBUG',
+            'propagate': True,
+        },
+    },
+    'formatters': {
+        'simple': {
+            'format': '%(levelname)s: %(message)s'
+        },
+        'verbose': {
+            'format': '%(levelname)s %(asctime)s %(process)d %(name)s %(message)s'
+        },
+        'simple': {
+            'format': '%(levelname)s %(message)s'
+        },
+    },
+    #'root': {
+    #    'handlers': ['file'],
+    #    'level': 'INFO',
+    #},
+}
+
+
+POSTORIUS_TEMPLATE_BASE_URL = "http://localhost:8000"
+
+
+# Using the cache infrastructure can significantly improve performance on a
+# production setup. This is an example with a local Memcached server.
+#CACHES = {
+#    'default': {
+#        'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
+#        'LOCATION': '127.0.0.1:11211',
+#    }
+#}
+
+
+# When DEBUG is True, don't actually send emails to the SMTP server, just store
+# them in a directory. This way you won't accidentally spam your mailing-lists
+# while you're fiddling with the code.
+if DEBUG == True:
+    EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
+    EMAIL_FILE_PATH = '/tmp/hyperkitty-emails'
+
+
+#
+# HyperKitty-specific
+#
+# Only display mailing-lists from the same virtual host as the webserver
+FILTER_VHOST = False
+# Disable singleton locking for Django-Q tasks.
+HYPERKITTY_DISABLE_SINGLETON_TASKS = False
+# Maximum time between two task runs with same function and arguments.
+# This setting is mostly meant for Mailman Developers and should be used
+# with caution.
+# Default set to 10mins.
+HYPERKITTY_TASK_LOCK_TIMEOUT = 10 * 60
+
+
+try:
+    from settings_local import *
+except ImportError:
+    pass
diff --git a/pkgs/servers/mail/mailman/urls.py b/pkgs/servers/mail/mailman/urls.py
new file mode 100644
index 000000000000..9e18da2a218a
--- /dev/null
+++ b/pkgs/servers/mail/mailman/urls.py
@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 1998-2019 by the Free Software Foundation, Inc.
+#
+# This file is part of Postorius.
+#
+# Postorius is free software: you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option)
+# any later version.
+#
+# Postorius is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Postorius.  If not, see <http://www.gnu.org/licenses/>.
+
+
+from django.conf.urls import include, url
+from django.contrib import admin
+from django.urls import reverse_lazy
+from django.views.generic import RedirectView
+
+
+urlpatterns = [
+    url(r'^$', RedirectView.as_view(url=reverse_lazy('hk_root'))),
+    url(r'^hyperkitty/', include('hyperkitty.urls')),
+    url(r'^postorius/', include('postorius.urls')),
+    url(r'', include('django_mailman3.urls')),
+    url(r'^accounts/', include('allauth.urls')),
+    # Django admin
+    url(r'^admin/', admin.site.urls),
+]
diff --git a/pkgs/servers/mail/mailman/web.nix b/pkgs/servers/mail/mailman/web.nix
new file mode 100644
index 000000000000..b0ead765a605
--- /dev/null
+++ b/pkgs/servers/mail/mailman/web.nix
@@ -0,0 +1,37 @@
+{ stdenv, python, hyperkitty, postorius, buildPythonPackage
+, serverEMail ? "postmaster@example.org"
+, archiverKey ? "SecretArchiverAPIKey"
+, allowedHosts ? []
+}:
+
+let
+
+  allowedHostsString = stdenv.lib.concatMapStringsSep ", " (x: "\""+x+"\"") allowedHosts;
+
+in
+
+# We turn those Djando configuration files into a make-shift Python library so
+# that Nix users can use this package as a part of their buildInputs to import
+# the code. Also, this package implicitly provides an environment in which the
+# Django app can be run.
+
+buildPythonPackage {
+  name = "mailman-web-0";
+
+  propagatedBuildInputs = [ hyperkitty postorius ];
+
+  unpackPhase = ":";
+  buildPhase = ":";
+  setuptoolsCheckPhase = ":";
+
+  installPhase = ''
+    d=$out/${python.sitePackages}
+    install -D -m 444 ${./urls.py} $d/urls.py
+    install -D -m 444 ${./wsgi.py} $d/wsgi.py
+    substitute ${./settings.py} $d/settings.py \
+      --subst-var-by SERVER_EMAIL '${serverEMail}' \
+      --subst-var-by ARCHIVER_KEY '${archiverKey}' \
+      --subst-var-by ALLOWED_HOSTS '${allowedHostsString}'
+    chmod 444 $d/settings.py
+  '';
+}
diff --git a/pkgs/servers/mail/mailman/wsgi.py b/pkgs/servers/mail/mailman/wsgi.py
new file mode 100644
index 000000000000..5bdbc5114739
--- /dev/null
+++ b/pkgs/servers/mail/mailman/wsgi.py
@@ -0,0 +1,17 @@
+"""
+WSGI config for meh project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
+"""
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
+
+application = get_wsgi_application()
diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix
index 8da9cef58a75..ab9a69afdcb8 100644
--- a/pkgs/servers/matrix-synapse/default.nix
+++ b/pkgs/servers/matrix-synapse/default.nix
@@ -36,6 +36,7 @@ in buildPythonApplication rec {
   ];
 
   propagatedBuildInputs = [
+    setuptools
     bcrypt
     bleach
     canonicaljson
diff --git a/pkgs/servers/mautrix-telegram/default.nix b/pkgs/servers/mautrix-telegram/default.nix
index 7499f203136c..5ee491a0b8a0 100644
--- a/pkgs/servers/mautrix-telegram/default.nix
+++ b/pkgs/servers/mautrix-telegram/default.nix
@@ -28,6 +28,7 @@ buildPythonPackage rec {
     telethon-session-sqlalchemy
     pillow
     lxml
+    setuptools
   ];
 
   # `alembic` (a database migration tool) is only needed for the initial setup,
diff --git a/pkgs/servers/mirrorbits/default.nix b/pkgs/servers/mirrorbits/default.nix
index 48817f76bdae..0761468bd1ff 100644
--- a/pkgs/servers/mirrorbits/default.nix
+++ b/pkgs/servers/mirrorbits/default.nix
@@ -24,6 +24,11 @@ buildGoPackage rec {
     rm -rf testing
   '';
 
+  # Fix build with go >=1.12
+  preBuild = ''
+    sed -i s/"_Ctype_struct_GeoIPRecordTag"/"C.struct_GeoIPRecordTag"/ ./go/src/github.com/etix/geoip/geoip.go
+  '';
+
   goPackagePath = "github.com/etix/mirrorbits";
   goDeps = ./deps.nix;
 
diff --git a/pkgs/servers/monitoring/plugins/labs_consol_de.nix b/pkgs/servers/monitoring/plugins/labs_consol_de.nix
index 744e333594c8..b09990e31209 100644
--- a/pkgs/servers/monitoring/plugins/labs_consol_de.nix
+++ b/pkgs/servers/monitoring/plugins/labs_consol_de.nix
@@ -5,18 +5,16 @@ let
   glplugin = fetchFromGitHub {
     owner = "lausser";
     repo   = "GLPlugin";
-    rev    = "e8e1a2907a54435c932b3e6c584ba1d679754849";
-    sha256 = "0wb55a9pmgbilfffx0wkiikg9830qd66j635ypczqp4basslpq5b";
+    rev    = "ef3107f01afe55fad5452e64ac5bbea00b18a8d5";
+    sha256 = "047fwrycsl2vmpi4wl46fs6f8y191d6qc9ms5rvmrj1dm2r828ws";
   };
 
   generic = { pname, version, sha256, description, buildInputs, ... }:
-  let
-    name' = "${stdenv.lib.replaceStrings [ "-" ] [ "_" ] pname}-${version}";
-  in stdenv.mkDerivation {
-    name = "${pname}-${version}";
+  stdenv.mkDerivation {
+    inherit pname version;
 
     src = fetchurl {
-      url = "https://labs.consol.de/assets/downloads/nagios/${name'}.tar.gz";
+      url = "https://labs.consol.de/assets/downloads/nagios/${pname}-${version}.tar.bz";
       inherit sha256;
     };
 
@@ -55,24 +53,24 @@ let
 in {
   check-mssql-health = generic {
     pname       = "check_mssql_health";
-    version     = "2.6.4.14";
-    sha256      = "0w6gybrs7imx169l8740s0ax3adya867fw0abrampx59mnsj5pm1";
+    version     = "2.6.4.15";
+    sha256      = "12z0b3c2p18viy7s93r6bbl8fvgsqh80136d07118qhxshp1pwxg";
     description = "Check plugin for Microsoft SQL Server.";
     buildInputs = [ perlPackages.DBDsybase ];
   };
 
   check-nwc-health = generic {
     pname       = "check_nwc_health";
-    version     = "7.0.1.3";
-    sha256      = "0rgd6zgd7kplx3z72n8zbzwkh8vnd83361sk9ibh6ng78sds1sl5";
+    version     = "7.10.0.6";
+    sha256      = "092rhaqnk3403z0y60x38vgh65gcia3wrd6gp8mr7wszja38kxv2";
     description = "Check plugin for network equipment.";
     buildInputs = [ perlPackages.NetSNMP ];
   };
 
   check-ups-health = generic {
     pname       = "check_ups_health";
-    version     = "2.8.2.2";
-    sha256      = "1gc2wjsymay2vk5ywc1jj9cvrbhs0fs851x8l4nc75df2g75v521";
+    version     = "2.8.3.3";
+    sha256      = "0qc2aglppwr9ms4p53kh9nr48625sqrbn46xs0k9rx5sv8hil9hm";
     description = "Check plugin for UPSs.";
     buildInputs = [ perlPackages.NetSNMP ];
   };
diff --git a/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix b/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix
index 970f49713a3b..983eb6bf6c84 100644
--- a/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix
+++ b/pkgs/servers/monitoring/prometheus/blackbox-exporter.nix
@@ -2,7 +2,7 @@
 
 buildGoPackage rec {
   pname = "blackbox_exporter";
-  version = "0.14.0";
+  version = "0.15.0";
   rev = version;
 
   goPackagePath = "github.com/prometheus/blackbox_exporter";
@@ -11,7 +11,7 @@ buildGoPackage rec {
     rev = "v${version}";
     owner = "prometheus";
     repo = "blackbox_exporter";
-    sha256 = "1v5n59p9jl6y1ka9mqp0ibx1kpcb3gbpl0i6bhqpbr154frmqm4x";
+    sha256 = "06llb37xpn5zjnqkw526vbk4mfdiwrv3yg7aw4365p3gz5dk085i";
   };
 
   doCheck = true;
diff --git a/pkgs/servers/prayer/default.nix b/pkgs/servers/prayer/default.nix
index 7997d0ebcd8b..d1351afa0b30 100644
--- a/pkgs/servers/prayer/default.nix
+++ b/pkgs/servers/prayer/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, perl, openssl, db, zlib, uwimap, html-tidy, pam}:
+{ stdenv, fetchurl, fetchpatch, perl, openssl, db, zlib, uwimap, html-tidy, pam}:
 
 let
   ssl = stdenv.lib.optionals uwimap.withSSL
@@ -12,7 +12,20 @@ stdenv.mkDerivation rec {
     sha256 = "135fjbxjn385b6cjys6qhbwfw61mdcl2akkll4jfpdzfvhbxlyda";
   };
 
-  patches = [ ./install.patch ];
+  patches = [
+    ./install.patch
+
+    # fix build errors which result from openssl changes
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/p/prayer/1.3.5-dfsg1-6/debian/patches/disable_ssl3.patch";
+      sha256 = "1rx4bidc9prh4gffipykp144cyi3zd6qzd990s2aad3knzv5bkdd";
+    })
+    (fetchpatch {
+      url = "https://sources.debian.org/data/main/p/prayer/1.3.5-dfsg1-6/debian/patches/openssl1.1.patch";
+      sha256 = "0zinylvq3bcifdmki867gir49pbjx6qb5h019hawwif2l4jmlxw1";
+    })
+  ];
+
   postPatch = ''
     sed -i -e s/gmake/make/ -e 's/LDAP_ENABLE.*= true/LDAP_ENABLE=false/' \
       ${ssl} \
diff --git a/pkgs/servers/routinator/default.nix b/pkgs/servers/routinator/default.nix
index 903f38617fcb..ed1362a0a528 100644
--- a/pkgs/servers/routinator/default.nix
+++ b/pkgs/servers/routinator/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "routinator";
-  version = "0.5.0";
+  version = "0.6.0";
 
   src = fetchFromGitHub {
     owner = "NLnetLabs";
     repo = pname;
     rev = "v${version}";
-    sha256 = "075dp092pgwnky96smv5v6sx9vj7hd5bif8rb1q4x6077ci5jixw";
+    sha256 = "13xfnlaqjisi9fm1p7ydhgrh86ccbfwkxbnrv8abdx80jwb0lm15";
   };
 
-  cargoSha256 = "0qxp3pjmrr53n59c2wcdnbqgk259zcj9gd11wpqf7kj3wlzrnwvy";
+  cargoSha256 = "13sx7mbirhrd0is7gvnk0mir5qizbhrlvsn0v55ibf3bybjsb644";
 
   meta = with stdenv.lib; {
     description = "An RPKI Validator written in Rust";
diff --git a/pkgs/servers/sql/postgresql/ext/repmgr.nix b/pkgs/servers/sql/postgresql/ext/repmgr.nix
new file mode 100644
index 000000000000..366d98d1b4b1
--- /dev/null
+++ b/pkgs/servers/sql/postgresql/ext/repmgr.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, postgresql, openssl, zlib, readline }:
+
+stdenv.mkDerivation rec {
+  pname = "repmgr";
+  version = "4.4.0";
+
+  src = fetchFromGitHub {
+    owner = "2ndQuadrant";
+    repo = "repmgr";
+    rev = "v${version}";
+    sha256 = "185789f7igvlqyqcb8kf42jjq8g0wbs2aqd9kimrq5kf4srwgpim";
+  };
+
+  installPhase = ''
+    mkdir -p $out/{lib,share/postgresql/extension}
+
+    cp *.so      $out/lib
+    cp *.sql     $out/share/postgresql/extension
+    cp *.control $out/share/postgresql/extension
+  '';
+
+  buildInputs = [ postgresql openssl zlib readline ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://repmgr.org/";
+    description = "Replication manager for PostgreSQL cluster";
+    license = licenses.postgresql;
+    maintainers = with maintainers; [ zimbatm ];
+  };
+}
diff --git a/pkgs/servers/sql/postgresql/packages.nix b/pkgs/servers/sql/postgresql/packages.nix
index ebce90d34518..a6821373389f 100644
--- a/pkgs/servers/sql/postgresql/packages.nix
+++ b/pkgs/servers/sql/postgresql/packages.nix
@@ -50,4 +50,6 @@ self: super: {
     pg_partman = super.callPackage ./ext/pg_partman.nix { };
 
     pg_safeupdate = super.callPackage ./ext/pg_safeupdate.nix { };
+
+    repmgr = super.callPackage ./ext/repmgr.nix { };
 }
diff --git a/pkgs/servers/web-apps/moodle/default.nix b/pkgs/servers/web-apps/moodle/default.nix
index 4f47890cc87a..77822365f9c7 100644
--- a/pkgs/servers/web-apps/moodle/default.nix
+++ b/pkgs/servers/web-apps/moodle/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, writeText }:
 
 let
-  version = "3.7.1";
+  version = "3.7.2";
   stableVersion = builtins.substring 0 2 (builtins.replaceStrings ["."] [""] version);
 in
 
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "https://download.moodle.org/stable${stableVersion}/${pname}-${version}.tgz";
-    sha256 = "0xfriw0nfaf9hlcjviwg2acwpd192jf2ahw8sw3s6bj3pr1isxmd";
+    sha256 = "1mvrmpqkcz7m7yplqi0lwgnal79n747f7nwcgd2nfrvz7jv3s8ir";
   };
 
   phpConfig = writeText "config.php" ''