Commit graph

21430 commits

Author SHA1 Message Date
Profpatsch
08131be8e0 feat(users/Profpatsch/whatcd-resolver): improve release sorting
Change-Id: I4f9ce0c563b21e0cf8dc688e92438e20c103a2de
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12957
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2025-01-05 21:00:11 +00:00
Profpatsch
77aadfa46c refactor(users/Profpatsch/whatcd-resolver): use builder for otel
This makes `addAttribute` a little nicer to handle, because we can now
just put a `(builder, value)` tuple (yay, orphan instances!)

Change-Id: I145a0d2b764d44755fb3c548a40188f13ee4ed83
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12956
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2025-01-05 21:00:11 +00:00
Profpatsch
444b67b010 feat(users/Profpatsch/my-prelude): add builder & divisible helpers
I’ve had enough of `show & stringToText` bullshit, let’s finally
create a trivial builder contravariant module that wraps
`Text.Builder` and `ByteString.Builder` and has a naming scheme that
does not collide with anything and that I can remember in my sleep.

Plus some experiments in making `Divisible` useful with `HasField`.

Change-Id: Ie25f78226d24eadf4c35353fe9db40b7683d82c3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12955
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2025-01-05 21:00:11 +00:00
Profpatsch
a14a7e6ec9 fix(users/Profpatsch/whatcd-resolver): handle weird search results
Apparently they added the ability to add random files (e.g. pdfs), and
the API returns undocumented objects if that happens.

Let’s skip these.

Change-Id: Icd783a6ed2114520e5c524f2a2c3acfcb67d792e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12954
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2025-01-05 21:00:11 +00:00
Profpatsch
428f574b75 feat(users/Profpatsch/whatcd-resolver): add ToOtelJsonAttr
Small helper class for putting a json otel attribute from random
types, via Enc.

Used for the redacted requests for now.

Change-Id: I29c31de01f1f5eb3f63ce5639e5b4df4f9b0dc40
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12953
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2025-01-04 21:47:34 +00:00
Profpatsch
722499d8a9 feat(users/Profpatsch/whatcd-resolver): show json val on parse err
The json parsing library gives us an error path where the parse
failed, which means we can index into the path to show the json value
that failed us.

This can be quite expensive (and large!) of course, but the error
message clarity is worth it methinks.

Change-Id: Icacbd799254aaecd4a939ca13e6070d68a78138d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12952
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2025-01-04 21:47:34 +00:00
Profpatsch
0319b5e6c0 feat(users/Profpatsch/whatcd-resolver): allow more than albums
When searching for an artist, we only put albums before, but now let’s
fetch all releases and group them by release type.

I group & sort on the backend instead of the database, cause it’s a
lot easier to express in Haskell code and the amount of data stays the
same (except for the filter for singles which I might move into the
SQL at one point?)

Adds a prelude module for better dealing with comparisons.

Change-Id: Iff235af611b6e1bac71b118a8a04fc73cacd169f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12951
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2025-01-04 21:47:34 +00:00
Vincent Ambo
c7fa114295 docs(tvix): mention channels separately
Returns the original (pre community split) channel into a more prominent
position, and explicitly mentions that #tvix-dev is for the community
centered around the new store model.

This relates to b/431, and is part of the transition setup while we
figure out how to organise the project split.

Change-Id: I0d8c5e86c914f51db222b054d51038e2023281d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12950
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: tazjin <tazjin@tvl.su>
2025-01-04 14:53:24 +00:00
Vincent Ambo
4d2d33ce2b chore(3p/sources): update niv scaffolding
The Nix code used to access niv's pins has changed and now deals with plain git
dependencies slightly differently.

This change should be no-op functionally.

Change-Id: I6834594d10078b03f23252901143c941ff523cdf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12946
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: tazjin <tazjin@tvl.su>
2025-01-03 12:14:08 +00:00
Florian Klink
c4ea76f81a refactor(nix/buildkite): drop unused import
We don't use isNull anywhere.

