nixos-config/1systems/wry.nix

91 lines
2.3 KiB
Nix
Raw Normal View History

2015-09-27 15:23:54 +02:00
{ config, lib, pkgs, ... }:
2016-10-20 20:54:38 +02:00
with import <stockholm/lib>;
2015-09-27 15:23:54 +02:00
let
external-ip = config.krebs.build.host.nets.internet.ip4.addr;
internal-ip = config.krebs.build.host.nets.retiolum.ip4.addr;
2015-09-27 15:23:54 +02:00
in {
imports = [
2016-02-15 16:27:11 +01:00
../.
2015-10-19 19:48:56 +02:00
# TODO: copy this config or move to krebs
2016-06-13 16:22:51 +02:00
../2configs/hw/CAC.nix
../2configs/fs/CAC-CentOS-7-64bit.nix
2016-06-23 16:57:36 +02:00
../2configs/save-diskspace.nix
2015-10-19 19:48:56 +02:00
../2configs/bepasty-dual.nix
../2configs/iodined.nix
2016-10-19 12:31:13 +02:00
../2configs/backup.nix
2015-10-28 21:31:07 +01:00
# other nginx
../2configs/nginx/euer.wiki.nix
../2configs/nginx/euer.blog.nix
../2configs/nginx/euer.test.nix
2016-10-19 12:31:13 +02:00
#../2configs/elchos/stats.nix
# collectd
2016-08-21 12:06:31 +02:00
# ../2configs/collectd/collectd-base.nix
../2configs/tinc/retiolum.nix
2016-08-21 12:06:31 +02:00
../2configs/torrent.nix
2015-09-27 15:23:54 +02:00
];
2016-06-23 16:57:36 +02:00
2015-11-06 23:54:27 +01:00
krebs.build.host = config.krebs.hosts.wry;
2015-10-19 19:48:56 +02:00
2015-12-30 11:29:28 +01:00
krebs.Reaktor = {
nickname = "Reaktor|bot";
2015-12-30 11:53:48 +01:00
channels = [ "#krebs" "#shackspace" "#binaergewitter" ];
2015-12-30 11:29:28 +01:00
enable = true;
plugins = with pkgs.ReaktorPlugins;[
titlebot
# stockholm-issue
nixos-version
shack-correct
sed-plugin
random-emoji ];
};
# bepasty to listen only on the correct interfaces
krebs.bepasty.servers.internal.nginx.listen = [ "${internal-ip}:80" ];
krebs.bepasty.servers.external.nginx.listen = [ "${external-ip}:80" "${external-ip}:443 ssl" ];
# prepare graphs
2015-10-04 18:55:53 +02:00
krebs.nginx.enable = true;
krebs.retiolum-bootstrap.enable = true;
krebs.tinc_graphs = {
2015-10-04 18:55:53 +02:00
enable = true;
nginx = {
enable = true;
# TODO: remove hard-coded hostname
complete = {
listen = [ "${internal-ip}:80" ];
2015-10-25 18:06:46 +01:00
server-names = [ "graphs.wry" "graphs.retiolum" "graphs.wry.retiolum" ];
};
anonymous = {
listen = [ "${external-ip}:80" ] ;
server-names = [ "graphs.krebsco.de" ];
};
};
2015-10-04 18:55:53 +02:00
};
2015-11-06 23:54:27 +01:00
networking = {
2015-12-30 11:29:28 +01:00
firewall = {
allowPing = true;
logRefusedConnections = false;
allowedTCPPorts = [ 53 80 443 ];
2015-12-30 11:29:28 +01:00
allowedUDPPorts = [ 655 53 ];
};
interfaces.enp2s1.ip4 = [{
address = external-ip;
prefixLength = 24;
}];
defaultGateway = "104.233.87.1";
nameservers = [ "8.8.8.8" ];
2015-09-27 15:23:54 +02:00
};
2016-08-21 12:06:31 +02:00
environment.systemPackages = [ pkgs.screen ];
2015-09-27 15:23:54 +02:00
}