summaryrefslogtreecommitdiffstats
path: root/tv
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2016-02-01 15:17:16 +0100
committerlassulus <lass@aidsballs.de>2016-02-01 15:17:16 +0100
commit72dc2dd7fa54c77e08052efed21f68758fa533a2 (patch)
treef2c4e93c670764134913408a6d43c2ff6c6ac15e /tv
parent186d5cc95a7430136da3107734409511c64d7080 (diff)
parent1a5a3c0cf2aba173772765c24a0865bb2da6b691 (diff)
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'tv')
-rw-r--r--tv/1systems/cd.nix5
-rw-r--r--tv/1systems/wu.nix2
-rw-r--r--tv/1systems/xu.nix2
-rw-r--r--tv/2configs/default.nix39
-rw-r--r--tv/5pkgs/default.nix3
-rw-r--r--tv/5pkgs/ejabberd/default.nix28
6 files changed, 57 insertions, 22 deletions
diff --git a/tv/1systems/cd.nix b/tv/1systems/cd.nix
index 8c2a9ae43..b69d7655a 100644
--- a/tv/1systems/cd.nix
+++ b/tv/1systems/cd.nix
@@ -6,6 +6,11 @@ with lib;
krebs.build.host = config.krebs.hosts.cd;
krebs.build.target = "root@cd.internet";
+ krebs.build.source.upstream-nixpkgs = {
+ url = https://github.com/NixOS/nixpkgs;
+ rev = "b7ff030";
+ };
+
imports = [
../2configs/hw/CAC-Developer-2.nix
../2configs/fs/CAC-CentOS-7-64bit.nix
diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix
index 54ceb7783..3bdf8d37a 100644
--- a/tv/1systems/wu.nix
+++ b/tv/1systems/wu.nix
@@ -18,7 +18,7 @@ with lib;
# stockholm
gnumake
hashPassword
- lentil
+ haskellPackages.lentil
parallel
(pkgs.writeScriptBin "im" ''
#! ${pkgs.bash}/bin/bash
diff --git a/tv/1systems/xu.nix b/tv/1systems/xu.nix
index 1f3e010a4..e6894b55e 100644
--- a/tv/1systems/xu.nix
+++ b/tv/1systems/xu.nix
@@ -21,7 +21,7 @@ with lib;
# stockholm
gnumake
hashPassword
- lentil
+ haskellPackages.lentil
parallel
(pkgs.writeScriptBin "im" ''
#! ${pkgs.bash}/bin/bash
diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix
index d3a1778f0..310077021 100644
--- a/tv/2configs/default.nix
+++ b/tv/2configs/default.nix
@@ -8,20 +8,23 @@ with lib;
krebs.build = {
user = config.krebs.users.tv;
target = mkDefault "root@${config.krebs.build.host.name}";
- source = {
- git.nixpkgs = {
- url = mkDefault https://github.com/NixOS/nixpkgs;
- rev = mkDefault "b7ff0301d6f26bd8419e888fd0e129f3dc8bd328";
- target-path = mkDefault "/var/src/nixpkgs";
+ source-version = 2;
+ source = mapAttrs (_: mkDefault) ({
+ nixos-config = "symlink:stockholm-private/1systems/${config.krebs.build.host.name}.nix";
+ nixpkgs = symlink:stockholm-nixpkgs;
+ secrets = "/home/tv/secrets/${config.krebs.build.host.name}";
+ secrets-common = "/home/tv/secrets/common";
+ stockholm-krebs = "/home/tv/stockholm/krebs";
+ stockholm-nixpkgs = "/home/tv/stockholm/nixpkgs";
+ stockholm-private = "/home/tv/stockholm/tv";
+ upstream-nixpkgs = {
+ url = https://github.com/NixOS/nixpkgs;
+ rev = "77f8f35d57618c1ba456d968524f2fb2c3448295";
+ dev = "/home/tv/nixpkgs";
};
- dir.secrets = {
- path = mkDefault "/home/tv/secrets/${config.krebs.build.host.name}";
- };
- dir.stockholm = {
- path = mkDefault "/home/tv/stockholm";
- target-path = mkDefault "/var/src/stockholm";
- };
- };
+ } // optionalAttrs config.krebs.build.host.secure {
+ secrets-master = "/home/tv/secrets/master";
+ });
};
networking.hostName = config.krebs.build.host.name;
@@ -98,12 +101,7 @@ with lib;
};
environment.variables = {
- NIX_PATH =
- with config.krebs.build.source; with dir; with git;
- mkForce (concatStringsSep ":" [
- "nixpkgs=${nixpkgs.target-path}"
- "secrets=${stockholm.target-path}/null"
- ]);
+ NIX_PATH = mkForce "/var/src";
};
programs.bash = {
@@ -182,7 +180,8 @@ with lib;
{
systemd.tmpfiles.rules = let
forUsers = flip map users;
- isUser = { group, ... }: hasSuffix "users" group;
+ isUser = { name, group, ... }:
+ name == "root" || hasSuffix "users" group;
users = filter isUser (mapAttrsToList (_: id) config.users.users);
in forUsers (u: "d /run/xdg/${u.name} 0700 ${u.name} ${u.group} -");
environment.variables.XDG_RUNTIME_DIR = "/run/xdg/$LOGNAME";
diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix
index 2108d972c..be10e91eb 100644
--- a/tv/5pkgs/default.nix
+++ b/tv/5pkgs/default.nix
@@ -11,6 +11,9 @@
--disk-cache-size=50000000 \
"%@"
'';
+ ejabberd = pkgs.callPackage ./ejabberd {
+ erlang = pkgs.erlangR16;
+ };
ff = pkgs.callPackage ./ff {};
viljetic-pages = pkgs.callPackage ./viljetic-pages {};
xmonad-tv =
diff --git a/tv/5pkgs/ejabberd/default.nix b/tv/5pkgs/ejabberd/default.nix
new file mode 100644
index 000000000..3a77c5cd1
--- /dev/null
+++ b/tv/5pkgs/ejabberd/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchurl, expat, erlang, zlib, openssl, pam, lib}:
+
+stdenv.mkDerivation rec {
+ version = "2.1.13";
+ name = "ejabberd-${version}";
+ src = fetchurl {
+ url = "http://www.process-one.net/downloads/ejabberd/${version}/${name}.tgz";
+ sha256 = "0vf8mfrx7vr3c5h3nfp3qcgwf2kmzq20rjv1h9sk3nimwir1q3d8";
+ };
+ buildInputs = [ expat erlang zlib openssl pam ];
+ patchPhase = ''
+ sed -i \
+ -e "s|erl \\\|${erlang}/bin/erl \\\|" \
+ -e 's|EXEC_CMD=\"sh -c\"|EXEC_CMD=\"${stdenv.shell} -c\"|' \
+ src/ejabberdctl.template
+ '';
+ preConfigure = ''
+ cd src
+ '';
+ configureFlags = ["--enable-pam"];
+
+ meta = {
+ description = "Open-source XMPP application server written in Erlang";
+ license = stdenv.lib.licenses.gpl2;
+ homepage = http://www.ejabberd.im;
+ maintainers = [ lib.maintainers.sander ];
+ };
+}