Change-Id: I004cebc8fac4ca09360c95dfb77ccce8d032416f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12945
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-02 21:17:22 +00:00
edef
07d2781d5b feat(tvix/nix-compat/narinfo): roundtrip unknown-deriver
We aim to produce bit-identical output when roundtripping, and this
applies to legacy formats as well.

Change-Id: Iaec7d6bb5c5e305ec5e1b78c6968226dee9a0d90
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12943
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2025-01-02 09:02:15 +00:00
edef
bee52c2579 feat(tvix/nix-compat/narinfo): don't allocate error field names
We know these names statically, so we can just use &'static str.

Change-Id: I81cb7ecc4d7553f57baca74464c120a143586fe6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12941
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2025-01-02 07:45:26 +00:00
Vincent Ambo
54f72afcda chore(3p/sources): bump channels & overlays (2024-12-31)
Last one of the year! С наступающим)

Fixes:

* users/wpcarro: remove use-package from emacs packages (it has been built-in
  for a while now)
* users/sterni: the same thing
* users/aspen: remove `coz`, forwardport `gdmap` from stable
* users/flokli: dropped corneish_zen firmware from CI
  This firmware depends on a non-reproducible FOD which, when updated, causes
  build failures. We have worked around this repeatedly, but it needs to be
  fixed properly.
* tvix: regenerate Go protobufs
* tvix: address new clippy lints
* tvix/{castore,store,build}-go: update grpc/protobuf libraries
* tvix/eval: formatting fixes
* 3p/overlays/tvl: work around GCC 14 -Werrors

Change-Id: Ice5948ca7780192fb7d2abc6a48971fb875f03c9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12933
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2025-01-01 17:35:13 +00:00
Florian Klink
bd73dff0bf fix(nix-compat): support Deriver: unknown-deriver NARInfos
According to c60715e937,
these were produced by a legacy tool and should be considered as if
Deriver was not passed at all.

See: https://github.com/kalbasit/ncps/issues/171
Reported-In: https://github.com/nix-community/go-nix/pull/128
Change-Id: If285a11c3275cb3c857c68782bd13473c46f04bf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12940
Reviewed-by: edef <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2025-01-01 16:10:48 +00:00
Adam Joseph
5a50b39d76 feat(readTree): expose ability to invoke with rootDir=false
readTree gives special treatment to the directory on which it is
invoked -- for example, it won't read *.nix files in that directory.

This commit adds the ability to disable this special treatment, which
remains the default behavior.

Example use case:

  10029d3682

Change-Id: I306bea95f4d556f7090f3255e6da6bb410adbf57
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12939
Tested-by: BuildkiteCI
Autosubmit: Adam Joseph <adam@westernsemico.com>
Reviewed-by: tazjin <tazjin@tvl.su>
2025-01-01 15:40:06 +00:00
Florian Klink
1713709ab4 chore(tvix): update crate dependencies
Change-Id: Ia48b1774e52d8197e93e9a6444857470a7895926
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12932
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2025-01-01 13:27:56 +00:00
sterni
8f615ece77 chore(3p/lisp/mime4cl): drop ASDF build system
Change-Id: I2d91937d48e62ae90404eead36ef3cfc790675f2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12937
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-12-31 22:20:19 +00:00
sterni
ee9c3c254c docs(3p/lisp/mime4cl): add clear warning about current state
I'm not really describing what the problem here is because I don't
think a writeup is really useful. It would just be speculation and
I don't need to syncronize my efforts with anyone at the moment,
so it's best to keep those notes offline.

Basically, the next problem I want to tackle is that the initial
parsing of a multipart message (to get the number, types, offsets
etc. of the different parts) is very slow. This is because READ-LINE
on a FLEXI-STREAM dispatches to READ-CHAR which is laughably slow.

Change-Id: Ia5d6e335abb23639cfe9c2149ead99ffa5dbbcf5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12936
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-31 22:20:19 +00:00
sterni
bd4da5f444 fix(tvix/eval): don't mark locals as used in resolve_local
resolve_local isn't exclusively used to compile variable access, so we
shouldn't automatically mark a local as used when it's called.
Specifically, the optimiser would call `is_user_defined`, causing locals
to be marked as used even when they weren't, erroneously silencing the
unused local variable warning.

