summaryrefslogtreecommitdiffstats
path: root/makefu
diff options
context:
space:
mode:
Diffstat (limited to 'makefu')
-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
-rw-r--r--makefu/5pkgs/awesomecfg/full.cfg2
-rw-r--r--makefu/5pkgs/debmirror/default.nix2
-rw-r--r--makefu/5pkgs/dex2jar/default.nix48
-rw-r--r--makefu/5pkgs/git-xlsx-textconv/default.nix3
-rw-r--r--makefu/5pkgs/navi/default.nix37
-rw-r--r--makefu/5pkgs/shiori/default.nix4
-rw-r--r--makefu/5pkgs/soldat/default.nix118
-rw-r--r--makefu/5pkgs/youtube-dl2kodi/default.nix11
17 files changed, 243 insertions, 76 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
+
];
}
diff --git a/makefu/5pkgs/awesomecfg/full.cfg b/makefu/5pkgs/awesomecfg/full.cfg
index 2abfe503d..d96b61ad6 100644
--- a/makefu/5pkgs/awesomecfg/full.cfg
+++ b/makefu/5pkgs/awesomecfg/full.cfg
@@ -569,7 +569,7 @@ local os = {
-- {{{ autostart
do
- awful.spawn("urxvt", { tag = tags[1] }) # dev shell
+ awful.spawn("urxvt", { tag = tags[1] }) -- dev shell
awful.spawn("urxvt -e mosh makefu@gum.i", { tag = tags[2] })
awful.spawn("firefox", { tag = tags[3] })
awful.spawn("telegram-desktop", { tag = tags[4] })
diff --git a/makefu/5pkgs/debmirror/default.nix b/makefu/5pkgs/debmirror/default.nix
index 67b34b6ee..d1f007de6 100644
--- a/makefu/5pkgs/debmirror/default.nix
+++ b/makefu/5pkgs/debmirror/default.nix
@@ -1,7 +1,7 @@
{ stdenv, pkgs, fetchgit }:
pkgs.perlPackages.buildPerlPackage rec {
- name = "debmirror-${version}";
+ pname = "debmirror";
version = "2.25";
enableParallelBuilding = true;
diff --git a/makefu/5pkgs/dex2jar/default.nix b/makefu/5pkgs/dex2jar/default.nix
deleted file mode 100644
index 76557ce67..000000000
--- a/makefu/5pkgs/dex2jar/default.nix
+++ /dev/null
@@ -1,48 +0,0 @@
-{ stdenv, lib, pkgs, fetchurl, jre, makeWrapper, unzip }:
-stdenv.mkDerivation rec {
- name = "${packageName}-${version}";
- packageName = "dex2jar";
- version = "2.0";
-
- src = fetchurl {
- url = "mirror://sourceforge/${packageName}/${name}.zip";
- sha256 = "1g3mrbyl8sdw1nhp17z23qbfzqpa0w2yxrywgphvd04jdr6yn1vr";
- };
-
- nativeBuildInputs = [ makeWrapper unzip ];
-
- unpackPhase = ''
- unzip $src
- cd ${name}
- '';
-
- configurePhase = ":";
-
- buildPhase = ''
- rm *.bat
- chmod +x *.sh
- '';
-
- installPhase = ''
- f=$out/lib/dex2jar/
- bin=$out/bin
-
- mkdir -p $f $bin
-
- # fixup path to java
- sed -i 's#^java#${pkgs.jre}/bin/java#' d2j_invoke.sh
-
- mv * $f
- for i in $f/*.sh; do
- n=$(basename ''${i%.sh})
- makeWrapper $i $bin/$n
- done
- '';
- fixupPhase = ":";
-
- meta = {
- homepage = https://sourceforge.net/projects/dex2jar/;
- description = "Tools to work with android .dex and java .class files";
- license = lib.licenses.asl20;
- };
-}
diff --git a/makefu/5pkgs/git-xlsx-textconv/default.nix b/makefu/5pkgs/git-xlsx-textconv/default.nix
index 66dde76ef..ffb9b003c 100644
--- a/makefu/5pkgs/git-xlsx-textconv/default.nix
+++ b/makefu/5pkgs/git-xlsx-textconv/default.nix
@@ -27,4 +27,5 @@ in
sha256 = "055f3caj1y8v7sc2pz9q0dfyi2ij77d499pby4sjfvm5kjy9msdi";
};
propagatedBuildInputs = [ go-xlsx ];
-}).bin
+ #meta.broken = true;
+})
diff --git a/makefu/5pkgs/navi/default.nix b/makefu/5pkgs/navi/default.nix
new file mode 100644
index 000000000..1e8274f80
--- /dev/null
+++ b/makefu/5pkgs/navi/default.nix
@@ -0,0 +1,37 @@
+# via https://git.ingolf-wagner.de/palo/nixos-config/src/master/pkgs/navi/default.nix
+
+{ rustPlatform, fetchFromGitHub, stdenv, fzf, makeWrapper, openssl, pkgconfig }:
+
+rustPlatform.buildRustPackage rec {
+ pname = "navi";
+ version = "2.1.1";
+
+ src = fetchFromGitHub {
+ owner = "denisidoro";
+ repo = "navi";
+ rev = "v${version}";
+ #rev = "${version}";
+ sha256 = "1195f7c3ij2mkv0k1h9fwn6jkyjb01w0p6mj2xc39w5f6i0c0hwp";
+ };
+
+ cargoSha256 = "0ks25w0dncaiw3ma05r8jrng3cczancrynnpgdksbvgz49lg3wjw";
+
+ postInstall = ''
+ mkdir -p $out/share/navi/
+ mv shell $out/share/navi/
+
+ wrapProgram "$out/bin/navi" \
+ --suffix "PATH" : "${fzf}/bin"
+ '';
+ buildInputs = [ openssl ];
+ nativeBuildInputs = [ makeWrapper pkgconfig ];
+
+ meta = with stdenv.lib; {
+ description = "An interactive cheatsheet tool for the command-line";
+ homepage = "https://github.com/denisidoro/navi";
+ license = licenses.asl20;
+ platforms = platforms.unix;
+ maintainers = with maintainers; [ mrVanDalo ];
+ };
+}
+
diff --git a/makefu/5pkgs/shiori/default.nix b/makefu/5pkgs/shiori/default.nix
index c604fbbde..ee4aa9304 100644
--- a/makefu/5pkgs/shiori/default.nix
+++ b/makefu/5pkgs/shiori/default.nix
@@ -1,6 +1,6 @@
-{ go_1_12, buildGoPackage, fetchFromGitHub }:
+{ go_1_14, buildGoPackage, fetchFromGitHub }:
let
- builder = buildGoPackage.override { go = go_1_12; };
+ builder = buildGoPackage.override { go = go_1_14; };
in
builder rec {
name = "shiori-${version}";
diff --git a/makefu/5pkgs/soldat/default.nix b/makefu/5pkgs/soldat/default.nix
new file mode 100644
index 000000000..7518ddee5
--- /dev/null
+++ b/makefu/5pkgs/soldat/default.nix
@@ -0,0 +1,118 @@
+{ stdenv,fpc,zip, fetchFromGitHub, autoPatchelfHook, callPackage,
+freetype,openal,x11,SDL2,physfs_2, protobuf, openssl, cmake, ninja,
+meson,pkgconfig, makeWrapper }:
+
+let
+ GameNetworkingSockets = stdenv.mkDerivation rec {
+ pname = "GameNetworkingSockets";
+ version = "2020-02-27";
+
+ src = fetchFromGitHub {
+ sha256 = "1vlrqjpqmdv1gphj2bkqg0bljqxfv75say6vrcnk9z14irih9a24";
+ owner = "ValveSoftware";
+ repo = pname;
+ rev = "36d41513e9a25d7ad4c2b37826d6594aaf185374";
+ };
+
+ mesonFlags = [ "-Dlight_tests=true" ];
+
+ buildInputs = [ protobuf openssl ];
+ nativeBuildInputs = [ pkgconfig meson cmake ninja ];
+ installPhase = ''
+ mkdir -p $out/lib $out/include; find .
+ cp src/libGameNetworkingSockets.so $out/lib/
+ cp -r ../include $out/
+ '';
+
+
+ #outputs = [ "out" "dev" "lib" ];
+
+ meta = with stdenv.lib; {
+ description = "WebDav server implementation and library using libsoup";
+ homepage = "https://wiki.gnome.org/phodav";
+ license = licenses.lgpl21;
+ maintainers = with maintainers; [ gnidorah ];
+ platforms = platforms.linux;
+ };
+ };
+ base = stdenv.mkDerivation {
+ pname = "soldat-base";
+ version = "1.0.0";
+ src = fetchFromGitHub {
+ repo = "base";
+ owner = "soldat";
+ rev = "3c002b9";
+ sha256 = "1wc1cmdavf6ng05wfcpxn124n23vivx4nn06irqmar6jmrklrbq0";
+ };
+ buildInputs = [ zip ];
+ buildPhase = ''
+ sh ./create_smod.sh
+ '';
+ installPhase = ''
+ install -D soldat.smod $out/soldat.smod
+ install -D client/play-regular.ttf $out/play-regular.ttf
+ '';
+ };
+ src = fetchFromGitHub {
+ repo = "soldat";
+ owner = "soldat";
+ rev = "6dee4d0";
+ sha256 = "0jjgdxprlvyf5kh2mb48vrp5nxk3h3jbaxmy7xmna80ssx4bjhxf";
+ };
+ stb = stdenv.mkDerivation {
+ pname = "soldat";
+ version = "1.0.0";
+ inherit src;
+ # makeFlags = [ "CFLAGS='-Fl${openal}/lib'" ];
+ buildPhase = ''
+ cd client
+ mkdir -p build/linux
+ make -C libs/stb/
+ '';
+ installPhase = ''
+ install -D build/libstb.so $out/lib/libstb.so
+ '';
+
+ buildInputs = [ ];
+ };
+in
+stdenv.mkDerivation {
+ pname = "soldat";
+ version = "1.0.0";
+ inherit src;
+ # makeFlags = [ "CFLAGS='-Fl${openal}/lib'" ];
+ buildPhase = ''
+ cd client
+ mkdir -p build/linux
+ make -C libs/stb/
+ make linux_x86_64
+ cd ../server
+ mkdir -p build/linux
+ make linux_x86_64
+ cd ..
+ '';
+
+ # TODO: soldatserver still needs to be copied out of the derivation to somewhere writeable
+ installPhase = ''
+ share=$out/share/soldat
+ bin=$out/bin
+ mkdir -p $share $bin
+
+ install ${base}/soldat.smod $share/soldat.smod
+ install ${base}/play-regular.ttf $share/play-regular.ttf;
+
+ install -m755 client/build/soldat_x64 $share/soldat_x64
+ install client/media/soldat.ico $share/soldat.ico
+
+ install -m755 server/build/soldatserver_x64 $share/soldatserver_x64
+
+ makeWrapper $share/soldat_x64 $bin/soldat --add-flags '-fs_portable 0'
+ makeWrapper $share/soldatserver_x64 $bin/soldatserver --add-flags '-fs_userpath ~/.local/share/Soldat/Soldat'
+ '';
+
+ nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
+ buildInputs = [
+ fpc freetype openal x11 SDL2 physfs_2 GameNetworkingSockets stb
+ ];
+}
+
diff --git a/makefu/5pkgs/youtube-dl2kodi/default.nix b/makefu/5pkgs/youtube-dl2kodi/default.nix
new file mode 100644
index 000000000..dfaab97cb
--- /dev/null
+++ b/makefu/5pkgs/youtube-dl2kodi/default.nix
@@ -0,0 +1,11 @@
+{ writeScriptBin, fetchFromGitHub, python3 }:
+let
+ src = fetchFromGitHub {
+ owner = "makefu";
+ repo = "youtube-dl2kodi";
+ rev = "88abe687842309d7bda0b7ba65b64e8058b855d6";
+ sha256 = "18csv2ighwgdgsm66hvw7fanv1pz522p24q59q2cwqy86fpg9y03";
+ };
+in writeScriptBin "youtube-dl2kodi" ''
+ ${python3}/bin/python ${src}/youtube-dl2kodi.py "$@"
+''