From bc658b3eb553927cda9f4c8c99e4cdc716322f7a Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 28 Nov 2022 00:20:18 +0100 Subject: reaktor2 confuse: remove unneeded sed --- krebs/2configs/reaktor2.nix | 2 -- 1 file changed, 2 deletions(-) (limited to 'krebs') diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index c1af2d8b4..c452949b8 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -62,7 +62,6 @@ let export PATH=${makeBinPath [ pkgs.coreutils pkgs.curl - pkgs.gnused pkgs.stable-generate ]} stable_url=$(stable-generate "$@") @@ -85,7 +84,6 @@ let export PATH=${makeBinPath [ pkgs.coreutils pkgs.curl - pkgs.gnused pkgs.stable-generate ]} case $_msgtarget in \#*) -- cgit v1.2.3 From 85dd8bb9a558845d6e94d509b9aa164bb53c64c4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 28 Nov 2022 00:20:34 +0100 Subject: reaktor2: init say --- krebs/2configs/reaktor2.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'krebs') diff --git a/krebs/2configs/reaktor2.nix b/krebs/2configs/reaktor2.nix index c452949b8..13b59fa82 100644 --- a/krebs/2configs/reaktor2.nix +++ b/krebs/2configs/reaktor2.nix @@ -98,6 +98,30 @@ let }; }; + say = { + pattern = "^!say (.*)$"; + activate = "match"; + arguments = [1]; + command = { + filename = pkgs.writeDash "say" '' + set -efu + + export PATH=${makeBinPath [ + pkgs.coreutils + pkgs.curl + pkgs.opusTools + ]} + paste_url=$(printf '%s' "$1" | + curl -fSsG http://tts.r/api/tts --data-urlencode 'text@-' | + opusenc - - | + curl -Ss https://p.krebsco.de --data-binary @- | + tail -1 + ) + echo "$_from: $paste_url" + ''; + }; + }; + taskRcFile = builtins.toFile "taskrc" '' confirmation=no ''; @@ -273,6 +297,7 @@ let bedger-add bedger-balance hooks.sed + say (generators.command_hook { inherit (commands) dance random-emoji nixos-version; tell = { -- cgit v1.2.3 From b726b7588d2dcf83507ed138723efed73efebe9f Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 28 Nov 2022 17:40:13 +0100 Subject: init xandikos as calendar.r --- krebs/1systems/hotdog/config.nix | 2 ++ krebs/2configs/cal.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 krebs/2configs/cal.nix (limited to 'krebs') diff --git a/krebs/1systems/hotdog/config.nix b/krebs/1systems/hotdog/config.nix index cf07d3b4d..02749dafe 100644 --- a/krebs/1systems/hotdog/config.nix +++ b/krebs/1systems/hotdog/config.nix @@ -13,6 +13,8 @@ + + ## shackie irc bot ]; diff --git a/krebs/2configs/cal.nix b/krebs/2configs/cal.nix new file mode 100644 index 000000000..90093e8eb --- /dev/null +++ b/krebs/2configs/cal.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, ... }: +{ + users.users.testing = { + uid = pkgs.stockholm.lib.genid_uint31 "testing"; + isNormalUser = true; + openssh.authorizedKeys.keys = [ + config.krebs.users.xkey.pubkey + config.krebs.users.lass.pubkey + ]; + packages = [ + pkgs.calendar-cli + pkgs.tmux + ]; + }; + + services.xandikos = { + enable = true; + extraOptions = [ + "--autocreate" + "--defaults" + "--current-user-principal /krebs" + "--dump-dav-xml" + ]; + }; + + services.nginx = { + enable = true; + + virtualHosts = { + "calendar.r".locations."/".proxyPass = "http://localhost:${toString config.services.xandikos.port}/"; + }; + }; +} -- cgit v1.2.3