For resolve_upvalue I've opted not to do the same, instead renaming the
function to make its behavior clearer. The reason for this is that
resolve_upvalue is only used in the code for the purpose of compiling
variable access and mark_used for upvalues would be needlessly
expensive, as it requires recursing through enclosing contexts.

Supersedes / alternative to cl/12708.

Change-Id: Ib4a4a9dfcecf710ab2766b03d0a0cc09245c2d0a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12869
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-12-31 21:30:31 +00:00
Vincent Ambo
7ea442b21a fix(tazjin/dotfiles): fix default screen scale on tverskoy
For some reason it keeps getting scaled to 1.25, which is too big.

Change-Id: Idbe938bb94f92c72275ee715d21004a3d9372496
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12935
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-12-31 15:23:34 +00:00
Vincent Ambo
d1cafeae1f chore(tazjin/tverskoy): disable docker
Change-Id: I91bb19175db67ce6e44eec907883dd891122c568
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12934
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-12-31 15:23:34 +00:00
sterni
57a9874588 chore(nix): move buildManPages to //users/sterni
It's only used in my user directory and I don't feel it's generally
useful. There's so little to interpolate you may as well just check them
in.

Change-Id: I31dc9917c2b281c7d68388e1a32c8ef5179621df
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12873
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-12-31 09:03:38 +00:00
sterni
d47c7fa12b feat(sterni/nix/html): make <html> also emit doctype
This makes the awkward withDoctype utility obsolete which is much nicer.
Technically, this is a BREAKING CHANGE since it was possible to create
valid documents without an <html> tag before:

    withDoctype (lib.concatStrings [ (<head> { } …) (<body> { } …) ])

I don't think this usecase is worth preserving since this can just be
written as

    <html> { } [ (<head> { } …) (<body> { } …) ]

and omitting the <html> tag is not recommended since it should be used
to set the language of the document (which we didn't in the example
above).

Change-Id: Idc5104ce88fe8bee965c076229b79387915c3605
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12907
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-12-31 09:03:37 +00:00
Florian Klink
9fa198f9ae chore(tvix): use bigtable_rs from crates.io
We don't need to use a git checkout here anymore.

Change-Id: I99641a4908f39799c8be6a1610ae458ca6fdc5ee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12931
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
2024-12-30 11:38:25 +00:00
Florian Klink
b12ea8d786 fix(users/flokli/nixos-tvix-cache): use escapeSystemdExecArgs
escapeSystemdExecArgs is the function that should be used to escape
Exec* service lines.

See a72b1b3c65/nixos/lib/utils.nix (L122-L128)

Reported-By: matrix:u/lukas:luflosi.de
Change-Id: Ia3a628db221a30310154c060a6e29ccb2c94c352
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12930
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-12-30 10:30:04 +00:00
Florian Klink
06311444aa chore(tvix): simplify Cargo.toml
Use dotted keys where we'd else have maps with a single key.

Change-Id: I9389e0fedddad1cf65f870a3a68415a0defaa259
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12929
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-12-30 10:23:31 +00:00
Florian Klink
74f2e86fcd fix(tvix/shell): s/buf-language-server/buf/
'buf-language-server' was removed as its development has moved to the
'buf' package.

Change-Id: If1ef36ed54926644debc914817bf4afea8bf2264
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12928
Reviewed-by: lukegb <lukegb@tvl.fyi>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-12-29 18:06:03 +00:00
sterni
131e7cca10 chore(3p/sources): Bump channels & overlays (2024-12-22)
* //users/flokli/keyboards/chocofi:
  The hash got invalidated somehow which I've updated (to what
  https://buildkite.com/tvl/depot/builds/37991#0193f512-78ba-491f-af60-a23e987def95
  showed). This seems to have triggered an update of ZMK and some
  options have gotten renamed.

