Commit graph

2911 commits

Author SHA1 Message Date
sterni
67affb7b46 docs(sterni/acme): move mkbqnkeyboard.bqn docs into its own file
I'll probably have this added to the BQN website's editor support page.
It'll probably be less confusing if the page people are sent to doesn't
have information on random, semi-related stuff.

Change-Id: I75e03afea1362e022923ef8781b35113bf26b2e9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13116
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-02-07 20:27:17 +00:00
sterni
04261c274f refactor(sterni/blipqn): only attempt •CurrentError when it'll work
I've finally figured out what the problem was with •CurrentError:
Passing a namespace as 𝕩 to •CurrentError is not supported as it may
control some kind of special behavior in the future. The right thing to
do seems to check the •Type of 𝕩 and only attempt to use •CurrentError
if it isn't a namespace.

Change-Id: I012009d0f1b913e77d65776ee43062817199baab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13106
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-02-06 11:30:44 +00:00
sterni
78af9a2306 refactor(sterni/blërg): make caller of Run responsible for stderr
We can use ! in R to display the error instead.

Change-Id: Ib7f6e559014e3f99a9f99c159a31a45a7a0e65a5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13105
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-02-06 10:19:05 +00:00
sterni
dfd8210e99 fix(sterni/blërg/mail-notes): actually extract attachments
Change-Id: I1d9f93081400ce45b66a79ab70e037f73c37092b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13104
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-02-05 18:44:37 +00:00
sterni
a5272f8ccc docs(sterni/blërg): list dependencies in README
Change-Id: Iceacf406bef71529cb29e8adcf9fe1f713187e42
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13103
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-02-05 18:23:04 +00:00
sterni
69bb8b1423 refactor(sterni/blërg): clean up header concatenation code
Change-Id: I775bff10f8d74f457fff3742ea198efadabcd67c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13018
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-02-05 18:22:34 +00:00
sterni
5db216b4ef refactor(sterni/blërg): use namespaces for entries
The array listing was pretty nice for debugging, but having arrays where
every element has a different meaning as an interface between different
parts of the code is not great. Refactoring will be less frustrating if
we just store everything using a key-value scheme in namespaces.

Change-Id: I806fea247b6f996dbdd93df24f3fdb762340f043
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13017
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-02-05 18:22:34 +00:00
sterni
eeba67de1c refactor(sterni/blërg): avoid calling mhdr once per header
We can actually get all the headers we are interested in just one call
of mhdr(1) since it can query multiple headers in multiple messages in
just one call. With BQNs reshape / two dimensional array facilities it
is easy to group the lines of headers by their originating message and
append the original path to the result array.

We still use a separate mhdr(1) call for the Date header since we rely
on the -D option for parsing the header.

Change-Id: Iaaf8f21fa22ab3e32e6900df4ae164e72c722cd3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13016
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2025-02-05 18:22:34 +00:00
sterni
6479f9ae5e feat(sterni/blërg): yet another blog software
Currently, blërg is an incomplete reimplementation of
//users/sterni/mblog that uses mblaze(7) and //users/sterni/mn2html to
process the backing mail notes.

Now, why start from scratch again?

- mblog is depressingly slow at the moment which is due to
  //third_party/lisp/mime4cl. The performance problems are
  (probably) solvable, but this would require carefully
  redesigning the library's use of streams. I'm not motivated
  to look into that at the moment, unfortunately.

- I had an idea for intergrating additional storage backends
  for entries into an mblog like software. I've found experimenting
  with this in BQN to be quite pleasant as the backends can
  easily be expressed as namespaces.

Change-Id: I90c8ff7b5f7235d6fd7b0619338b553be8742e49
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13015
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-02-05 18:19:33 +00:00
sterni
ba2d2d3eea feat(sterni/acme/plan9port): completely ignore the primary selection
TL;DR: xwayland-satellite (which I use) doesn't sync the primary
selection between X11 and wayland. Since devdraw prefers the primary
selection over the clipboard if populated, it is impossible to paste
from wayland (i.e. from the clipboard) in devdraw windows after cutting
once on the plan9port side (which populates the primary selection).

Change-Id: Idc46b875f294bf90d477ee7fe138dcd17e755221
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13102
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-02-05 17:54:30 +00:00
sterni
4f3c4e7d09 feat(sterni/acme/plan9port): set (rough) location for astro(1)
I semi regularly look up the sunset time, so this is actually useful for
me. Time zone conversion seems to be broken which I'll have to debug.
The GMT sunset times it comes up with seem to be accurate, though.

