Merge remote-tracking branch 'cd/master'
This commit is contained in:
commit
5d10eff181
@ -21,6 +21,7 @@ with import ../../4lib { inherit lib; };
|
||||
aliases = [
|
||||
"echelon.retiolum"
|
||||
"cgit.echelon.retiolum"
|
||||
"go.retiolum"
|
||||
];
|
||||
tinc.pubkey = ''
|
||||
-----BEGIN RSA PUBLIC KEY-----
|
||||
|
@ -1,13 +0,0 @@
|
||||
Subnet = 10.243.109.132
|
||||
Subnet = 42:f9f0:be1f:b191:116a:3db0:d546:70d2
|
||||
# dn42 routing
|
||||
Subnet = 172.22.0.0/15
|
||||
|
||||
-----BEGIN RSA PUBLIC KEY-----
|
||||
MIIBCgKCAQEApKt/lYqRgl4KE1ouSi5nbt7n7FEjECkGtkRhLFDJs0uWNvPj7wEh
|
||||
nTtqzk7lJ8upHgmNN+1w98n2bcJ7Qcbz8vCcMEO7MXdlzGH9vet/g6ZgQ/Z1ijHl
|
||||
IxYeH7yyBDLoJ2gghMhiSF0cezFDmNKPMhN+cGr9Lou54igK3I5CMIMN8cx0Fu0G
|
||||
uLAxvnZfxIzzCnrF9xvZ6i3g/rEcaGjxmAysCW8SQdRmBKlkzQaUbLy39V2Z5y6m
|
||||
SWR7gIGgMVCkpSeWUVSi05wgnMhoEu6LEYTBy/3bPK96O/Y7JBVpYUHqk/ya2PNR
|
||||
eaHfEpCrKsek4t/5hcLk64Eo/ydzeU+gAQIDAQAB
|
||||
-----END RSA PUBLIC KEY-----
|
@ -32,6 +32,7 @@ let
|
||||
wai-middleware-time = {};
|
||||
web-routes-wai-custom = {};
|
||||
go = {};
|
||||
newsbot-js = {};
|
||||
};
|
||||
|
||||
restricted-repos = mapAttrs make-restricted-repo (
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
{
|
||||
imports = [
|
||||
../3modules/go.nix
|
||||
@ -10,7 +11,19 @@
|
||||
lass.go = {
|
||||
enable = true;
|
||||
};
|
||||
krebs.iptables.tables.filter.INPUT.rules = [
|
||||
{ predicate = "-i retiolum -p tcp --dport 1337"; target = "ACCEPT"; }
|
||||
];
|
||||
krebs.nginx = {
|
||||
enable = true;
|
||||
servers.go = {
|
||||
locations = [
|
||||
(nameValuePair "/" ''
|
||||
proxy_set_header Host go;
|
||||
proxy_pass http://localhost:1337;
|
||||
'')
|
||||
];
|
||||
server-names = [
|
||||
"go"
|
||||
"go.retiolum"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -4,7 +4,8 @@
|
||||
krebs.iptables.tables.filter.INPUT.rules = [
|
||||
{ predicate = "-i retiolum -p tcp --dport 6667"; target = "ACCEPT"; }
|
||||
];
|
||||
config.services.charybdis = {
|
||||
|
||||
services.charybdis = {
|
||||
enable = true;
|
||||
config = ''
|
||||
serverinfo {
|
||||
|
@ -14,4 +14,5 @@ rec {
|
||||
vimperator = callPackage ./firefoxPlugins/vimperator.nix {};
|
||||
};
|
||||
go = callPackage ./go/default.nix {};
|
||||
newsbot-js = callPackage ./newsbot-js/default.nix {};
|
||||
}
|
||||
|
@ -36,8 +36,6 @@ in nodePackages.buildNodePackage {
|
||||
|
||||
buildInputs = [
|
||||
nodejs
|
||||
nodePackages.redis
|
||||
np.formidable
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
|
60
lass/5pkgs/newsbot-js/default.nix
Normal file
60
lass/5pkgs/newsbot-js/default.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{ stdenv, makeWrapper, lib, buildEnv, fetchgit, nodePackages, nodejs }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
np = nodePackages.override {
|
||||
generated = ./packages.nix;
|
||||
self = np;
|
||||
};
|
||||
|
||||
node_env = buildEnv {
|
||||
name = "node_env";
|
||||
paths = [
|
||||
np.feedparser
|
||||
np.form-data
|
||||
np.irc
|
||||
np.request
|
||||
np.shell-quote
|
||||
];
|
||||
pathsToLink = [ "/lib" ];
|
||||
ignoreCollisions = true;
|
||||
};
|
||||
|
||||
in nodePackages.buildNodePackage {
|
||||
name = "newsbot-js";
|
||||
|
||||
src = fetchgit {
|
||||
url = "http://cgit.echelon/newsbot-js/";
|
||||
rev = "cd32ef7b39819f53c7125b22c594202724cc8754";
|
||||
sha256 = "425e800f7638a5679ed8a049614a7533f3c8dd09659061885240dc93952ff0ae";
|
||||
};
|
||||
|
||||
phases = [
|
||||
"unpackPhase"
|
||||
"installPhase"
|
||||
];
|
||||
|
||||
deps = (filter (v: nixType v == "derivation") (attrValues np));
|
||||
|
||||
buildInputs = [
|
||||
nodejs
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
cp newsbot.js $out/
|
||||
cat > $out/newsbot << EOF
|
||||
${nodejs}/bin/node $out/newsbot.js
|
||||
EOF
|
||||
chmod +x $out/newsbot
|
||||
|
||||
wrapProgram $out/newsbot \
|
||||
--prefix NODE_PATH : ${node_env}/lib/node_modules
|
||||
|
||||
ln -s $out/newsbot /$out/bin/newsbot
|
||||
'';
|
||||
|
||||
}
|
1442
lass/5pkgs/newsbot-js/packages.nix
Normal file
1442
lass/5pkgs/newsbot-js/packages.nix
Normal file
File diff suppressed because it is too large
Load Diff
@ -79,11 +79,7 @@ in
|
||||
environment.etc."vim/vim${majmin pkgs.vim.version}".source =
|
||||
"${pkgs.vim}/share/vim/vim${majmin pkgs.vim.version}";
|
||||
|
||||
# multiple-definition-problem when defining environment.variables.EDITOR
|
||||
environment.extraInit = ''
|
||||
EDITOR=vim
|
||||
'';
|
||||
|
||||
environment.variables.EDITOR = mkForce "vim";
|
||||
environment.variables.VIM = "/etc/vim";
|
||||
}
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user