From 3afe0d55c4124d3cf45c2bf5d499a5cfec18c339 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 30 Sep 2015 23:01:43 +0200 Subject: Syntax --- ymir.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/ymir.nix b/ymir.nix index a00873f4..72f85ad5 100644 --- a/ymir.nix +++ b/ymir.nix @@ -5,6 +5,14 @@ let luaPosix = pkgs.callPackage ./custom/luaPosix.nix {}; luaSha2 = pkgs.callPackage ./custom/luaSha2.nix {}; prosodyAuth = pkgs.callPackage ./custom/prosody-auth.nix {}; + prosodyVirtHost = name: { + enabled = true; + domain = name; + ssl = { + key = "certs/${name}.key"; + cert = "certs/${name}.crt"; + }; + }; in { imports = [ @@ -108,16 +116,7 @@ in { custom_alias_secret_file="/etc/prosody/alias_secret" ''; - let - makeHost = name: { - enabled = true; - domain = name; - ssl = { - key = "certs/${name}.key"; - cert = "certs/${name}.crt"; - }; - }; - in virtualHosts = builtins.listToAttrs (name: { inherit name; value = makeHost name; }) + virtualHosts = builtins.listToAttrs (name: { inherit name; value = prosodyVirtHost name; }) ["xmpp.li" "yggdrasil.li" "praseodym.org" "141.li"]; }; security.pam.services."xmpp".text = '' -- cgit v1.2.3