From 46bf20ecf0b4a19bd3402888dca43e0bb1419b61 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 25 Sep 2015 16:45:29 +0200 Subject: Now including prosody-modules repo --- custom/prosody-modules.nix | 20 ++++++++++++++++++++ ymir.nix | 6 +++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 custom/prosody-modules.nix diff --git a/custom/prosody-modules.nix b/custom/prosody-modules.nix new file mode 100644 index 00000000..3c103438 --- /dev/null +++ b/custom/prosody-modules.nix @@ -0,0 +1,20 @@ +{ stdenv +, fetchhg +, modules ? [] +}: + +let + copyModule = name: "cp -rv $src/${name}/* $out/;"; + concat = a: b: a + b; + head = '' + source $stdenv/setup + mkdir -p $out + ''; +in stdenv.mkDerivation { + name = "prosody-modules"; + src = fetchhg { + url = "http://hg.prosody.im/prosody-modules"; + sha256 = "0nsf1j2prc6ggajn7zz9h300msf6aajqqxhy396g7j834knj5fb2"; + }; + builder = builtins.toFile "builder.sh" (head + (builtins.foldl' concat "" (map copyModule modules))); +} diff --git a/ymir.nix b/ymir.nix index 32879953..1af6bb62 100644 --- a/ymir.nix +++ b/ymir.nix @@ -1,6 +1,9 @@ { config, pkgs, ... }: -{ +let + prosodyModules = callPackage (import ./custom/prosody-modules.nix) { modules = [ "mod_auth_pam" + ] }; +in { imports = [ ./ymir-hw.nix @@ -78,6 +81,7 @@ ]; allowRegistration = false; extraConfig = '' + plugin_paths = { ${prosodyModules} } authentication = "pam" log = "syslog" ''; -- cgit v1.2.3