Change-Id: If179f9e1bb56665d4d6f8b0f81272d3d74fe6cec
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13101
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-02-05 17:52:00 +00:00
sterni
df49c51c99 docs(sterni/acme): document mkbqnkeyboard.bqn
Change-Id: Ifc2fd45712bda4d7700b3ba0dea571ee3f7fde0c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13100
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-02-05 15:20:42 +00:00
sterni
473d3c3761 fix(sterni/acme/mkbqnkeyboard.bqn): allow multiple flags in one arg
Change-Id: I203cc50997f9292cef7a3383dadb96fc97108ca6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13099
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-02-05 15:16:11 +00:00
sterni
3224488a29 feat(sterni/mn2html): reimplement mnote-html in Rust
Reimplement the MIME body extraction and HTML rewriting from mblog in
Rust so that shelling out to it becomes viable. The problem with
mnote-html is mainly that it – being written in CL – requires a ~300MB
executable and is a bit sluggish starting.

Change-Id: I5c1adc1a7ab5f3dde207f9a1f67ace685bd3f69f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13014
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2025-02-05 13:01:25 +00:00
Vincent Ambo
160a50c544 feat(tazjin/nixos): install watchexec everywhere
much easier to use than my typical inotify shell loop

Change-Id: Id9c260d7f57bdde5307149e982ace4eca960ecdb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13055
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2025-02-01 08:42:54 +00:00
sterni
dd5100acf5 chore: rewrite uses of cs.tvl.fyi to code.tvl.fyi
I've checked the new links manually.

- //web/tvl: changed the target path of links to the tvix docs since
  they were moved in r/2378.

- //users/aspen/resume: Tvix is no longer //third_party/nix.

Change-Id: I419bae1a46bdccc7baa7327215aa2368ffc0f01c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13043
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: fogti <fogti+devel@ytrizja.de>
Reviewed-by: tazjin <tazjin@tvl.su>
2025-01-30 02:19:06 +00:00
sterni
ca2bf3cde0 feat(sterni/emacs): bind occur
Change-Id: I929950ca1cfe7a44edfefeda2b9a090b04b8aa37
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13057
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2025-01-27 16:55:55 +00:00
sterni
a8f17cc37a feat(sterni/emacs): project-independent project-find-regexp
I like project-find-regexp better than grep-find-file, but it's a little
annoying to use for arbitrary directories. With C-u, it unnecessarily
prompts for a file name pattern.

For convenience, add a variant of project-find-regexp which always
prompts for a directory, but doesn't require a project nor prompts for a
file name pattern.

Change-Id: I40f0bdcca4aa129f447f4f4790d732afcf76d3f7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13056
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-27 16:55:55 +00:00
sterni
1fcd827230 feat(sterni/machines/ingeborg): disallow crawling of /tmp
Change-Id: Ic104ff7837c5f728b4e9b33b2ed2ed1ceba8103e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13054
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-24 21:26:31 +00:00
sterni
5720399a19 feat(sterni/emacs): bind rename-visited-file
(ty leah2)

Change-Id: Ia8aa3ebed0b29b453046a2b5b661cdeaf5f26487
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13053
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-24 20:13:43 +00:00
sterni
decc0e4576 fix(sterni/machines): adjust deploy script for nq >= 1.0
fq was renamed to nqtail, otherwise nothing changes for us.

Change-Id: I3c40d0d0702e50b3421e320b5adf58a450303693
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13052
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2025-01-24 20:07:09 +00:00
sterni
27f21489ac fix(sterni/emacs): inbox.org should remain org-capture target
Change-Id: I99f57cede225dcb3fce6b1866a7e8da7d6dc4995
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13051
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-24 20:06:07 +00:00
sterni
1c18c8456f feat(sterni/emacs): increase maxlevel for org-refile
Change-Id: I2e160015b1ed6fe158da7c544a0b5c7b6697f999
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13050
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-01-24 20:06:06 +00:00
sterni
78b05b5448 feat(sterni/emacs): binds for refiling and archiving subtrees in org
Archive to a single archive file that is ignored in org-agenda.
Archiving that “stays close” can be done using the archive tag.

Change-Id: Icd121a765e5befa0ab2f6df662d757483c65efa5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13049
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-24 20:06:06 +00:00
sterni
9f6d4306f7 style(sterni/acme/plumb): use tabs to separate the fields
This is convention in Plan 9 and e.g. the plumber will reformat the
rules this way when they are read back via `9p read plumb/rules`.

