From b299639e2099aac9f226f67aa74d722f69187354 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 25 May 2016 23:07:56 +0200 Subject: mlmmj --- ymir.nix | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/ymir.nix b/ymir.nix index 22638a0e..b99e396b 100644 --- a/ymir.nix +++ b/ymir.nix @@ -47,25 +47,25 @@ in rec { }); uwsgi = pkgs.callPackage ./customized/uwsgi.nix { extraPlugins = [ - { name = "cgi"; - interpreter = pkgs.python3; - path = "plugins/cgi"; - deps = [ pkgs.python3 ]; - install = '' + { name = "cgi"; + interpreter = pkgs.python3; + path = "plugins/cgi"; + deps = [ pkgs.python3 ]; + install = '' ${pkgs.python3.executable} -m compileall $out/${pkgs.python3.sitePackages}/ ${pkgs.python3.executable} -O -m compileall $out/${pkgs.python3.sitePackages}/ - ''; - } - ]; - plugins = []; + ''; + } + ]; + plugins = []; }; cgit = pkgs.stdenv.lib.overrideDerivation pkgs.cgit (oldAttrs : { buildInputs = oldAttrs.buildInputs ++ [ - pkgs.perl - pkgs.python3 - pkgs.makeWrapper - ]; - postInstall = let + pkgs.perl + pkgs.python3 + pkgs.makeWrapper + ]; + postInstall = let pythonEnv = pkgs.python3.buildEnv.override { extraLibs = with pkgs.python3Packages; [ pygments markdown ]; }; in '' wrapProgram $out/lib/cgit/filters/syntax-highlighting.py --prefix PYTHONPATH ':' ${pythonEnv}/lib/*/site-packages @@ -113,6 +113,7 @@ in rec { rsync tmux zsh + mlmmj ]; networking = { @@ -369,6 +370,7 @@ in rec { transport_maps = regexp:${pkgs.writeText "transport" '' /^gkleen[@\+]/ uucp:isaac + /^([^\+]+)@(lists|l)\..*/ mlmmj:$1 ''} luser_relay = gkleen+''${local} @@ -411,10 +413,14 @@ in rec { permit_sasl_authenticated, reject_unauth_destination + mlmmj_destination_recipient_limit = 1 + propagate_unmatched_extensions = virtual + alias_maps = hash:/etc/postfix/aliases texthash:/srv/mail/spm ''; extraMasterConf = '' - uucp unix - n n - - pipe flags=Fqhu user=uucp argv=/var/setuid-wrappers/uux -z -a$sender - $nexthop!rmail ($recipient) + uucp unix - n n - - pipe flags=Fqhu user=uucp argv=/var/setuid-wrappers/uux -z -a$sender - $nexthop!rmail ($recipient) + mlmmj unix - n n - - pipe flags=ORhu user=mlmmj argv=${pkgs.mlmmj}/bin/mlmmj-receive -F -L /var/spool/lists/$nexthop ''; networks = ["127.0.0.0/8" "[::ffff:127.0.0.0]/104" "[::1]/128" "10.141.0.0/16"]; }; @@ -474,6 +480,12 @@ in rec { ''; users.groups."mail" = {}; + users.extraUsers."mlmmj" = { + isSystemUser = true; + home = "/var/spool/lists"; + createHome = true; + }; + security.acme = { certs = { "yggdrasil.li" = { @@ -482,7 +494,7 @@ in rec { webroot = "/srv/www/acme/yggdrasil.li"; email = "phikeebaogobaegh@141.li"; extraDomains = builtins.listToAttrs (builtins.map (name: { inherit name; value = "/srv/www/acme/${name}"; }) - ["dirty-haskell.org" "www.dirty-haskell.org" "files.141.li" "f.141.li" "ymir.141.li" "141.li" "www.141.li" "ymir.xmpp.li" "xmpp.li" "www.xmpp.li" "files.yggdrasil.li" "f.yggdrasil.li" "ymir.yggdrasil.li" "git.yggdrasil.li" "www.yggdrasil.li" "yggdrasil.li" "files.praseodym.org" "f.praseodym.org" "ymir.praseodym.org" "praseodym.org" "www.praseodym.org"]); + ["dirty-haskell.org" "www.dirty-haskell.org" "lists.dirty-haskell.org" "l.dirty-haskell.org" "files.141.li" "f.141.li" "ymir.141.li" "141.li" "www.141.li" "lists.141.li" "l.141.li" "ymir.xmpp.li" "xmpp.li" "www.xmpp.li" "lists.xmpp.li" "l.xmpp.li" "files.yggdrasil.li" "f.yggdrasil.li" "ymir.yggdrasil.li" "git.yggdrasil.li" "www.yggdrasil.li" "yggdrasil.li" "lists.yggdrasil.li" "l.yggdrasil.li" "files.praseodym.org" "f.praseodym.org" "ymir.praseodym.org" "praseodym.org" "www.praseodym.org" "lists.praseodym.org" "l.praseodym.org"]); postRun = '' systemctl reload nginx.service prosodyctl reload @@ -506,7 +518,7 @@ in rec { IdentityFile ~/.ssh/odin Host hel Hostname hel.midgard.yggdrasil - IdentityFile ~/.ssh/hel + IdentityFile ~/.ssh/hel ''; commandPath = ["${pkgs.rmail}/bin" "${pkgs.push2bin}/bin"]; defaultCommands = ["rmail" "push2bin"]; -- cgit v1.2.3