summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/repo-sync.yml1
-rw-r--r--krebs/2configs/reaktor2.nix165
-rw-r--r--krebs/3modules/external/mic92.nix29
-rw-r--r--krebs/nixpkgs-unstable.json8
-rw-r--r--krebs/nixpkgs.json8
-rw-r--r--lass/1systems/daedalus/config.nix2
-rw-r--r--makefu/2configs/bgt/etherpad.euer.krebsco.de.nix2
-rw-r--r--makefu/2configs/bgt/template.md40
-rw-r--r--makefu/5pkgs/otpauth/default.nix24
9 files changed, 223 insertions, 56 deletions
diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml
index 4284463f9..b4c91299f 100644
--- a/.github/workflows/repo-sync.yml
+++ b/.github/workflows/repo-sync.yml
@@ -5,6 +5,7 @@ on:
jobs:
repo-sync:
+ if: github.repository_owner == 'Mic92'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix
index 14e0a3d7a..4a33c33ec 100644
--- a/krebs/2configs/reaktor2.nix
+++ b/krebs/2configs/reaktor2.nix
@@ -9,11 +9,11 @@ let
hooks = pkgs.reaktor2-plugins.hooks;
commands = pkgs.reaktor2-plugins.commands;
- task = name: let
- rcFile = builtins.toFile "taskrc" ''
- confirmation=no
- '';
- in {
+ taskRcFile = builtins.toFile "taskrc" ''
+ confirmation=no
+ '';
+
+ task = name: {
pattern = "^${name}-([a-z]+)(?::?\\s*(.*))?";
activate = "match";
command = 1;
@@ -21,19 +21,19 @@ let
env.TASKDATA = "${stateDir}/${name}";
commands = {
add.filename = pkgs.writeDash "${name}-task-add" ''
- ${pkgs.taskwarrior}/bin/task rc:${rcFile} add "$1"
+ ${pkgs.taskwarrior}/bin/task rc:${taskRcFile} add "$1"
'';
list.filename = pkgs.writeDash "${name}-task-list" ''
- ${pkgs.taskwarrior}/bin/task rc:${rcFile} export \
+ ${pkgs.taskwarrior}/bin/task rc:${taskRcFile} export \
| ${pkgs.jq}/bin/jq -r '
.[] | select(.id != 0) | "\(.id) \(.description)"
'
'';
delete.filename = pkgs.writeDash "${name}-task-delete" ''
- ${pkgs.taskwarrior}/bin/task rc:${rcFile} delete "$1"
+ ${pkgs.taskwarrior}/bin/task rc:${taskRcFile} delete "$1"
'';
done.filename = pkgs.writeDash "${name}-task-done" ''
- ${pkgs.taskwarrior}/bin/task rc:${rcFile} done "$1"
+ ${pkgs.taskwarrior}/bin/task rc:${taskRcFile} done "$1"
'';
};
};
@@ -120,8 +120,138 @@ in {
uid = genid_uint31 "reaktor2";
home = stateDir;
isSystemUser = true;
+ extraGroups = [ "reaktor2" ];
+ };
+
+ users.groups.reaktor2 = {};
+
+ systemd.services.htgen-agenda.serviceConfig.StateDirectory = "reaktor2";
+ krebs.htgen.agenda = {
+ port = 8009;
+ user = {
+ name = "reaktor2";
+ home = stateDir;
+ };
+ script = ''. ${pkgs.writeDash "agenda" ''
+ echo "$Method $Request_URI" >&2
+ case "$Method" in
+ "GET")
+ printf 'HTTP/1.1 200 OK\r\n'
+ printf 'Connection: close\r\n'
+ printf '\r\n'
+ TASKDATA=/var/lib/reaktor2/agenda ${pkgs.taskwarrior}/bin/task rc:${taskRcFile} export
+ exit
+ ;;
+ esac
+ ''}'';
+ };
+
+ services.nginx = {
+ virtualHosts."agenda.r" = {
+ locations."= /index.html".extraConfig = ''
+ alias ${pkgs.writeText "agenda.html" ''
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Agenda</title>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <style>
+ html {
+ font-family: monospace;
+ }
+
+ dt {
+ float: left;
+ clear: left;
+ width: 30px;
+ text-align: right;
+ font-weight: bold;
+ }
+
+ dd {
+ margin: 0 0 0 40px;
+ padding: 0 0 0.5em 0;
+ }
+
+ .date {
+ color: grey;
+ font-style: italic;
+ }
+ </style>
+ </head>
+ <body>
+ <dl id="agenda"></dl>
+ <script>
+ const urlSearchParams = new URLSearchParams(window.location.search);
+ const params = Object.fromEntries(urlSearchParams.entries());
+
+ if (params.hasOwnProperty("style")) {
+ const cssUrls = params["style"].split(" ").filter((x) => x.length > 0);
+ for (const cssUrl of cssUrls)
+ fetch(cssUrl)
+ .then((response) =>
+ response.text().then((css) => {
+ const title = document.getElementsByTagName("head")[0];
+ const style = document.createElement("style");
+ style.appendChild(document.createTextNode(css));
+ title.appendChild(style);
+ })
+ )
+ .catch(console.log);
+ }
+
+ fetch("/agenda.json")
+ .then((response) => {
+ response.json().then((agenda) => {
+ const dl = document.getElementById("agenda");
+ for (const agendaItem of agenda) {
+ if (agendaItem.status !== "pending") continue;
+ // task warrior date format to ISO
+ const entryDate = agendaItem.entry.replace(
+ /(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z/,
+ "$1-$2-$3T$4:$5:$6Z"
+ );
+
+ const dt = document.createElement("dt");
+ dt.className = "id";
+ dt.appendChild(document.createTextNode(agendaItem.id.toString()));
+ dl.appendChild(dt);
+
+ const spanDate = document.createElement("span");
+ spanDate.className = "date";
+ spanDate.title = new Date(entryDate).toString();
+ spanDate.appendChild(document.createTextNode(entryDate));
+
+ const dd = document.createElement("dd");
+ dd.className = "description";
+ dd.appendChild(document.createTextNode(agendaItem.description));
+ dd.appendChild(document.createTextNode(" "));
+ dd.appendChild(spanDate);
+
+ dl.appendChild(dd);
+ }
+ });
+ })
+ .then((data) => console.log(data));
+ </script>
+ </body>
+</html>
+ ''};
+ '';
+ locations."/agenda.json".extraConfig = ''
+ proxy_set_header Host $host;
+ proxy_pass http://localhost:8009;
+ '';
+ extraConfig = ''
+ add_header 'Access-Control-Allow-Origin' '*';
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
+ '';
+ };
};
+ systemd.services.reaktor2-r.serviceConfig.DynamicUser = mkForce false;
+ systemd.services.reaktor2-hackint.serviceConfig.DynamicUser = mkForce false;
krebs.reaktor2 = {
hackint = {
hostname = "irc.hackint.org";
@@ -140,23 +270,6 @@ in {
username = "reaktor2";
port = "6697";
};
- freenode = {
- hostname = "irc.freenode.org";
- nick = "reaktor2|krebs";
- plugins = [
- {
- plugin = "register";
- config = {
- channels = [
- "#krebs"
- ];
- };
- }
- systemPlugin
- ];
- username = "reaktor2";
- port = "6697";
- };
r = {
nick = "reaktor2|krebs";
sendDelaySec = null;
diff --git a/krebs/3modules/external/mic92.nix b/krebs/3modules/external/mic92.nix
index bbefb8ed8..3ef693290 100644
--- a/krebs/3modules/external/mic92.nix
+++ b/krebs/3modules/external/mic92.nix
@@ -334,6 +334,26 @@ in {
'';
};
};
+ yasmin = {
+ owner = config.krebs.users.mic92;
+ nets.retiolum = {
+ ip4.addr = "10.243.29.197";
+ aliases = [
+ "yasmin.r"
+ ];
+ tinc.pubkey = ''
+ -----BEGIN RSA PUBLIC KEY-----
+ MIIBCgKCAQEAnQ6HGgUPVQbDIsLZAawZu4vK9yHF02aDrIWU9SdzpAddhM8yqWeC
+ f55W6zyjZuoQ2w4UNthDl6gjQM6A9B+nEMRNz3Rnhp57Lyi0a6HZHF2Eok9vJBiu
+ IRbVUxPpPKOGE09w0m5cLOfDfaZVdAT+80lQYoaasDr2VlRJNa2/arzaq847/SVg
+ vaf4gOmE+iIK+4ZDHqLcTn1WD6jy+aMChZU/zI31vZ8vM4oPuGh1xbcB3wKP3Vf3
+ OTqpGN86CdrdBahJkzNJzIXYsPsRaZ2+8dWTH9gJjI0z+yywQQCrrh9K/oJtDUHF
+ BwmNc150BoSLqwduSWLtBonCa9p2/y/TDQIDAQAB
+ -----END RSA PUBLIC KEY-----
+ Ed25519PublicKey = ZQt/OcrDlQZvtJyMEFcS6FKjtumBA9gBWr7VqGdbJBP
+ '';
+ };
+ };
martha = {
owner = config.krebs.users.mic92;
nets = rec {
@@ -389,6 +409,7 @@ in {
nCShp7V+MSmz4DnLK1HLksLVLmGyZmouGsLjYUnEa414EI6NJF3bfEO2ZRGaswyR
/vW066YCTe7wi+YrvrMDgkdbyfn/ecMTn2iXsTb4k9/fuO0+hsqL+isCAwEAAQ==
-----END RSA PUBLIC KEY-----
+ Ed25519PublicKey = 1wPa2cmQ4FUFw9289d0KdG1DcDuMNIYMWzIUnVVHu2P
'';
};
};
@@ -426,11 +447,12 @@ in {
owner = config.krebs.users.mic92;
nets = rec {
internet = {
- ip4.addr = "131.159.38.191";
- ip6.addr = "2a09:80c0:38::191";
+ ip4.addr = "131.159.102.1";
+ ip6.addr = "2a09:80c0:102::1";
aliases = [ "bill.i" ];
};
retiolum = {
+ via = internet;
addrs = [
config.krebs.hosts.bill.nets.retiolum.ip4.addr
config.krebs.hosts.bill.nets.retiolum.ip6.addr
@@ -465,6 +487,7 @@ in {
aliases = [ "nardole.i" ];
};
retiolum = {
+ via = internet;
addrs = [
config.krebs.hosts.nardole.nets.retiolum.ip4.addr
config.krebs.hosts.nardole.nets.retiolum.ip6.addr
@@ -618,6 +641,7 @@ in {
FK5qRrQFMRFB8KGV+n3+cx3XCM2q0ZPTNf06N+Usx6vTKLASa/4GaTcbBx+9Dndm
mFVWq9JjLa8e65tojzj8PhmgxqaNCf8aKwIDAQAB
-----END RSA PUBLIC KEY-----
+ Ed25519PublicKey = oRGc9V9G9GFsY1bZIaJamoDEAZU2kphlpxXOMBxI2GN
'';
};
};
@@ -640,6 +664,7 @@ in {
jb+EGlT/vq3+oGNFJ7Shy/VsR5GLDoZ5KCsT45DM87lOjGB7m+bOdizZQtWmJtC/
/btEPWJPAD9lIY2iGtPrmeMWDNTW9c0iCwIDAQAB
-----END RSA PUBLIC KEY-----
+ Ed25519PublicKey = dzjT09UeUGJCbUFrBo+FtbnXrsxFQnmqmJw7tjpJQJL
'';
};
};
diff --git a/krebs/nixpkgs-unstable.json b/krebs/nixpkgs-unstable.json
index 967f0b426..17b0619ed 100644
--- a/krebs/nixpkgs-unstable.json
+++ b/krebs/nixpkgs-unstable.json
@@ -1,9 +1,9 @@
{
"url": "https://github.com/NixOS/nixpkgs",
- "rev": "dd14e5d78e90a2ccd6007e569820de9b4861a6c2",
- "date": "2021-07-24T08:14:16-04:00",
- "path": "/nix/store/0z5nrrjzmjcicjhhdrqb9vgm56zxysk3-nixpkgs",
- "sha256": "1zmhwx1qqgl1wrrb9mjkck508887rldrnragvximhd7jrh1ya3fb",
+ "rev": "6ef4f522d63f22b40004319778761040d3197390",
+ "date": "2021-08-08T17:34:03-06:00",
+ "path": "/nix/store/81sh4z8lwwz5z5dw3wpp715x23jis8db-nixpkgs",
+ "sha256": "0cz02l0mdjr5vnv0kfkiabdjc3mv26lva414ksaf3xpan3sp08s1",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
diff --git a/krebs/nixpkgs.json b/krebs/nixpkgs.json
index 5086b8af3..07db3783f 100644
--- a/krebs/nixpkgs.json
+++ b/krebs/nixpkgs.json
@@ -1,9 +1,9 @@
{
"url": "https://github.com/NixOS/nixpkgs",
- "rev": "91903ceb294dbe63a696759bfba3d23ee667f2dc",
- "date": "2021-07-26T09:21:28+02:00",
- "path": "/nix/store/2v649741xdh1crybi2dm879bl60zrkhf-nixpkgs",
- "sha256": "1hmpwi27r4q0lnspg7ylfzxakwz2fhl3r07vjvq5yalcdqwiain3",
+ "rev": "b09c989b82f7a4f7319802a1dcf8bfe859d65362",
+ "date": "2021-08-09T08:34:54-07:00",
+ "path": "/nix/store/34dgmv9dz24n7cq836ciwibaqcdh69x4-nixpkgs",
+ "sha256": "0n68m06fsfgy3w6z844q5lxqdcmjlj9gx6p3zndwm6aijky0gjd8",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
diff --git a/lass/1systems/daedalus/config.nix b/lass/1systems/daedalus/config.nix
index b84ce6acf..b08919802 100644
--- a/lass/1systems/daedalus/config.nix
+++ b/lass/1systems/daedalus/config.nix
@@ -80,7 +80,7 @@ with import <stockholm/lib>;
#remote control
environment.systemPackages = with pkgs; [
x11vnc
- torbrowser
+ # torbrowser
];
krebs.iptables.tables.filter.INPUT.rules = [
{ predicate = "-p tcp -i retiolum --dport 5900"; target = "ACCEPT"; }
diff --git a/makefu/2configs/bgt/etherpad.euer.krebsco.de.nix b/makefu/2configs/bgt/etherpad.euer.krebsco.de.nix
index cf5b22bae..b4442de55 100644
--- a/makefu/2configs/bgt/etherpad.euer.krebsco.de.nix
+++ b/makefu/2configs/bgt/etherpad.euer.krebsco.de.nix
@@ -56,7 +56,7 @@ in {
TRUST_PROXY = "true";
TITLE = "Binärgewitter Etherpad";
SKIN_NAME = "no-skin";
- DEFAULT_PAD_TEXT = builtins.replaceStrings ["\n"] ["\\n"] (builtins.readFile ./template.md);
+ DEFAULT_PAD_TEXT = builtins.readFile ./template.md;
PAD_OPTIONS_USE_MONOSPACE_FONT = "true";
PAD_OPTIONS_USER_NAME = "true";
PAD_OPTIONS_USER_COLOR = "true";
diff --git a/makefu/2configs/bgt/template.md b/makefu/2configs/bgt/template.md
index af5de0697..b4e6a5c7a 100644
--- a/makefu/2configs/bgt/template.md
+++ b/makefu/2configs/bgt/template.md
@@ -1,27 +1,31 @@
# BGT<NUMBER>
-0. Sendung twittern und mastodieren (eine Woche + eine Stunde vorher)
-1. `eine` Person anrufen (den Host):
- - markus 162dcbf89f@studio.link
- - Felix1 makefu@studio.link
- - L33tFelix l33tname@studio.link
- - Ingo ingo@studio.link
-2. Jitis an machen! https://meet.jit.cloud/bgt (mittel)
-3. studio-link aufnehmen drücken, schauen ob file local.flac größer wird (wichtig)
-4. audiocity starten, 48000Hz einstellen, Audio-Device checken und aufnehmen drücken (wichtig)
-4. alternative parecord:
- `$ pacmd list-sources | grep -e device.string -e 'name:' # keins der "monitor" devices`
- `$ parecord --channels=1 -d alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo bgt.wav`
-5. darkice starten (wichtig)
-6. klatschen
-7. Hallihallo und Herzlich Willkommen
-8. chapter-marker starten mit ctrl-u auf "H" von "Halli" (wichtig)
-9. Blast markieren und ctrl-j drücken für neuen Eintrag
+0. Sendung twittern und mastodieren (eine Woche + eine Stunde vorher) (wichtig)
+1. `eine` Person anrufen (den Host):
+ - markus 162dcbf89f@studio.link
+ - Felix1 makefu@studio.link
+ - L33tFelix l33tname@studio.link
+ - Ingo ingo@studio.link
+2. Jitis an machen! https://meet.jit.cloud/bgt (mittel)
+3. studio-link aufnehmen drücken, schauen ob file local.flac größer wird (wichtig)
+4. audiocity starten, 48000Hz einstellen, Audio-Device checken und aufnehmen drücken (wichtig)
+4. alternative parecord:
+ `$ pacmd list-sources | grep -e device.string -e 'name:' # keins der "monitor" devices`
+ `$ parecord --channels=1 -d alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo bgt.wav`
+5. darkice starten (wichtig)
+5. chapter-marker starten (wichtig)
+7. klatschen
+8. Hallihallo und Herzlich Willkommen
+9. ctrl-u auf "H" von "Halli" Felix auf jeden fall erinnern (wichtig)
+10. Ctrl-j drücken für neuen Eintrag - ggf. Felix erinnern (wichtig)
## Vorschläge
### Backlog von Picks und Lesefoo aus der letzten Woche
-die Nachfolgenden 3 Striche sind sehr wichtig, bitte nicht löschen
+die Nachfolgenden 3 Striche sind sehr wichtig, bitte nicht löschen. Nachdem
+chapter-marker gestartet wurde kann die reihenfolge nicht mer angepasst werden,
+das ist der preis, den man zahlt
+
---
## Blast from the Past
diff --git a/makefu/5pkgs/otpauth/default.nix b/makefu/5pkgs/otpauth/default.nix
new file mode 100644
index 000000000..2d96b315d
--- /dev/null
+++ b/makefu/5pkgs/otpauth/default.nix
@@ -0,0 +1,24 @@
+{ lib, fetchFromGitHub, buildGoModule, ... }:
+ buildGoModule rec {
+ pname = "otpauth";
+ version = "0.3.2";
+
+ src = fetchFromGitHub {
+ owner = "dim13";
+ repo = "otpauth";
+ rev = "v${version}";
+ sha256 = "1q6byb87cyvm4prildfcr8qc283ikvz5zazm92jk19qhav6ywj65";
+ };
+
+ vendorSha256 = "0lhxc855lr0mzq35i0s2xkcd4qa74yks6ypi80ij9ia0x1hdf1dq";
+
+ runVend = false;
+
+ meta = with lib; {
+ description = "Google Authenticator migration decoder";
+ homepage = "https://github.com/dim13/otpauth";
+ license = licenses.isc;
+ maintainers = with maintainers; [ makefu ];
+ platforms = platforms.linux ++ platforms.darwin;
+ };
+}