Change-Id: I53543d774c11789c8352e2e632678313037c5555
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13048
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2025-01-24 14:48:54 +00:00
sterni
446127938d fix(sterni/acme): fix plumbing of e.g. //users and [//nix](./nix)
Change-Id: Ic85d71831d799db5bd8458f19593a05f3157d1de
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13042
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2025-01-24 14:06:09 +00:00
sterni
0481a5778e feat(sterni/acme): add plumbing rule for r/XXXX short links
This uses git show to display the revision same as the git commit rule.

Change-Id: Ibf518adb60d15cac2126b6ab0c7e12c4b4637c25
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13041
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-24 14:06:09 +00:00
sterni
75e0c1cf43 feat(sterni/acme): add plumbing rule for showing git commits
Change-Id: Iee072e1dc7c6d11456aeae47140e6a62fe832531
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13040
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-01-24 14:06:09 +00:00
sterni
a396f4162f feat(sterni/emacs): open context file on startup
context.org tracks ongoing things, e.g. code I'm working on or want to
get started on. Tracking means that it contains notes (“context”) on the
things in question. These will mainly be links or quick todo lists which
will hopefully reduce the amount of open tabs and unread emails (marked
as TODO in thunderbird) I have.

Having inbox.org open is not as useful since it isn't viewed really: For
adding tasks org-capture should be used and for viewing them org-agenda
is far superior.

Change-Id: I4acbaa33e4c2de40a92393376bb86251d9dceb02
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13044
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-23 22:41:46 +00:00
sterni
975b9603cc refactor(sterni/plan9port): move custom install logic into wrapper
The wrapper allows me to pick and choose what to install and also to set
some extra environment variables if necessary. A separate wrapper
derivation prevents the hefty rebuild of the entire plan9port derivation
when making changes.

Change-Id: I3f96cc3e31baf3bd37ae419578c5789aa093e578
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13038
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2025-01-22 18:14:51 +00:00
sterni
623ebc615f feat(sterni/acme/plan9port): make my plumbing rules the default
To avoid the need for two different versions of plan9port in the CI
pipeline, just move the plumbing sanity check into installCheckPhase.
For local iteration you'd have a plumber running anyways, so the short
build time of the plumb derivation isn't really a necessity.

Change-Id: Ib0ba5fa2d8107530fb7d1144cf7395f4f5a3cd12
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13035
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-01-21 20:19:56 +00:00
sterni
9743fbf6b7 feat(sterni/acme/plan9port): allow entering BQN chars via compose
plan9port completely ignores XCompose because it has its own compose
mechanism (which is mapped to the same key). The sequences are defined
in /lib/keyboard and need to be compiled in.

Support for the BQN unicode characters is achieved by generating the
necessary lines for /lib/keyboard from the .inputrc (for GNU readline)
that is part of mlochbaum/BQN (simply because that file is somewhat
parseable and stores the sequences in ASCII, contrary to .XCompose).
This is implemented by a small BQN script which is executed in
postPatch.

All usual sequences are supported except those that map to the second
ASCII character of the sequence. These exist to keep certain characters
typeable in other input system. Thanks to the explicit compose key,
Plan 9 doesn't have this problem.

Change-Id: I590c03fd69a2aae3cbbbd39ebcbce6cec0418b50
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13034
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2025-01-21 20:19:56 +00:00
sterni
3b9d5a02ce feat(sterni/acme): import my patched plan9port from vuizvui
This is equivalent to
<2e4032c31b>,
with the addition of patchesFromDir to assemble a list of patches.

Import into depot since I'm interested in adding some depot specific
configuration and tools to (mainly) acme that doesn't make sense to
track outside of depot. Since persisting user configuration and tooling
with plan9port is annoying, it's easier compiling it in to begin with.