Change-Id: I5a62cd4636c23bfdeae671da7b8acb0f02cc2263
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12905
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-12-29 15:02:22 +00:00
sterni
08981e63c6 chore(3p/sources): Bump channels & overlays (2024-12-02)
* //tools/nixery/popcount:
  replace removed buildGoPackage with buildGoModule.

* //users/aspen/system/system/modules:
  pkgs.nerdfonts has been removed. Instead we have a
  pkgs.nerd-fonts attribute set that contains all fonts
  as individual derivations.

* //users/tazjin/presentations:
  The ms package was removed from texlive for some reason
  in the latest release. Replace it with the packages it
  bundles (according to CTAN).

* //tvix/verify-lang-tests:
  Test on latest Nix release 2.25.2.

* //tvix/*-go:
  regenerate code from protobufs.

Change-Id: I19fcb3a0267f929f6e7388aa69ad99ac53b62236
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12859
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-12-29 15:02:22 +00:00
Florian Klink
4dce88e997 feat(users/flokli/nixos-tvix-cache): increase scraping interval
This provides more resolution in the dashboards.

Change-Id: I06e7260250e58fe62bbda41b67d84e0c5cacfbd2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12927
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Reviewed-by: Jörg Thalheim <joerg@thalheim.io>
Autosubmit: flokli <flokli@flokli.de>
2024-12-27 18:14:40 +00:00
Florian Klink
7dfe147c4d fix(users/flokli/nixos-tvix-cache): bump trace size limit
We produce traces bigger than what tempo accepts by default, causing
traces to be rejected with TRACE_TOO_LARGE and to then be incomplete.

Bump the max size.

Change-Id: I8caa245d14db683853485ee5625c9662ea51ce29
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12926
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
2024-12-27 16:00:58 +00:00
Florian Klink
9fdf6b3cd1 docs(users/flokli/nixos-tvix-cache): don't use mkForce
There's no need to mkForce anything in that list.
Nix reads nix-cache-info to determine priority.

Change-Id: I08797ed25348f52f5696f80558d206b73d20dead
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12925
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
2024-12-27 15:50:23 +00:00
Florian Klink
b65d40261b fix(users/flokli/nixos-tvix-cache): drop private bind mounts
The mount didn't get applied for some reason, explicitly configure the
path.

Change-Id: Ie41eb3c1d5f6416493211fb77709aaeecf61edf0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12924
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
2024-12-27 15:50:23 +00:00
Florian Klink
95e8a0a801 fix(users/flokli/nixos-tvix-cache): set timeInterval for metrics DS
The data source defaults to 15s of time interval. As alloy scrapes every
60s only, this causes watching dashboards with a smaller time range to
just not show any data, like the CPU graph being empty for a time range
< last 12h.

Fix by setting time interval to 60s.

Co-Authored-By: WilliButz <willibutz@posteo.de>
Change-Id: Ife306b2fda968654cad818a82f99e0011819be3c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12923
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-12-27 13:37:36 +00:00
Florian Klink
b36f2e3a32 fix(users/flokli/nixos-tvix-cache): BindPaths is serviceConfig
Putting this into UnitConfig won't work, so the bind mount didn't
happen, causing the blobs to be created on the SSD too.

This was already deployed and the data migrated over.

Change-Id: Ie30c8f458cdad8b764817a48a048ec3ca3c18e64
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12922
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-12-27 12:54:29 +00:00
Florian Klink
661a80ac3b fix(tvix/nar-bridge): set FileSize to NarSize
Nix and Lix both report this quite wrong when showing progress, they
assume 0.00 MiB of download size:

