summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/0tests/data/secrets/github-hosts-sync.ssh.id_ed255190
-rw-r--r--krebs/0tests/data/secrets/shack/muell_mail.js0
-rw-r--r--krebs/0tests/data/secrets/shack/s3-power.json1
-rw-r--r--krebs/0tests/data/secrets/shack/unifi-prometheus-pw0
-rw-r--r--krebs/0tests/data/secrets/shackspace-gitlab-ci0
-rw-r--r--krebs/1systems/hotdog/config.nix2
-rw-r--r--krebs/1systems/puyak/config.nix22
-rw-r--r--krebs/1systems/wolf/config.nix160
-rw-r--r--krebs/2configs/default.nix17
-rw-r--r--krebs/2configs/exim-smarthost.nix5
-rw-r--r--krebs/2configs/reaktor2.nix3
-rw-r--r--krebs/2configs/shack/gitlab-runner.nix22
-rw-r--r--krebs/2configs/shack/glados/default.nix139
-rw-r--r--krebs/2configs/shack/glados/deps/dwd_pollen.nix32
-rw-r--r--krebs/2configs/shack/glados/deps/gtts-token.nix27
-rw-r--r--krebs/2configs/shack/glados/deps/pyhaversion.nix33
-rw-r--r--krebs/2configs/shack/glados/multi/shackopen.nix23
-rw-r--r--krebs/2configs/shack/glados/multi/wasser.nix66
-rw-r--r--krebs/2configs/shack/glados/sensors/hass.nix22
-rw-r--r--krebs/2configs/shack/glados/sensors/power.nix27
-rw-r--r--krebs/2configs/shack/grafana.nix19
-rw-r--r--krebs/2configs/shack/graphite.nix (renamed from krebs/2configs/graphite.nix)20
-rw-r--r--krebs/2configs/shack/influx.nix33
-rw-r--r--krebs/2configs/shack/mqtt.nix15
-rw-r--r--krebs/2configs/shack/mqtt_sub.nix2
-rw-r--r--krebs/2configs/shack/muell_caller.nix3
-rw-r--r--krebs/2configs/shack/muell_mail.nix34
-rw-r--r--krebs/2configs/shack/muellshack.nix44
-rw-r--r--krebs/2configs/shack/netbox.nix39
-rw-r--r--krebs/2configs/shack/node-light.nix54
-rw-r--r--krebs/2configs/shack/powerraw.nix74
-rw-r--r--krebs/2configs/shack/prometheus/node.nix27
-rw-r--r--krebs/2configs/shack/prometheus/server.nix205
-rw-r--r--krebs/2configs/shack/prometheus/unifi.nix10
-rw-r--r--krebs/2configs/shack/radioactive.nix3
-rw-r--r--krebs/2configs/shack/s3-power.nix34
-rw-r--r--krebs/2configs/shack/worlddomination.nix2
-rw-r--r--krebs/2configs/stats/shack-client.nix (renamed from krebs/2configs/stats/wolf-client.nix)12
-rw-r--r--krebs/2configs/stats/shack-debugging.nix (renamed from krebs/2configs/collectd-base.nix)4
-rw-r--r--krebs/3modules/bepasty-server.nix2
-rw-r--r--krebs/3modules/ci.nix2
-rw-r--r--krebs/3modules/default.nix1
-rw-r--r--krebs/3modules/exim-retiolum.nix92
-rw-r--r--krebs/3modules/exim-smarthost.nix6
-rw-r--r--krebs/3modules/exim.nix2
-rw-r--r--krebs/3modules/external/default.nix430
-rw-r--r--krebs/3modules/external/palo.nix19
-rw-r--r--krebs/3modules/external/ssh/0x4A6F.pub1
-rw-r--r--krebs/3modules/external/ssh/qubasa.pub2
-rw-r--r--krebs/3modules/external/tinc/horisa.pub8
-rw-r--r--krebs/3modules/github-hosts-sync.nix28
-rw-r--r--krebs/3modules/github-known-hosts.nix10
-rw-r--r--krebs/3modules/jeschli/default.nix29
-rw-r--r--krebs/3modules/lass/default.nix142
-rw-r--r--krebs/3modules/lass/pgp/helios.pgp51
-rw-r--r--krebs/3modules/lass/pgp/icarus.pgp51
-rw-r--r--krebs/3modules/lass/pgp/shodan.pgp30
-rw-r--r--krebs/3modules/lass/pgp/yubikey.pgp109
-rw-r--r--krebs/3modules/lass/ssh/android.rsa2
-rw-r--r--krebs/3modules/lass/ssh/daedalus.rsa1
-rw-r--r--krebs/3modules/lass/ssh/helios.rsa1
-rw-r--r--krebs/3modules/lass/ssh/icarus.rsa1
-rw-r--r--krebs/3modules/lass/ssh/shodan.rsa1
-rw-r--r--krebs/3modules/lass/ssh/uriel.rsa1
-rw-r--r--krebs/3modules/lass/ssh/xerxes.rsa1
-rw-r--r--krebs/3modules/lass/ssh/yubikey.rsa1
-rw-r--r--krebs/3modules/makefu/default.nix34
-rw-r--r--krebs/3modules/makefu/wiregrill/gum.pub2
-rw-r--r--krebs/3modules/makefu/wiregrill/rockit.pub1
-rw-r--r--krebs/3modules/makefu/wiregrill/shackdev.pub1
-rw-r--r--krebs/3modules/mb/default.nix80
-rw-r--r--krebs/3modules/nin/default.nix111
-rw-r--r--krebs/3modules/power-action.nix2
-rw-r--r--krebs/3modules/reaktor2.nix3
-rw-r--r--krebs/3modules/rtorrent.nix27
-rw-r--r--krebs/3modules/syncthing.nix100
-rw-r--r--krebs/3modules/tinc.nix8
-rw-r--r--krebs/3modules/urlwatch.nix60
-rw-r--r--krebs/5pkgs/haskell/blessings.nix13
-rw-r--r--krebs/5pkgs/haskell/email-header.nix16
-rw-r--r--krebs/5pkgs/haskell/xmonad-stockholm.nix3
-rw-r--r--krebs/5pkgs/override/default.nix12
-rw-r--r--krebs/5pkgs/simple/bitlbee-discord/default.nix29
-rw-r--r--krebs/5pkgs/simple/cholerab/default.nix17
-rw-r--r--krebs/5pkgs/simple/github-hosts-sync/default.nix39
-rwxr-xr-xkrebs/5pkgs/simple/github-hosts-sync/src/hosts-sync33
-rw-r--r--krebs/5pkgs/simple/go-shortener/default.nix8
-rw-r--r--krebs/5pkgs/simple/newsbot-js/default.nix8
-rw-r--r--krebs/5pkgs/simple/nix-prefetch-github.nix25
-rw-r--r--krebs/krops.nix6
-rw-r--r--krebs/nixpkgs-unstable.json7
-rw-r--r--krebs/nixpkgs.json6
-rwxr-xr-xkrebs/update-nixpkgs-unstable.sh9
-rwxr-xr-xkrebs/update-nixpkgs.sh (renamed from krebs/update-channel.sh)2
94 files changed, 2332 insertions, 589 deletions
diff --git a/krebs/0tests/data/secrets/github-hosts-sync.ssh.id_ed25519 b/krebs/0tests/data/secrets/github-hosts-sync.ssh.id_ed25519
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/krebs/0tests/data/secrets/github-hosts-sync.ssh.id_ed25519
diff --git a/krebs/0tests/data/secrets/shack/muell_mail.js b/krebs/0tests/data/secrets/shack/muell_mail.js
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/krebs/0tests/data/secrets/shack/muell_mail.js
diff --git a/krebs/0tests/data/secrets/shack/s3-power.json b/krebs/0tests/data/secrets/shack/s3-power.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/krebs/0tests/data/secrets/shack/s3-power.json
@@ -0,0 +1 @@
+{}
diff --git a/krebs/0tests/data/secrets/shack/unifi-prometheus-pw b/krebs/0tests/data/secrets/shack/unifi-prometheus-pw
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/krebs/0tests/data/secrets/shack/unifi-prometheus-pw
diff --git a/krebs/0tests/data/secrets/shackspace-gitlab-ci b/krebs/0tests/data/secrets/shackspace-gitlab-ci
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/krebs/0tests/data/secrets/shackspace-gitlab-ci
diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix
index f68c8ce5..60ec625f 100644
--- a/krebs/1systems/hotdog/config.nix
+++ b/krebs/1systems/hotdog/config.nix
@@ -14,10 +14,10 @@
<stockholm/krebs/2configs/ircd.nix>
<stockholm/krebs/2configs/nscd-fix.nix>
<stockholm/krebs/2configs/reaktor2.nix>
- <stockholm/krebs/2configs/repo-sync.nix>
];
krebs.build.host = config.krebs.hosts.hotdog;
+ krebs.github-hosts-sync.enable = true;
boot.isContainer = true;
networking.useDHCP = false;
diff --git a/krebs/1systems/puyak/config.nix b/krebs/1systems/puyak/config.nix
index 67257eac..6493c6df 100644
--- a/krebs/1systems/puyak/config.nix
+++ b/krebs/1systems/puyak/config.nix
@@ -7,13 +7,20 @@
<stockholm/krebs/2configs/secret-passwords.nix>
<stockholm/krebs/2configs/hw/x220.nix>
- <stockholm/krebs/2configs/stats/puyak-client.nix>
<stockholm/krebs/2configs/binary-cache/nixos.nix>
<stockholm/krebs/2configs/binary-cache/prism.nix>
<stockholm/krebs/2configs/go.nix>
<stockholm/krebs/2configs/ircd.nix>
<stockholm/krebs/2configs/news.nix>
<stockholm/krebs/2configs/news-spam.nix>
+ <stockholm/krebs/2configs/shack/prometheus/node.nix>
+ <stockholm/krebs/2configs/shack/prometheus/server.nix>
+ <stockholm/krebs/2configs/shack/prometheus/unifi.nix>
+ <stockholm/krebs/2configs/shack/gitlab-runner.nix>
+
+ ## Collect local statistics via collectd and send to collectd
+ <stockholm/krebs/2configs/stats/shack-client.nix>
+ <stockholm/krebs/2configs/stats/shack-debugging.nix>
];
krebs.build.host = config.krebs.hosts.puyak;
@@ -59,9 +66,9 @@
};
};
- services.logind.extraConfig = ''
- HandleLidSwitch=ignore
- '';
+ services.logind.lidSwitch = "ignore";
+ services.logind.lidSwitchExternalPower = "ignore";
+
services.udev.extraRules = ''
SUBSYSTEM=="net", ATTR{address}=="8c:70:5a:b2:84:58", NAME="wl0"
@@ -73,6 +80,13 @@
system.activationScripts."disengage fancontrol" = ''
echo level disengaged > /proc/acpi/ibm/fan
'';
+
+ # to access vorstand vm
+ users.users.root.openssh.authorizedKeys.keys = [
+ config.krebs.users.ulrich.pubkey
+ config.krebs.users.raute.pubkey
+ ];
+
users.users.joerg = {
openssh.authorizedKeys.keys = [ config.krebs.users.Mic92.pubkey ];
isNormalUser = true;
diff --git a/krebs/1systems/wolf/config.nix b/krebs/1systems/wolf/config.nix
index ec883071..e87b7bb9 100644
--- a/krebs/1systems/wolf/config.nix
+++ b/krebs/1systems/wolf/config.nix
@@ -1,7 +1,6 @@
{ config, pkgs, ... }:
let
shack-ip = config.krebs.build.host.nets.shack.ip4.addr;
- influx-host = "127.0.0.1";
ext-if = "et0";
external-mac = "52:54:b0:0b:af:fe";
@@ -11,114 +10,82 @@ in
<stockholm/krebs>
<stockholm/krebs/2configs>
<nixpkgs/nixos/modules/profiles/qemu-guest.nix>
- <stockholm/krebs/2configs/collectd-base.nix>
- <stockholm/krebs/2configs/stats/wolf-client.nix>
- <stockholm/krebs/2configs/graphite.nix>
<stockholm/krebs/2configs/binary-cache/nixos.nix>
<stockholm/krebs/2configs/binary-cache/prism.nix>
+ # handle the worlddomination map via coap
<stockholm/krebs/2configs/shack/worlddomination.nix>
+
+ # drivedroid.shack for shackphone
<stockholm/krebs/2configs/shack/drivedroid.nix>
# <stockholm/krebs/2configs/shack/nix-cacher.nix>
- <stockholm/krebs/2configs/shack/mqtt_sub.nix>
+ # Say if muell will be collected
<stockholm/krebs/2configs/shack/muell_caller.nix>
- <stockholm/krebs/2configs/shack/radioactive.nix>
+ # provide muellshack api
+ <stockholm/krebs/2configs/shack/muellshack.nix>
+ # provide light control api
+ <stockholm/krebs/2configs/shack/node-light.nix>
+ # send mail if muell was not handled
+ <stockholm/krebs/2configs/shack/muell_mail.nix>
+ # send mail if muell was not handled
+ <stockholm/krebs/2configs/shack/s3-power.nix>
+ # powerraw usb serial to mqtt and raw socket
+ <stockholm/krebs/2configs/shack/powerraw.nix>
+
+ # create samba share for anonymous usage with the laser and 3d printer pc
<stockholm/krebs/2configs/shack/share.nix>
+
+ # mobile.lounge.mpd.shack
<stockholm/krebs/2configs/shack/mobile.mpd.nix>
- {
- systemd.services.telegraf.path = [ pkgs.net_snmp ]; # for snmptranslate
- systemd.services.telegraf.environment = {
- MIBDIRS = pkgs.fetchgit {
- url = "http://git.shackspace.de/makefu/modem-mibs.git";
- sha256 =
- "1rhrpaascvj5p3dj29hrw79gm39rp0aa787x95m3r2jrcq83ln1k";
- }; # extra mibs like ADSL
- };
- services.telegraf = {
- enable = true;
- extraConfig = {
- inputs = {
- snmp = {
- agents = [ "10.0.1.3:161" ];
- version = 2;
- community = "shack";
- name = "snmp";
- field = [
- {
- name = "hostname";
- oid = "RFC1213-MIB::sysName.0";
- is_tag = true;
- }
- {
- name = "load-percent"; #cisco
- oid = ".1.3.6.1.4.1.9.9.109.1.1.1.1.4.9";
- }
- {
- name = "uptime";
- oid = "DISMAN-EVENT-MIB::sysUpTimeInstance";
- }
- ];
- table = [{
- name = "snmp";
- inherit_tags = [ "hostname" ];
- oid = "IF-MIB::ifXTable";
- field = [{
- name = "ifName";
- oid = "IF-MIB::ifName";
- is_tag = true;
- }];
- }];
- };
- };
- outputs = {
- influxdb = {
- urls = [ "http://${influx-host}:8086" ];
- database = "telegraf";
- write_consistency = "any";
- timeout = "5s";
- };
- };
- };
- };
- }
+
+ # hass.shack
+ <stockholm/krebs/2configs/shack/glados>
+
+ # connect to git.shackspace.de as group runner for rz
+ <stockholm/krebs/2configs/shack/gitlab-runner.nix>
+
+ # Statistics collection and visualization
+ <stockholm/krebs/2configs/shack/graphite.nix>
+ ## Collect data from mqtt.shack and store in graphite database
+ <stockholm/krebs/2configs/shack/mqtt_sub.nix>
+ ## Collect radioactive data and put into graphite
+ <stockholm/krebs/2configs/shack/radioactive.nix>
+ ## mqtt.shack
+ <stockholm/krebs/2configs/shack/mqtt.nix>
+ ## influx.shack
+ <stockholm/krebs/2configs/shack/influx.nix>
+
+ ## Collect local statistics via collectd and send to collectd
+ <stockholm/krebs/2configs/stats/shack-client.nix>
+ <stockholm/krebs/2configs/stats/shack-debugging.nix>
+
+ <stockholm/krebs/2configs/shack/netbox.nix>
+ # prometheus.shack
+ #<stockholm/krebs/2configs/shack/prometheus/server.nix>
+ <stockholm/krebs/2configs/shack/prometheus/node.nix>
+ #<stockholm/krebs/2configs/shack/prometheus/unifi.nix>
+ # grafana.shack
+ <stockholm/krebs/2configs/shack/grafana.nix>
];
# use your own binary cache, fallback use cache.nixos.org (which is used by
# apt-cacher-ng in first place)
- services.influxdb.enable = true;
-
# local discovery in shackspace
nixpkgs.config.packageOverrides = pkgs: { tinc = pkgs.tinc_pre; };
krebs.tinc.retiolum.extraConfig = "TCPOnly = yes";
- services.grafana = {
- enable = true;
- addr = "0.0.0.0";
- users.allowSignUp = true;
- users.allowOrgCreate = true;
- users.autoAssignOrg = true;
- auth.anonymous.enable = true;
- security = import <secrets/grafana_security.nix>;
- };
- nix = {
- # use the up to date prism cache
- binaryCaches = [
- "https://cache.nixos.org/"
- ];
- binaryCachePublicKeys = [
- "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs="
- ];
- };
networking = {
firewall.enable = false;
firewall.allowedTCPPorts = [ 8088 8086 8083 ];
- interfaces."${ext-if}".ipv4.addresses = [{
- address = shack-ip;
- prefixLength = 20;
- }];
+ interfaces."${ext-if}".ipv4.addresses = [
+ {
+ address = shack-ip;
+ prefixLength = 20;
+ }
+ ];
defaultGateway = "10.42.0.1";
nameservers = [ "10.42.0.100" "10.42.0.200" ];
@@ -150,25 +117,26 @@ in
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
- swapDevices = [
- { device = "/dev/disk/by-label/swap"; }
- ];
- # fallout of ipv6calypse
- networking.extraHosts = ''
- hass.shack 10.42.2.191
- heidi.shack 10.42.2.135
- '';
-
users.extraUsers.root.openssh.authorizedKeys.keys = [
+ config.krebs.users."0x4A6F".pubkey
config.krebs.user