Change-Id: I565a285368485c7ce1d5caa7baa87a8ca86abcb7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13033
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-01-21 20:19:56 +00:00
sterni
47cda5e89f feat(sterni/acme): add initial plumbing rules
Rules for the Plan 9 plumber (see https://9p.io/sys/doc/plumb.pdf)
allowing quick navigation through depot (and related services) in acme.

- man, urls: some rules that I like taken from /plumb/basic and split
  across individual files.
- tvl: incomplete support for TVL short links and targets:
  - //…
  - cl/…
  - b/…

As mentioned, these are incomplete and I want to implement the remaining
short links and things like git support. I want to continue
experimenting with the plumber, but what I've got so far is already
pretty cool. Eventually, I'll want to implement something equivalent for
Emacs (maybe via Hyperbole) which is probably going to be of general
interest to depot users.

Change-Id: I678f000369db4c7ce30b2aedbc2dbccf3ddef0a9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13026
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2025-01-21 20:18:54 +00:00
Aspen Smith
5a2737299a feat(aspen/goodcry-band): jan '25 updates
Change-Id: I340946d51e322d176799cee1f31b5683154461aa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13027
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Autosubmit: aspen <root@gws.fyi>
2025-01-21 01:56:59 +00:00
sterni
a031b918b1 test(sterni/blipqn): add sanity check
This tests that a single pixel is set in the correct place and correctly
sent over UDP.

Change-Id: I617dda739262b4c6cf55c0bf99d2f3e141adece3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13013
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-17 15:50:33 +00:00
sterni
10dc365e34 feat(sterni/blipqn): print some extra information when using :debug
Change-Id: I92ebde397e679c7e3f8ddcf6fcecd6af5c84f629
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13012
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-17 15:50:33 +00:00
sterni
a9e121380b feat(sterni/blipqn): reuse address and socket for multiple Sends
This is achieved by storing the resources we need to acquire for
interacting with the flipdot (socket fd and addrinfo struct) in a
`struct flipdot` that is dynamically allocated and treated as an opaque
pointer object via the BQN FFI.

To make sure these resources are released correctly, we only provide a
lisp style WithFlipdot to the user which takes care of acquiring and
releasing the `struct flipdot`. This works even if an error occurs in
the function the user provides thanks to _defer_. I'm not sure if
calling it _defer_ is right since Go's error handling works differently,
so defer really is deferred execution in a sense which doesn't really
fit what we're doing here. The closest is probably Haskell's bracket,
but that name references it's triadic nature which doesn't fit our
implementation.

Change-Id: Iff65d277a448dbe0c6ac93e816ece5ab6fa10190
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13011
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-17 15:50:33 +00:00
sterni
1027e21eee feat(sterni/blipqn): interact with a flipdot display from BQN
The idea of this “library” is to do the least. The most natural way to
represent the image to render on a flipdot image is a two dimensional
array of booleans. This something BQN is very well equipped for, i.e. it
has primitives that are designed to deal with this type of data
structure. The only thing we have to do is to take care of sending such
arrays to the flipdot display via the μCCC's un(der)documented UDP
protocol.

Compact implements the conversion from a boolean array to a bitmap that
only uses 1 bit per pixel. All socket code is written in C and invoked
via •FFI. Currently, every time a bitmap is sent to a display, the
target host has to be resolved again. This should be fixed in the
future.

Change-Id: Idea7c81baac919da93c88a69f98cbbbd026fa328
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13010
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-01-17 15:50:33 +00:00
sterni
b51720f844 feat(sterni/emacs): search through all org files
It can also be useful to find things I've noted down in my todo lists.

Change-Id: I6f3d7da49bfd4392c70e5b14c21b1d659645867e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13009
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2025-01-16 22:19:12 +00:00
sterni
689fee1398 feat(sterni/machines): enable fail2ban for ssh
The upstream module is kind of inscrutable so it may be nice to port it
to a simple reaction setup. Since that's probably going to require
writing rules manually, though, I'm putting this off for now.

Change-Id: Ic3d8c5f2d1b08701f0dc5b8b4eb57dc45bcd58ee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13008
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-16 22:19:12 +00:00
Profpatsch
3953fd7030 feat(users/Profpatsch/whatcd-resolver): add simple settings
For now just a setting whether we want to use freeleech tokens.

Change-Id: I1c0228031df8c79c2ec26ec5bdfef6dde1cb373e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13007
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2025-01-16 19:44:32 +00:00
Profpatsch
3e5b3b82a6 feat(users/Profpatsch/whatcd-resolver): generic otel struct attrs
A generic way to turn Haskell structs into json objects, and therefor
to otel attributes.

I don’t know how to make it so I can give anything where Rep
implements that thing a `toOtelJsonAttr` implementation, things
overlap too much if I do that …

Change-Id: Iededb697dff206ddc6481a2eead210d44faa70c9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13006
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2025-01-16 19:44:32 +00:00
Profpatsch
5d31e25588 refactor(users/Profpatsch/whatcd-resolver): response struct as GADT
I got stuck with unsolvable type inference problems using HasField and
a struct here, since this is all returning an enum anyway, why not
just use a GADT. It seems to work just fine and is more
ergonomic (still not very, but this is Haskell).

Change-Id: I1b5d0f98528ff85c0e3044bc730b660972142cd6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13005
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2025-01-16 19:44:32 +00:00
Vincent Ambo
d2d06241a0 feat(ops/tvl-cache): add option for using experimental cache
Adds a `tvl.cache.builderball` option for cache *consumers* which enables the
experimental builderball cache. This cache uses whitby AND nevsky.

Change-Id: I4d99ba52d6ebd9a49e6fcb931d01e69383b15bcf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12986
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2025-01-14 17:51:21 +00:00
sterni
5dd66ab066 feat(sterni/ingeborg/monitoring): send smartd warnings to IRC
Though netdata integrates smartd data it doesn't generate warnings like
smartd does. It would be nice to have them go to IRC. The NixOS module
for some reason has decided to implement its own very restricted
notifications framework on top of the one that smartd provides
dispatching to either mail (note that this is implemented in the NixOS
module and doesn't use smartd's own support for this), wall(1) or some
systemd mechanism. This is implemented in some shell script that can't
be provided by the user.

Luckily, the module is relatively small otherwise and we can easily
inline the relevant service definitions and use our own script instead.

Change-Id: I1e1ceff3c21a92ac42079c02813366671141b9b4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12969
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-11 16:11:46 +00:00
Vincent Ambo
b9e0a682ab fix(users/tazjin): disable systemd user slice freezing
I have a suspicion that some systemd bugs around this feature (I actually
couldn't figure out what it does and why?) introduced in systemd 256 lead to
issues with suspend that I've seen in recent times.

In the issue, my machine is seemingly frozen after resuming from suspend. I'd
seen this previously on EXWM with xsecurelock, but now I'm seeing it on niri
with swaylock, where it is more severe because switching to a VT is impossible.

Upstream tickets:

- https://github.com/systemd/systemd/issues/33083
- https://github.com/systemd/systemd/issues/33626
- https://bugzilla.redhat.com/show_bug.cgi?id=2321268

I'm not running a VM, but there seem to be multiple different bugs leading to
this, so who knows. It's worth a try.

The long-term fix will be getting rid of systemd)

Change-Id: Ie985a3f222f3daac1e3c7db79ee8624c66297374
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12961
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2025-01-07 09:45:08 +00:00
Thomas Koch
5c9e671c1f feat(users/thk): add OWNERS
Change-Id: I141bd12ff83dae0debe664d0ef5d21d109660688
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12959
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2025-01-07 03:57:33 +00:00
Profpatsch
3040fe2e90 feat(users/Profpatsch/whatcd-resolver): implement artist refresh v0
This is kind of a chonker because I went into so many rabbit holes.

Foremost this implements a simple “Refresh Artist” button that fetches
current artist torrent groups.

BUG: the `artist` endpoint torrent struct is shite, it’s missing most
info that we get in the `search` endpoint torrent struct, plus it’s
organized differently (e.g. the `artists` thingy is in the
torrent_group not the torrent).

I should switch everything over to fetching the `torrent_group.id`s
first and then going through and slowly fetching every torrent group
separately … however that might time out very quickly. ugh. There
doesn’t seem to be a way of fetching multiple torrent groups.

Random other shit & improvements:

* intersperse for builders
* fix json errors so that the structs don’t get too
  big (`restrictJson`)
* show error messages as json so jaeger displays it with nested UI
* color pretty-printed json outpt on command line
* add some important integral functions to MyPrelude
* add `sintersperse` and `mintersperse` to MyPrelude

Change-Id: If8bfcd68dc5c905e118ad86d50d7416962bf55d4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12960
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2025-01-06 16:43:05 +00:00
Profpatsch
cabb8cd3d0 fix(users/Profpatsch/whatcd-resolver): handle redacted too many req
We can’t do more than like 5 requests right next to each other, so
let’s handle the timeout they request.

This kinda destroys search speeds for large search results,
so we might have to filter out collections somehow, or do something
smarter like schedule things out and show a preliminary result at one
point.

Change-Id: If916379eb6e19cf8e960cf7553965b338645e560
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12958
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2025-01-05 21:00:11 +00:00