```
these 3 derivations will be built:
  /nix/store/m6dkr67hk87lpcz9wv8f2mp2zrgsyfp9-nix-2.24.11.drv
  /nix/store/zcfi6vs0z18309asw8fpa9v3665av44v-niv-0.2.22.drv
  /nix/store/g4kvzrs1kk9i13vaa8q1r0y4hgsqsnlp-dev-env.drv
these 112 paths will be fetched (0.00 MiB download, 2649.76 MiB unpacked):
  /nix/store/3qzlg8h5qc1slypy99aafdcgkzj6974h-OneTuple-0.4.2
  /nix/store/pp4540rig52fnj66kz1kiaj1000ja9v0-QuickCheck-2.14.3
  /nix/store/416aqss6p59w6v92127hkz04v0bclx21-StateVar-1.2.2
  /nix/store/b5f93spm2cl9g6x73dnx7ns5irs739fz-aeson-2.1.2.1
  /nix/store/nqnx6k6y103rargdz2gai2rmi389zn6n-aeson-pretty-0.8.10
  /nix/store/11wc4s6a6qi98lxikacw746slhmj5dl7-ansi-terminal-1.0.2
  /nix/store/yy7j66av9lwh3lvbxp1zv7572wb4l7dj-ansi-terminal-types-0.11.5
  /nix/store/cn6m459cbacdwkvjllgy5hkzf045yc1g-appar-0.1.8
  […]
```

For now, set FileSize to NarSize - it's not more wrong than it was
before, Nix already supports content encoding for compression (via
curl).

Reported-On: https://git.lix.systems/lix-project/lix/issues/606
Change-Id: Ia53506ecf6678ad298f759c95a69feb441cbc26d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12919
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-12-27 12:04:41 +00:00
Florian Klink
6e4f067054 test(tvix/nar-bridge): add NARInfo handler tests
Change-Id: I245ab38c30bb27c941274b2621aecccb695dacd0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12918
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-12-27 12:04:09 +00:00
Florian Klink
30b631ea72 test(tvix/nar-bridge): start testing handlers
We currently only had some integration tests (as part of tvix-boot)
testing nar-bridge functionality as a smoketest, but with axum-test we
can test individual handlers and peek at the store afterwards, which is
much more granular.

This adds tests for the nar-specific request handlers.

Change-Id: I7f2345df89ac43b9b372ecc66f696e95e2fcad18
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12916
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
2024-12-27 12:03:06 +00:00
Florian Klink
4f9112f1cd refactor(tvix/nar-bridge): move narinfo_str gen to helper
Change-Id: I2d3b135f63f17adc540d63d3ecaef4fb555bca74
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12917
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-12-27 12:01:34 +00:00
Florian Klink
7c0c270932 refactor(tvix/store): expose fixtures, make NAR_CONTENTS const
Allow reusing CASTORE_NODE_* and NAR_CONTENTS_* from other crates.

Also, there's no need for NAR_CONTENTS_* to be Vecs of bytes, these can
just be [u8; _].

Change-Id: I435c08a9d20f6a68266d0c9a70bfc7fdb618ce42
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12915
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-12-27 12:01:03 +00:00
Florian Klink
b2a2225b8b feat(users/flokli/nixos-tvix-cache): put metadata on SSD
Move the Directory and PathInfo storage to the SSD, and only bind-mount
the blob storage from the HDD.

This should improve IO for random access.

Change-Id: Icf9408a879dec8a52541953682ffac25b31e73d3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12921
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-12-27 11:58:01 +00:00
sterni
22023fdc8d docs(sterni/mblog/maildir): add more references
Change-Id: Ie3367d05c1cf76ee98501f0527c1da6f3282b4fe
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12920
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-26 14:03:57 +00:00
sterni
9d0b9a8395 refactor(sterni/mblog/mail-note): make dependency on config explicit
We reuse the common buffer size setting from mblog for convenience.
Eventually we probably want to make mail-note an independent library, so
it's good to make this internal dependency explicit and not a blanket
USE-PACKAGE, so the amount of used symbols from config doesn't increase.

Change-Id: I88458493c90d9f52410e34ed2a1db99be751b901
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12914
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-26 12:59:03 +00:00
sterni
1f5e1383f5 fix(3p/lisp/mime4cl): make MIME-BODY-STREAM always return characters
Because OPEN-DECODED-FILE-PORTION only knows about transfer encodings it
would only return a character stream for 7bit encoded bodies. This
causes inconsistent behavior where some bodies would return binary and
some character streams. To fix this, we specialize MIME-BODY-STREAM for
MIME-TEXT parts which may or may not be a good enough solution.

