summaryrefslogtreecommitdiffstats
path: root/krebs/2configs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/2configs')
-rw-r--r--krebs/2configs/container-networking.nix2
-rw-r--r--krebs/2configs/matterbridge.nix40
-rw-r--r--krebs/2configs/mud.nix2
-rw-r--r--krebs/2configs/news.nix2
-rw-r--r--krebs/2configs/reaktor2.nix1
-rw-r--r--krebs/2configs/security-workarounds.nix2
6 files changed, 44 insertions, 5 deletions
diff --git a/krebs/2configs/container-networking.nix b/krebs/2configs/container-networking.nix
index fa4488800..bf3fe711e 100644
--- a/krebs/2configs/container-networking.nix
+++ b/krebs/2configs/container-networking.nix
@@ -1,7 +1,7 @@
{ lib, ... }:
{
networking.nat.enable = true;
- networking.nat.internalInterfaces = ["ve-+"];
+ networking.nat.internalInterfaces = ["ve-+" "ctr+" ];
networking.nat.externalInterface = lib.mkDefault "et0";
networking.networkmanager.unmanaged = [ "interface-name:ve-*" ];
}
diff --git a/krebs/2configs/matterbridge.nix b/krebs/2configs/matterbridge.nix
new file mode 100644
index 000000000..a68aa292c
--- /dev/null
+++ b/krebs/2configs/matterbridge.nix
@@ -0,0 +1,40 @@
+{ pkgs, lib, ... }: {
+ services.matterbridge = {
+ enable = true;
+ configPath = let
+ bridgeBotToken = lib.strings.fileContents <secrets/telegram.token>;
+ in
+ toString ((pkgs.formats.toml {}).generate "config.toml" {
+ general = {
+ RemoteNickFormat = "[{NICK}] ";
+ Charset = "utf-8";
+ };
+ telegram.krebs.Token = bridgeBotToken;
+ irc = let
+ Nick = "ponte";
+ in {
+ hackint = {
+ Server = "irc.hackint.org:6697";
+ UseTLS = true;
+ inherit Nick;
+ };
+ };
+ gateway = [
+ {
+ name = "krebs-bridge";
+ enable = true;
+ inout = [
+ {
+ account = "irc.hackint";
+ channel = "#krebs";
+ }
+ {
+ account = "telegram.krebs";
+ channel = "-330372458";
+ }
+ ];
+ }
+ ];
+ });
+ };
+}
diff --git a/krebs/2configs/mud.nix b/krebs/2configs/mud.nix
index 30f232b64..a53596cc6 100644
--- a/krebs/2configs/mud.nix
+++ b/krebs/2configs/mud.nix
@@ -5,7 +5,7 @@
MUD_SERVER=''${MUD_SERVER:-127.0.0.1}
MUD_PORT=''${MUD_PORT:-8080}
- if $(${pkgs.netcat-openbsd}/bin/nc -z "$MUD_SERVER" "$MUD_PORT"); then
+ if $(${pkgs.libressl.nc}/bin/nc -z "$MUD_SERVER" "$MUD_PORT"); then
${nvim}/bin/nvim \
+"let g:instant_username = \"$MUD_NICKNAME\"" \
+":InstantJoinSession $MUD_SERVER $MUD_PORT" \
diff --git a/krebs/2configs/news.nix b/krebs/2configs/news.nix
index 1f966bf24..9e2cec10a 100644
--- a/krebs/2configs/news.nix
+++ b/krebs/2configs/news.nix
@@ -164,7 +164,7 @@
if [ ''${#youtube_url} -eq 24 ]; then
youtube_id=$youtube_url
else
- youtube_id=$(${pkgs.youtube-dl}/bin/youtube-dl --max-downloads 1 -j "$youtube_url" | ${pkgs.jq}/bin/jq -r '.channel_id')
+ youtube_id=$(${pkgs.yt-dlp}/bin/yt-dlp --max-downloads 1 -j "$youtube_url" | ${pkgs.jq}/bin/jq -r '.channel_id')
fi
echo "brockman: add yt_$youtube_nick http://rss.r/?action=display&bridge=Youtube&context=By+channel+id&c=$youtube_id&duration_min=&duration_max=&format=Mrss"
'';
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix
index 305d31405..205cc96f4 100644
--- a/krebs/2configs/reaktor2.nix
+++ b/krebs/2configs/reaktor2.nix
@@ -148,6 +148,7 @@ in {
services.nginx = {
virtualHosts."agenda.r" = {
+ serverAliases = [ "kri.r" ];
locations."= /index.html".extraConfig = ''
alias ${pkgs.writeText "agenda.html" ''
<!DOCTYPE html>
diff --git a/krebs/2configs/security-workarounds.nix b/krebs/2configs/security-workarounds.nix
index 0743f2b49..b1a492f51 100644
--- a/krebs/2configs/security-workarounds.nix
+++ b/krebs/2configs/security-workarounds.nix
@@ -1,6 +1,4 @@
{ config, lib, pkgs, ... }:
with import <stockholm/lib>;
{
- # https://github.com/Lassulus/CVE-2021-4034
- security.wrappers.pkexec.source = lib.mkForce (pkgs.writeText "pkexec" "");
}