summaryrefslogtreecommitdiffstats
path: root/makefu/2configs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-06-27 10:32:48 +0200
committerlassulus <lassulus@lassul.us>2020-06-27 10:32:48 +0200
commit9f5626098433dddacc76b48911ae4af7b5b66ddb (patch)
tree71691a924ff71aa14aacf2627bce7cd36a1fcb47 /makefu/2configs
parente80ff853ad7e764956769a1d6746c80b4eb3055e (diff)
parent1ed4ded92f83e4d2f91b0b46c514acb420b7e0c3 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs')
-rw-r--r--makefu/2configs/kdeconnect.nix6
-rw-r--r--makefu/2configs/stats/telegraf/default.nix19
-rw-r--r--makefu/2configs/stats/telegraf/hamstats.nix60
-rw-r--r--makefu/2configs/tools/android-pentest.nix2
-rw-r--r--makefu/2configs/tools/core-gui.nix1
-rw-r--r--makefu/2configs/tools/core.nix2
-rw-r--r--makefu/2configs/tools/dev.nix1
-rw-r--r--makefu/2configs/tools/extra-gui.nix1
-rw-r--r--makefu/2configs/tools/media.nix2
9 files changed, 71 insertions, 23 deletions
diff --git a/makefu/2configs/kdeconnect.nix b/makefu/2configs/kdeconnect.nix
new file mode 100644
index 000000000..ca025ee43
--- /dev/null
+++ b/makefu/2configs/kdeconnect.nix
@@ -0,0 +1,6 @@
+{pkgs, ... }:
+{
+ environment.systemPackages = with pkgs; [ kdeconnect ];
+ networking.firewall.allowedUDPPortRanges = [ { from = 1714; to = 1764; } ];
+ networking.firewall.allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
+}
diff --git a/makefu/2configs/stats/telegraf/default.nix b/makefu/2configs/stats/telegraf/default.nix
index c60539c71..5a81e2749 100644
--- a/makefu/2configs/stats/telegraf/default.nix
+++ b/makefu/2configs/stats/telegraf/default.nix
@@ -12,13 +12,18 @@ in {
urls = [ url ];
database = "telegraf";
}];
- mqtt = [{
- servers = [ mqtt_server ];
- topic_prefix = "/telegraf";
- data_format = "json";
- qos = 0;
- batch = false;
- }];
+ #file = [{ # debugging
+ # files = [ "stdout" ];
+ # data_format = "influx";
+ #}];
+
+ #mqtt = [{
+ # servers = [ mqtt_server ];
+ # topic_prefix = "/telegraf";
+ # data_format = "json";
+ # qos = 0;
+ # batch = false;
+ #}];
};
};
};
diff --git a/makefu/2configs/stats/telegraf/hamstats.nix b/makefu/2configs/stats/telegraf/hamstats.nix
index 88c1b6d5d..0b1723062 100644
--- a/makefu/2configs/stats/telegraf/hamstats.nix
+++ b/makefu/2configs/stats/telegraf/hamstats.nix
@@ -1,28 +1,60 @@
-{ pkgs, ...}:
+{ pkgs, lib, ...}:
let
- genTopic = name: topic: tags: {
+ genTopic_zigbee = name: tags: {
servers = [ "tcp://localhost:1883" ];
username = "stats";
- password = builtins.readFile <secrets/mqtt/stats>;
+ password = lib.removeSuffix "\n" (builtins.readFile <secrets/mqtt/stats>);
qos = 0;
connection_timeout = "30s";
- topics = [ topic ];
- tags = tags;
+ topics = [ "/ham/zigbee/${name}" ];
+ inherit tags;
persistent_session = false;
- name_override = name;
+ name_override = "zigbee ${tags.room} ${name}";
data_format = "json";
+ json_string_fields = [ "linkquality" "temperature" "humidity" "pressure" "battery" "contact" ];
+ # json_name_key = <filed which defines the name>
+
+ };
+ genTopic_plain = name: topic: tags: {
+ servers = [ "tcp://localhost:1883" ];
+ username = "stats";
+ password = lib.removeSuffix "\n" (builtins.readFile <secrets/mqtt/stats>);
+ qos = 0;
+ connection_timeout = "30s";
+ topics = [ topic ];
+ inherit tags;
+ persistent_session = false;
+ name_override = tags.sensor;
+ data_type = "float";
+ data_format = "value";
# json_query = tags.sensor; #TODO?
};
- hamStat = host:
- sensor:
- (genTopic sensor
- "/ham/${host}/${sensor}/tele/SENSOR"
- {"host" = host;
+ esensor = room: name: sensor:
+ (genTopic_plain sensor ''/ham/${room}/${name}/sensor/${sensor}/state''
+ { inherit room sensor name;
+ "scope" = "ham";
+ } );
+ zsensor = room: name:
+ (genTopic_zigbee name
+ { inherit room name;
"scope" = "ham";
- "sensor" = sensor;
} );
- bme = host: [(hamStat host "BME280")];
+ zigbee_temphum = room: name: [
+ (zsensor room name)
+ ];
+ esphome_temphum = room: name: [
+ (esensor room name ''${room}_${name}_temperature'')
+ (esensor room name ''${room}_${name}_humidity'')
+ (esensor room name ''${room}_${name}_pressure'')
+ ];
in {
- services.telegraf.extraConfig.inputs.mqtt_consumer = (bme "schlafzimmer");
+ services.telegraf.extraConfig.inputs.mqtt_consumer =
+ (zigbee_temphum "Wohnzimmer" "temp1")
+ ++ (zigbee_temphum "Badezimmer" "temp2")
+ ++ (zigbee_temphum "Kinderzimmer" "temp3")
+ ++ (esphome_temphum "arbeitszimmer" "box")
+ ++ (esphome_temphum "schlafzimmer" "plug")
+ ++ (esphome_temphum "wohnzimmer" "plug")
+ ++ (esphome_temphum "terrasse" "plug");
}
diff --git a/makefu/2configs/tools/android-pentest.nix b/makefu/2configs/tools/android-pentest.nix
index 036f6e6fe..766aacb9e 100644
--- a/makefu/2configs/tools/android-pentest.nix
+++ b/makefu/2configs/tools/android-pentest.nix
@@ -7,7 +7,7 @@
nmap
msf
drozer
- dex2jar
+ #dex2jar
apktool
jd-gui
# android-studio
diff --git a/makefu/2configs/tools/core-gui.nix b/makefu/2configs/tools/core-gui.nix
index ee4f05980..95b6b0f5d 100644
--- a/makefu/2configs/tools/core-gui.nix
+++ b/makefu/2configs/tools/core-gui.nix
@@ -17,5 +17,6 @@
xdotool
xorg.xbacklight
scrot
+ libnotify
];
}
diff --git a/makefu/2configs/tools/core.nix b/makefu/2configs/tools/core.nix
index b4c3a431e..8339c9328 100644
--- a/makefu/2configs/tools/core.nix
+++ b/makefu/2configs/tools/core.nix
@@ -49,7 +49,7 @@ ${gnused}/bin/sed -i "''${1}d" ~/.ssh/known_hosts
populate
rxvt_unicode.terminfo
- krebspaste
+ kpaste
];
}
diff --git a/makefu/2configs/tools/dev.nix b/makefu/2configs/tools/dev.nix
index f184b5be5..276ed6cdc 100644
--- a/makefu/2configs/tools/dev.nix
+++ b/makefu/2configs/tools/dev.nix
@@ -39,5 +39,6 @@
# network related
sshuttle
pciutils
+ navi
];
}
diff --git a/makefu/2configs/tools/extra-gui.nix b/makefu/2configs/tools/extra-gui.nix
index 49b36a5d7..aae00b97d 100644
--- a/makefu/2configs/tools/extra-gui.nix
+++ b/makefu/2configs/tools/extra-gui.nix
@@ -8,6 +8,7 @@
inkscape
libreoffice
# skype
+ teams
synergy
tdesktop
virtmanager
diff --git a/makefu/2configs/tools/media.nix b/makefu/2configs/tools/media.nix
index 3f2cf3096..004222ba2 100644
--- a/makefu/2configs/tools/media.nix
+++ b/makefu/2configs/tools/media.nix
@@ -8,11 +8,13 @@
mumble
mplayer
# quodlibet # exfalso
+ tinymediamanager
plowshare
streamripper
youtube-dl
pulseeffects
+
];
}