We may actually want to make MIME-BODY-STREAM binary always and let the
user handle decoding?! This may be a good idea to take care after yet
another stream machinery redesign.

Since the mime4cl test suite doesn't test MIME-BODY-STREAM (much), add a
message generated by notemap that hits this issue to the mblog golden
test suite.

Change-Id: Ie340c42ced6c693af9b3c84b177408d6b6d2c9c4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12913
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-26 12:59:03 +00:00
sterni
0ead86ec89 chore(users/sterni/mblog): rename apple-note to mail-note
The type identifier Apple uses is com.apple.mail-note, so “Mail Note” is
actually the best way to refer to this format. Not only doesn't it
include a trademark, but it's also more accurate. The iOS and macOS
Notes.app(s) allow authoring Notes to be saved in iCloud which seems to
use a different API and/or storage format (at least these notes are no
longer accessible via IMAP). In this sense they are “Apple Notes”, but
not “Mail Notes”.

Change-Id: I2fd3d3bd253ed39adf7965008290f7d1e622831d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12815
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-12-26 12:59:03 +00:00
sterni
b8e4da856f test(sterni/mblog/golden): check mblog against expected output
This should allow for refactors with more confidence as we can make sure
base functionality stays the same. It is important to test image
extraction, so unfortunately we need to check in a base64 rendering of
an image file. I've used //users/tvlbot.jpg, so git should at least be
able to deduplicate the extracted content. Note that this was achieved
by altering the note message since I wasn't able to add the picture in
the iOS Notes.app without the image being recompressed.

To get extra benefit, we also add the test note to the mime4cl test suite.

The expected output can be updated with

    mblog $(mg build :maildir) expected

Change-Id: I0aa493b206439018ad89745bacbd47af78bd1396
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12911
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-12-26 12:59:03 +00:00
sterni
024783f535 fix(3p/lisp/mime4cl/benchmark): fix mime type of attachment
Change-Id: I6a34622cb0a5dc80f82b64bac8da06f9e1d612d8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12910
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2024-12-25 23:32:29 +00:00
sterni
7ebf6be3a3 feat(aspen/web/orgExportHTML): allow bringing your own config.el
`configFile` is chosen to match the terminology used in NixOS modules. I
think this is quite useful since you can do a lot via the config file
since you can not only set the HTML export setting via the org file
header, but also through various emacs variables (see
<https://orgmode.org/manual/HTML-specific-export-settings.html>).

Change-Id: If4d66348e3043f62782106e7fd34f5cf5c7071a4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12651
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-25 18:43:28 +00:00
Profpatsch
bcaf9c6074 fix(users/Profpatsch/alacritty): work around missing /etc/bus/ddcci
For some reason the driver does not mount the bus sometimes, in that
case just call the tool directly without a specific bus, so we get at
least some sort of brightness adjustment (lol).

Change-Id: Ie8fe8c500fb1025609b569715e681e053e6e06ed
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12909
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-12-25 17:34:09 +00:00
sterni
3bd43e39dd feat(sterni/nix/html): flatten lists enclosed by an element
Currently nix/html requires that the content of an element is either an
HTML string (which may or may not be generated by the library) or a flat
list of HTML strings (which may or may not be generated by the library).

I've found that this requirement makes authoring more complex pages that
have programmatically generated parts cumbersome since one needs to take
care that returned lists are appended, not included as an element. This
leads to confusing code and annoying errors. We don't really care about
the nesting of a content list as long as the order is clear, so we can
just flatten the list making life a little easier:

    (<main> { } [
      (<section> { } (<h2> { } "static section"))
      listOfGeneratedSections
      (<section> { } (<h2> { } "another section"))
    ])

Change-Id: I06016a8eff01d34d7eaea7798a00ed191115f9c8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12908
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2024-12-25 00:36:36 +00:00