summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs')
-rw-r--r--krebs/2configs/reaktor2.nix6
-rw-r--r--krebs/2configs/shack/glados/default.nix1
-rw-r--r--krebs/2configs/shack/prometheus/alert-rules.nix4
-rw-r--r--krebs/3modules/external/default.nix25
-rw-r--r--krebs/3modules/github-known-hosts.nix2
-rw-r--r--krebs/3modules/iana-etc.nix2
-rw-r--r--krebs/5pkgs/haskell/reaktor2/default.nix22
-rw-r--r--krebs/5pkgs/override/default.nix19
-rw-r--r--krebs/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch (renamed from krebs/5pkgs/override/flameshot/flameshot_imgur_0.9.0.patch)0
-rw-r--r--krebs/5pkgs/override/flameshot/flameshot_imgur_0.6.0.patch34
-rw-r--r--krebs/5pkgs/simple/cidr2glob.nix5
-rw-r--r--krebs/5pkgs/simple/veroroute.nix28
-rw-r--r--krebs/nixpkgs-unstable.json8
-rw-r--r--krebs/nixpkgs.json8
14 files changed, 89 insertions, 75 deletions
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix
index 2ed0b08f..233fe2fd 100644
--- a/krebs/2configs/reaktor2.nix
+++ b/krebs/2configs/reaktor2.nix
@@ -61,7 +61,7 @@ let
];
hooks.PRIVMSG = [
{
- pattern = "^bier bal(an(ce)?)?$";
+ pattern = "^bier (ballern|bal(an(ce)?)?)$";
activate = "match";
command = {
env = {
@@ -90,6 +90,10 @@ let
amt=$2
unit=$3
printf '%s\n %s %d %s\n %s %d %s\n' "$(date -Id)" "$tonick" "$amt" "$unit" "$_from" "$(expr 0 - "''${amt#+}")" "$unit" >> $state_file
+ ${pkgs.hledger}/bin/hledger -f $state_file bal -N -O csv \
+ | ${pkgs.coreutils}/bin/tail +2 \
+ | ${pkgs.miller}/bin/mlr --icsv --opprint cat \
+ | ${pkgs.gnugrep}/bin/grep "$_from"
'';
};
}
diff --git a/krebs/2configs/shack/glados/default.nix b/krebs/2configs/shack/glados/default.nix
index e7860338..7c941a66 100644
--- a/krebs/2configs/shack/glados/default.nix
+++ b/krebs/2configs/shack/glados/default.nix
@@ -46,7 +46,6 @@ in {
services.home-assistant =
{
enable = true;
- autoExtraComponents = true;
package = unstable.home-assistant.overrideAttrs (old: {
doInstallCheck = false;
});
diff --git a/krebs/2configs/shack/prometheus/alert-rules.nix b/krebs/2configs/shack/prometheus/alert-rules.nix
index 65e5d900..5ba49ede 100644
--- a/krebs/2configs/shack/prometheus/alert-rules.nix
+++ b/krebs/2configs/shack/prometheus/alert-rules.nix
@@ -8,7 +8,7 @@ in {
{ name = "shack-env";
rules = [
{
- alert = "RootPartitionFull";
+ alert = "Wolf RootPartitionFull";
for = "30m";
expr = ''(node_filesystem_avail_bytes{alias="wolf.shack",mountpoint="/"} * 100) / node_filesystem_size_bytes{alias="wolf.shack",mountpoint="/"} < ${disk_free_threshold}'';
labels.severity = "warning";
@@ -24,7 +24,7 @@ in {
6. as a last resort the root disk can be expanded via `lvresize -L +10G /dev/pool/root && btrfs filesystem resize max /` '';
}
{
- alert = "RootPartitionFull";
+ alert = "Puyak RootPartitionFull";
for = "30m";
expr = ''(node_filesystem_avail_bytes{alias="puyak.shack",mountpoint="/"} * 100) / node_filesystem_size_bytes{alias="puyak.shack",mountpoint="/"} < ${disk_free_threshold}'';
labels.severity = "warning";
diff --git a/krebs/3modules/external/default.nix b/krebs/3modules/external/default.nix
index 03faef94..8ddd565d 100644
--- a/krebs/3modules/external/default.nix
+++ b/krebs/3modules/external/default.nix
@@ -588,6 +588,31 @@ in {
};
};
};
+ aland = {
+ owner = config.krebs.users.xkey;
+ nets = {
+ retiolum = {
+ ip4.addr = "10.243.12.34";
+ aliases = [ "aland.r" ];
+ tinc.pubkey = ''
+ -----BEGIN RSA PUBLIC KEY-----
+ MIICCgKCAgEAwR1e8/4Lx7gqSyFhA5WpfT4LsnXqYARR6y+gYAOSre6wMvBm/OBY
+ CKEYCCfqQD3naukID9FqleXaZdIxp6xxBIYZ1yi1Xn032MPP0S37oZAxJlXvlEaU
+ plG9ct6Zh6qTzpghP2UyYD4RxhLwvsRTycwLF93D+a1z1/CNNDLSoTS11BLtvhDb
+ DmxTVY/1hWJUiVR4KyRsYnJ3N1Heg/4R/Su4oFm+DatfFYdzhaNsk9q3YYIRdRcx
+ aHLF65ygVTjG/rUJp/OvkeU1G5rc0ldpd7zR8N8kkjgI1lmZe50mUGghKr1zexV+
+ OkIjXGrwTk4RZk3kZO6PZu56rrsR8HZirfrtJWRy7UgAm3S/lZku7X4SN3+7pfL1
+ ero6/XB4CHeQ9OpQemcR5o6AR0ncE0TApqeoLd1U710XmwM09ifawAO3jm9ER19X
+ TKFHeBzqsToPmternXnAKgg2NYyKStkavQu6JTl/uOXdfqfMc9TU6mzV8aBo7ZDa
+ aLdlg0phcFCcZT8zJGzA3des70AHWmQ7G49pBysnXk8p+1l3SPazGAlIWBCT6oZX
+ zUUauGEgsuTkDC+JijUm/1HrrMfiigHeBTZKPLqe/75MkumukXqTzd3zfUEcA5Vf
+ VgEnL2jNVFfocJtmhLQdkmnSiIQslRSOHMC94ZWa0ku0kHZ3XawwwY0CAwEAAQ==
+ -----END RSA PUBLIC KEY-----
+ '';
+ tinc.pubkey_ed25519 = "gOEzoUsuJyaGIjoZIyS9uZa+zLYfN6BEZrbCTeAWW7A";
+ };
+ };
+ };
papawhakaaro = {
owner = config.krebs.users.feliks;
nets = {
diff --git a/krebs/3modules/github-known-hosts.nix b/krebs/3modules/github-known-hosts.nix
index 7bdf5bb7..eec719f2 100644
--- a/krebs/3modules/github-known-hosts.nix
+++ b/krebs/3modules/github-known-hosts.nix
@@ -57,6 +57,7 @@
"20.201.28.151"
"20.205.243.166"
"102.133.202.242"
+ "20.248.137.48"
"18.181.13.223"
"54.238.117.237"
"54.168.17.15"
@@ -70,6 +71,7 @@
"20.201.28.152"
"20.205.243.160"
"102.133.202.246"
+ "20.248.137.50"
];
publicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==";
};
diff --git a/krebs/3modules/iana-etc.nix b/krebs/3modules/iana-etc.nix
index e8037128..9ed5f29c 100644
--- a/krebs/3modules/iana-etc.nix
+++ b/krebs/3modules/iana-etc.nix
@@ -34,7 +34,7 @@ with import <stockholm/lib>;
'')
(filter (proto: entry.${proto} != null) ["tcp" "udp"])}
'') (attrValues config.krebs.iana-etc.services)}
- cat ${pkgs.iana_etc}/etc/services
+ cat ${pkgs.iana-etc}/etc/services
} |
sort -b -k 2,2 -u > $out
'');
diff --git a/krebs/5pkgs/haskell/reaktor2/default.nix b/krebs/5pkgs/haskell/reaktor2/default.nix
index 9ff2bd88..7f89c0b1 100644
--- a/krebs/5pkgs/haskell/reaktor2/default.nix
+++ b/krebs/5pkgs/haskell/reaktor2/default.nix
@@ -1,18 +1,18 @@
{ mkDerivation, aeson, async, attoparsec, base, blessings
-, bytestring, containers, data-default, fetchgit, filepath
-, hashable, lens, lens-aeson, network, network-simple
-, network-simple-tls, network-uri, pcre-light, process, random
-, servant-server, lib, string-conversions, stringsearch, text
-, time, transformers, unagi-chan, unix, unordered-containers
-, vector, wai, warp
+, bytestring, containers, data-default, filepath, hashable, lens
+, lens-aeson, lib, network, network-simple, network-simple-tls
+, network-uri, pcre-light, process, random, servant-server
+, string-conversions, stringsearch, text, time, transformers
+, unagi-chan, unix, unordered-containers, vector, wai, warp
+, fetchgit
}:
-mkDerivation rec {
+mkDerivation {
pname = "reaktor2";
- version = "0.4.0a";
+ version = "0.4.2";
src = fetchgit {
- url = "https://cgit.lassul.us/reaktor2";
- sha256 = "sha256-x1i2TWcycYVFij6832xaBiQa1RQ1VmSfu5Qt1QrUtds=";
- rev = "6d3eb6de5e770ee26874bb7449934f0c55bd1efa";
+ url = "https://cgit.krebsco.de/reaktor2";
+ hash = "sha256-JPQyy0hDSH5JqQGjwoO5BNsD4qk+GKP1VH+j4/2cqes";
+ rev = "53a11f421fb18e8687fa06e5511cea8bd9defc36";
fetchSubmodules = true;
};
isLibrary = false;
diff --git a/krebs/5pkgs/override/default.nix b/krebs/5pkgs/override/default.nix
index 1dd694b7..ae42bc1a 100644
--- a/krebs/5pkgs/override/default.nix
+++ b/krebs/5pkgs/override/default.nix
@@ -17,21 +17,10 @@ self: super: {
repo = "flameshot";
rev = "v${version}";
sha256 = "sha256-rZUiaS32C77tFJmEkw/9MGbVTVscb6LOCyWaWO5FyR4=";
- };
- patches = old.patches or [] ++ {
- "0.6.0" = [
- ./flameshot/flameshot_imgur_0.6.0.patch
- ];
- "0.9.0" = [
- ./flameshot/flameshot_imgur_0.9.0.patch
- ];
- "0.10.1" = [
- ./flameshot/flameshot_imgur_0.9.0.patch
- ];
- "0.10.2" = [
- ./flameshot/flameshot_imgur_0.9.0.patch
- ];
- }.${old.version} or [];
+ };
+ patches = old.patches or [] ++ [
+ ./flameshot/flameshot_imgur_0.10.2.patch
+ ];
});
# https://github.com/proot-me/PRoot/issues/106
diff --git a/krebs/5pkgs/override/flameshot/flameshot_imgur_0.9.0.patch b/krebs/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch
index c4c0bf38..c4c0bf38 100644
--- a/krebs/5pkgs/override/flameshot/flameshot_imgur_0.9.0.patch
+++ b/krebs/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch
diff --git a/krebs/5pkgs/override/flameshot/flameshot_imgur_0.6.0.patch b/krebs/5pkgs/override/flameshot/flameshot_imgur_0.6.0.patch
deleted file mode 100644
index 92023554..00000000
--- a/krebs/5pkgs/override/flameshot/flameshot_imgur_0.6.0.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/src/tools/imgur/imguruploader.cpp
-+++ b/src/tools/imgur/imguruploader.cpp
-@@ -40,6 +40,7 @@
- #include <QTimer>
- #include <QJsonDocument>
- #include <QJsonObject>
-+#include <stdlib.h>
-
- ImgurUploader::ImgurUploader(const QPixmap &capture, QWidget *parent) :
- QWidget(parent), m_pixmap(capture)
-@@ -74,7 +75,10 @@ void ImgurUploader::handleReply(QNetworkReply *reply) {
- QJsonObject json = response.object();
- QJsonObject data = json["data"].toObject();
- m_imageURL.setUrl(data["link"].toString());
-- m_deleteImageURL.setUrl(QString("https://imgur.com/delete/%1").arg(
-+ char *deleteImageURLPattern = secure_getenv("IMGUR_DELETE_URL");
-+ if (deleteImageURLPattern == NULL)
-+ deleteImageURLPattern = "https://imgur.com/delete/%1";
-+ m_deleteImageURL.setUrl(QString(deleteImageURLPattern).arg(
- data["deletehash"].toString()));
- onUploadOk();
- } else {
-@@ -105,7 +109,10 @@ void ImgurUploader::upload() {
- QString description = FileNameHandler().parsedPattern();
- urlQuery.addQueryItem("description", description);
-
-- QUrl url("https://api.imgur.com/3/image");
-+ char *createImageURLPattern = secure_getenv("IMGUR_CREATE_URL");
-+ if (createImageURLPattern == NULL)
-+ createImageURLPattern = "https://api.imgur.com/3/image";
-+ QUrl url(createImageURLPattern);
- url.setQuery(urlQuery);
- QNetworkRequest request(url);
- request.setHeader(QNetworkRequest::ContentTypeHeader,
diff --git a/krebs/5pkgs/simple/cidr2glob.nix b/krebs/5pkgs/simple/cidr2glob.nix
index 9b0b3f86..47a75ea4 100644
--- a/krebs/5pkgs/simple/cidr2glob.nix
+++ b/krebs/5pkgs/simple/cidr2glob.nix
@@ -1,6 +1,7 @@
-{ python, writeScriptBin, ... }:
+{ python3, writeScriptBin, ... }:
let
+ python = python3;
pythonEnv = python.withPackages (ps: [ ps.netaddr ]);
in
writeScriptBin "cidr2glob" ''
@@ -25,6 +26,6 @@ in
if __name__ == "__main__":
for cidr in sys.stdin:
for glob in cidr2glob(cidr):
- print glob
+ print(glob)
''
diff --git a/krebs/5pkgs/simple/veroroute.nix b/krebs/5pkgs/simple/veroroute.nix
new file mode 100644
index 00000000..e40c98e7
--- /dev/null
+++ b/krebs/5pkgs/simple/veroroute.nix
@@ -0,0 +1,28 @@
+{ pkgs }:
+
+pkgs.stdenv.mkDerivation rec {
+ pname = "veroroute";
+ version = "2.28";
+
+ src = pkgs.fetchurl {
+ url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+ sha256 = "04dig0g4v1rz50mjj1k6jk99rqbg24hdx8kzrlwv0dlxm567lvc7";
+ };
+
+ buildInputs = [
+ pkgs.qt5.qtbase
+ ];
+ nativeBuildInputs = [
+ pkgs.qt5.wrapQtAppsHook
+ ];
+
+ buildPhase = ''
+ qmake Src/veroroute.pro
+ make
+ '';
+
+ installPhase = ''
+ sed -i 's;/usr;;g' veroroute-install.sh
+ pkgdir=$out bash ./veroroute-install.sh
+ '';
+}
diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json
index b5f64ae2..97294d16 100644
--- a/krebs/nixpkgs-unstable.json
+++ b/krebs/nixpkgs-unstable.json
@@ -1,9 +1,9 @@
{
"url": "https://github.com/NixOS/nixpkgs",
- "rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5",
- "date": "2022-06-26T12:26:21+02:00",
- "path": "/nix/store/d7wgj3chybniji4l6z73a0gh67hxym3b-nixpkgs",
- "sha256": "1z28a3gqbv62sxahlssc5a722kh46f26f5ss3arbxpv7a1272vf1",
+ "rev": "af9e00071d0971eb292fd5abef334e66eda3cb69",
+ "date": "2022-08-15T16:41:53+02:00",
+ "path": "/nix/store/6dvbaqmjjxx2rlh6986y2mj05083xy33-nixpkgs",
+ "sha256": "1mdwy0419m5i9ss6s5frbhgzgyccbwycxm5nal40c8486bai0hwy",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json
index c9e1cd5e..3f3290ef 100644
--- a/krebs/nixpkgs.json
+++ b/krebs/nixpkgs.json
@@ -1,9 +1,9 @@
{
"url": "https://github.com/NixOS/nixpkgs",
- "rev": "cd90e773eae83ba7733d2377b6cdf84d45558780",
- "date": "2022-06-26T19:49:46+02:00",
- "path": "/nix/store/bmaf6x4yxcsvs5wp4rayvai4lw7g6snr-nixpkgs",
- "sha256": "1b2wn1ncx9x4651vfcgyqrm93pd7ghnrgqjbkf6ckkpidah69m03",
+ "rev": "3d47bbaa26e7a771059d828eecf3bd8bf28a8b0f",
+ "date": "2022-08-15T18:36:06+02:00",
+ "path": "/nix/store/h05whycbmdvxzxp2zqzfm2rjbanr77q9-nixpkgs",
+ "sha256": "0xnk777bwrdw2zklnhs4sq6rgzb4gn002ybwlizj35g3vy5rppvs",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,