Compare commits

...

676 commits
canon ... fork

Author SHA1 Message Date
sinavir
5d3769594e
fix: Fix compilation from outside
Change-Id: I6f2ad235e00b8a08a8ec061f0a822881a2d83bca
2025-01-02 12:07:11 +01: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
sterni
8b9e4badf0 refactor(aspen/orgExportHTML): use default emacs
In r/4000, I switched orgExportHTML to Emacs 28 (which bundles org by
default) when nixpkgs defaulted to Emacs 27. Since nixpkgs now uses
Emacs 29 by default, this is no longer necessary.

Change-Id: I6d700e8508be77a1b9866557403a5a4ecaa005f7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12569
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: aspen <root@gws.fyi>
2024-12-23 23:12:32 +00:00
sterni
b50dad6e31 chore(3p/overlays/tvl): drop obsolete niri override
The pinned commit is contained in 0.1.10 and 0.1.10.1.

Change-Id: I966b2b2aa8b9072e624d1488f9ea23c06348fa5d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12906
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: flokli <flokli@flokli.de>
2024-12-23 21:40:06 +00:00
sterni
a2a33f1d06 feat(sterni/git-only-push): support force pushing
This is occasionally necessary. --force-with-lease should also be
supported in the future, unfortunately getopts(1) doesn't have --long
option support.

Change-Id: Ib054009f48585b1a52ed041a51bcaf7e32dca1b3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12904
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-22 13:36:39 +00:00
sterni
8459ad94fa feat(sterni/git-only-push): allow using git cherry-pick -x
I've noticed git only-push is quite useful for creating backports for
nixpkgs stable branches which we need git cherry-pick -x for.

Change-Id: Ie20248d3d0c5fee5cdbd3b3a078439a99f597c02
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12903
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2024-12-22 13:30:36 +00:00
sterni
b8342a821b refactor(sterni/git-only-push): remove superfluous usage call
Change-Id: I98f8954a12c3198eb9c45ddabe7f3448caba7e5d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12902
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-12-22 13:15:31 +00:00
sterni
19eafa3b9b chore(sterni/machines/ingeborg): remove gopher related configs
The gopher server has been disabled for a while and I'm probably not
going to revive it any time soon (though I should fix some stuff on
spacecookie soon-ish…).

Change-Id: I6ef6bbfc013f9924e2d2b7ba116285a32406e5a7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12901
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-21 21:27:13 +00:00
sterni
00f36f20e6 feat(sterni/git-only-push): isolate given commits and push to ref
Small git subcommand that enables you to push a subset of (independently
apply-able) commits from a local chain of commits to a remote ref, e.g.
for review. Useful for a workflow where you work on a chain of commits
and want to submit the ones that have been finished for review without
rebasing the chain.

Change-Id: I7717fe37867acdd826bc03a578104a0c3b2cbf71
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12900
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-21 21:10:38 +00:00
sterni
7069de7857 fix(sterni/emacs): get emacs to use default monospace for unicode
I've recently set JetBrains Mono to be my default monospace font because
it has better Unicode coverage than Bitstream Vera Mono and should
consequently include all BQN symbols.

However when investigating why 𝕊 was weirdly small, I discovered that it
was using GNU FreeSerif for some reason. As it turns out, Emacs uses the
default font (or the system wide default monospace font if unset) for
ASCII only. Beyond ASCII emacs falls back to the random assortment that
is fontset-default. Using (set-fontset-font <fontset> NIL …) doesn't
work – neither for preventing a fallback to fontset-default from
fontset-startup nor for prepending a font to all ranges of
fontset-default. Especially the former seems to contradict the Emacs
documentation.

The only solution I could come up with, is to set the relevant charsets
explicitly in fontset-startup and to never touch the default font face.

Change-Id: I640b3207e3cc3449ecd422db0e2ed93fb7d3521f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12899
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-20 23:38:05 +00:00
sterni
756e96499c fix(nix/writeTree): also shell escape path nodes
We allow strings with context that represent paths (since they qualify
as `pathLike`). While store path (names) may not contain any characters
that are meaningful in shell, they may contain directories and/or files
with such names since it's permissible in POSIX.

To fix this, we convert the given value `v` to a shell argument in two
stages:

1. Use `${v}` to coerce the value to a string while importing any
   necessary paths to store.
2. Escape the resulting string for use as an argument.

Change-Id: Ib989b50df2a921c2abcd1ebc7ca0ff6e2bb79088
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12898
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2024-12-20 23:38:05 +00:00
sterni
de4004a8ea feat(sterni/exercises/lib): add Diagonals BQN function
Retrieves all diagonals of a two dimensional array (which have differing
lengths). Useful to solve e.g. Project Euler problem 11
(<https://projecteuler.net/problem=11>).

Change-Id: I853bc6eaaf869326d84d8e789fee9995f5a332d8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12897
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-12-20 17:39:18 +00:00
zimbatm
88e65b5c33 fix(users/flokli/nixos-tvix-cache): bump nginx read timeout
This is a bandaid until we have a proper fix.

Change-Id: Id9f0bab5f309a7796c1efee23071013618c6dd12
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12896
Autosubmit: Jonas Chevalier <zimbatm@zimbatm.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-12-20 17:04:40 +00:00
Profpatsch
5b4497c733 feat(users/Profpatsch/alacritty): implement varlink SetColorScheme
```
varlinkctl call \
  /run/user/1000/de.Profpatsch.alacritty.ColorScheme \
  de.Profpatsch.alacritty.ColorScheme.SetColorScheme \
  '{ "colorScheme": "prefer-light" }'
```

Change-Id: Id8ffb03599f4aa716264ec3832c7b5948c7673cb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12895
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-12-17 14:40:14 +00:00
Profpatsch
cd521a168e feat(users/Profpatsch/alacritty): add modus & ef themes
Change-Id: I133f29e38f1e9c9c8b75468993b97951aff3e9da
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12894
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-12-16 17:27:02 +00:00
Florian Klink
6068d044b3 feat(tvix/nix-daemon): instrument for TvixDaemon
This makes it easier to see what's being communicated, by setting
`RUST_LOG=nix_daemon=debug`.

Change-Id: Ifcd89ff6c5c1727e97569e29d4f63993cc37ed8e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12884
Tested-by: BuildkiteCI
Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com>
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: flokli <flokli@flokli.de>
2024-12-15 18:14:10 +00:00
Profpatsch
c283116c2e feat(users/Profpatsch/alacritty): add dbus theme change
For trying out a bunch of themes in quick succession.
Also note down a few of the cooler themes.

Change-Id: I0da80cc0945dba03d3592f28f4c34df4b5969e82
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12893
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-12-13 20:28:29 +00:00
Profpatsch
1ec787a417 fix(users/Profpatsch): remove alacritty from DisplayBrightness name
Change-Id: Ic78b17a3d5bcc96350dca8f71ad489f0ba96c6d0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12892
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-12-13 20:28:29 +00:00
Profpatsch
e1fda52bed feat(users/Profpatsch): dbus service for changing monitor brightness
This simple dbus service will use the ddcci interfaces to change
brightness for both the internal and external monitor (roughly in
sync).

Currently in the alacritty-change-color-scheme script because I’m lazy
and still experimenting.

Change-Id: Ib2c4323699ed9d19ee398f84680b755df4b25798
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12891
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-12-13 19:45:58 +00:00
Profpatsch
fe9692fabf feat(users/Profpatsch/jaeger): allow calling with arguments
Change-Id: I56ee1b5e0224779e62b428a5a23a2bce48e9f9ef
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12890
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-12-13 19:45:58 +00:00
Profpatsch
698bf7e19d feat(users/Profpatsch/alacritty): add tsconfig for jsdoc checks
These `tsconfig` will apply to JS files with jsdoc comments. Sweet!

Change-Id: I1a623d0ec7e2d73e99d7c6aaf8162d96f4ff2b29
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12889
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-12-13 19:45:58 +00:00
Profpatsch
b8fd86a53e feat(users/Profpatsch): start dbus tracer nodejs client lib
We want to use the tracers quite similar to how we’d use OTEL for
tracing, meaning you should be able to start a span and use it within
another span to register it as a parent span.

They are also batched up and sent asynchrously, so the won’t incur a
lot of overhead on dbus nor block the main execution flow (done via
sending a nodejs event and a dedicated batch sending process).

Change-Id: If61b85305807e661ffee386f793c11c4b7a858a9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12888
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-12-13 19:45:58 +00:00
Profpatsch
c12fdeb8e0 refactor(users/Profpatsch): simple wrapper around the dbus lib
This makes defining the interface a little less verbose & more
typesafe (checks are done by the dbus library).

Change-Id: I16df987fd152cabf76ed9878ed1a372a0f7003fb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12886
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-12-10 15:34:03 +00:00
Profpatsch
4eeac3cb1d feat(users/Profpatsch): Implement initial otel-dbus proxy
For simplicity’s sake this puts everything into the
alacritty-change-color-scheme script for now.

This implements a simple dbus-opentelemetry proxy adapter, which
allows services to record otel traces without having to depend on the
quite complex otel libraries. Instead, they just send their traces to
the dbus tracing interface, and the service that binds against that
interface forwards the spans to the OTLP collector.

First you create a new Tracer for your service via the `TracerFactory`
interface:

```
> busctl --user call \
    de.profpatsch.otel.Tracer \
    /de/profpatsch/otel/TracerFactory \
    de.profpatsch.otel.TracerFactory CreateTracer \
    s hello
s "/de/profpatsch/otel/tracers/hello"
```

(this corresponds to setting up a tracer with properties in OTEL)

Then, you can use the returned object path to call the `Tracer`
interface proper:

```
< busctl --user call \
    de.profpatsch.otel.Tracer \
    /de/profpatsch/otel/tracers/hello \
    de.profpatsch.otel.Tracer \
    StartSpan \
    s '{"spanId": "111", "name": "111"}'
```

This will create the spans. You can also set their timestamps on the
sending side via `startTime`/`endTime`, but make sure it’s a hrtime
tuple.

Prefer batching multiple spans vie the `BatchSpans` call.

Change-Id: Ie6cfdcb0dc3e2398316a2c1763bc72c1118168b0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12885
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: benjaminedwardwebb <benjaminedwardwebb@gmail.com>
2024-12-10 15:34:03 +00:00
Profpatsch
821ff7ffe4 feat(pkgs/Profpatsch/alacritty): register color dbus interface
Adds a simple-stupid dbus interface for this daemon which allows
on-the-fly changing of the alacritty color scheme.

Example call:

```
busctl --user call de.profpatsch.alacritty.ColorScheme \
 /de/profpatsch/alacritty/ColorScheme \
 de.profpatsch.alacritty.ColorScheme \
 SetColorScheme s 'prefer-dark'
```

Change-Id: Ic895fedefb3f5bd95f2279edf53fe179e8f24f89
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12875
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-12-10 15:34:03 +00:00
Profpatsch
6477428c36 feat(pkgs/Profpatsch/alacritty): init dark mode dbus daemon
A simple dbus daemon that writes the alacritty config to
`~/.config/alacritty/alacritty-colors-autogen.toml` on startup and
whenever a change between dark/light mode is requested.

Alacritty only implements an config file isync watcher, no SIGHUP
handler or similar, so we have to actually write the config file lol.

This is all a little glue-y, but idk, whatever.

Further reading & inspo:

https://github.com/alacritty/alacritty/issues/5999
https://www.christianfosli.com/posts/2024-on-colorscheme-changed/
https://github.com/christianfosli/on-colorscheme-changed

Change-Id: Iac4eb9d85679dc87e28e57d68384645b3b91d08a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12870
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-12-10 15:34:03 +00:00
Profpatsch
22c46c8009 fix(users/Profpatsch/whacd-resolver): fix redacted TLD
they switched from .ch to .sh

Change-Id: I889634ec257b7956b9d2b22a9ad6fc0c889f43c2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12853
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-12-10 15:34:03 +00:00
Profpatsch
84e9c7f104 feat(users/Profpatsch): add a example for omega search
Uses xapian under the hood to index the contents, then makes it
searchable with a CGI binary on http://localhost:8080

We could in theory index every -doc output this way to get local
documentation search for the current system (similar to `man-db`).

Change-Id: I2588c8f100841cfbed570bb65d376b79747c06ee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12710
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-12-10 15:34:03 +00:00
Ilan Joselevich
1cc4200b3e feat(tvix/boot/tests): Replace GNU parallel with rush
rush is like GNU parallel, but in Go, and most importantly, without
the annoying citation.

Change-Id: Id4737e6dee43037c1c2bc814738416410a603e07
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12887
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-12-10 10:17:15 +00:00
Florian Klink
b4ab3b45d7 docs(tvix/boot): update docstring
mkBootTest is not limited to only listing files, it can also be used (is
used) to boot init.

Change-Id: Iaa0d2b5bad3be856aa8a0172450efe166620ba41
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12882
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2024-12-09 22:11:50 +00:00
Florian Klink
12c9db5a9a refactor(tvix/nix-daemon): use if let Some(_) = …
This makes it a bit less verbose.

Change-Id: I41835f43628d7a10855b9d89816e8d20eb7546d2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12881
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: Domen Kožar <domen@cachix.org>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2024-12-09 14:51:49 +00:00
Florian Klink
adf9c47626 docs(nix-compat/nix_daemon): fix typo
Change-Id: I9bc9982faa0abc8212e15916a3435dd0cfd0e54d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12880
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Domen Kožar <domen@cachix.org>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-12-09 14:51:49 +00:00
Florian Klink
5b278cc6ab refactor(nix-compat/nix-daemon): s/result/results/
There's more than one result in there.

Change-Id: I5d519db51fda050ed293bfb52215a643882e0116
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12879
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-12-09 14:51:49 +00:00
sterni
8f13435020 feat(sterni/nix/build): check in toPlainText
This is a little helper which tries to render different input files into
a fancier, human readable plain text form. This is quite useful to
gether with build.gopherHole.

Change-Id: Ibe0050fa6a55e85745127a287bba0febeeb75849
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12874
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2024-12-07 01:06:28 +00:00
sterni
317bd54038 chore(nix/build): rename to reduce redundancy in attr path
Change-Id: Ibefb924bb329c2a9dc0ac8e5ee1566253300b5cf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12872
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2024-12-07 00:41:20 +00:00
Vincent Ambo
4dad5b2ef9 chore(tazjin/dotfiles): remove hyper configuration
I never fully set up the hyper key and now this configuration actually started
working by default, which is distracting, so begone!

Change-Id: If4c0b5928360087eb1a674ee2eca2510ced3ca55
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12871
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-12-05 22:14:35 +00:00
sterni
a31af5233c chore(3p/lisp/mime4cl): remove MIME-PART-SIZE and MIME-BODY-SIZE
These functions are not very useful—as far as I'm aware at least—, are
not implemented very efficiently and totally untested. Remove them for
now. See also r/8978.

Change-Id: If9d277b460c3ed728a171bc29dd626c4c5fc0313
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12868
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-05 14:00:25 +00:00
Florian Klink
856886f01d chore(users/flokli/nixos-tvix-cache): switch to Mimir
VictoriaMetrics doesn't seem to "normalize" timeseries and label names,
which causes breakage in Grafana Dashboards querying label values.

Reported in VictoriaMetrics/VictoriaMetrics#7744.

Change-Id: I3397c4fd5911c9a3503d058c77c26e0db9300f36
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12867
Tested-by: BuildkiteCI
Reviewed-by: Jonas Chevalier <zimbatm@zimbatm.com>
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: flokli <flokli@flokli.de>
2024-12-04 22:37:23 +00:00
sterni
bfb27b7caa feat(3p/lisp/mime4cl): add benchmark script
This is far from comprehensive, mainly covering stuff I'm interested for
mblog currently. I should extend it as I go. The cases I've added reveal
something I've noticed recently: The worst performing part of mime4cl
seems to be the initial parsing of the message. My current theory is
that this is due to the use of READ-LINE in DO-MULTIPART-PARTS which
seems to ultimately dispatch to READ-CHAR internally due to the way our
streams are set up. We should look into fixing this soon.

It may be interesting to add this to windtunnel at some point, but I'd
rather not burden a runner with this given that mime4cl is only worked
on once every blue moon and I'm the only user.

Change-Id: I001de3aac01f8aa7ea923b43b2db29cf66a4aac3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12864
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-04 22:18:18 +00:00
Florian Klink
2879969f1b chore(tvix): bump tower-otel-http-metrics, enable axum feature
Move back to a proper release containing the opentelemetry bump. Also
enable the `axum` feature, which will give us a per-route accounting.

Change-Id: Icdf4dc73588ef45b6596b320c14d9f44946327b3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12865
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-12-04 21:52:42 +00:00
Florian Klink
e743e2439c chore(users/flokli/ipu6-softisp): remove
This didn't work properly for a while, at least expose too many cameras
for browsers to get confused.

It also doesn't apply cleanly to the 6.12.1 kernel.

Change-Id: I8a23cc0ae0547bfde5756ee84953b60f4b0a2df2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12866
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: flokli <flokli@flokli.de>
2024-12-04 20:02:48 +00:00
sterni
962df219f7 chore(3p/lisp/closure-*): disable on ECL for now
As it turns out, some of the load/compile time set up the package does
doesn't work in ECL for unknown reasons at the moment. Executables using
closure-* will crash after starting up:

    ;;; Checking for wide character support... WARNING: Lisp implementation doesn't use UTF-16, but accepts surrogate code points.
     yes, using code points.
    ;;; Building Closure with CHARACTER RUNES

    Condition of type: SIMPLE-ERROR
    Invalid relative pathname #P"package.lisp" for component ("closure-common" "package")

Change-Id: I4b4bf96835a39696884ec6fea9c249fdeb53c853
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12863
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-02 23:15:51 +00:00
sterni
604296bb7c feat(3p/lisp/mime4cl): enable compilation with CCL
Only significant implementation specific code at the moment is FILE-SIZE
which isn't very important. We can also easily implement it for CCL.

Additionally, we clean up an unused lexical variable warning and remove
a duplicate definiton of MIME-TYPE-STRING fro MIME-UNKNOWN-PART that CCL
doesn't like.

Change-Id: I7c960e50dcdc1d3e46cb4945f36ea315a3c9838d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12862
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-02 23:09:17 +00:00
sterni
302297cfe3 fix(3p/lisp/mime4cl): fix stat function name in FILE-SIZE
This is a silly mistake and was not caught because FILE-SIZE isn't
exercised in the test suite. We can probably remove MIME-BODY-SIZE and
look into removing MIME-PART-SIZE as well. I just want to be thorough
here so that we can revert into a non-broken state in case we decide we
need those functions for something.

Change-Id: I5bbb3dde6616220fc3b6feddbf7a39b6a9b0ea0d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12861
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-02 23:09:17 +00:00
sterni
743d54a758 refactor(3p/lisp/mime4cl): drop NATIVE-NAMESTRING
The only code that used this function was removed in r/7854.

Change-Id: Ia07dcb08ed4a92495085b48018372fb9898a0248
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12860
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-12-02 23:09:17 +00:00
sterni
0c87789b31 fix(sterni/mblog): check for help flags in flag, not arg list
Change-Id: I9f353f7c8f66078b51e333b6b8653f07f7ff544d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12816
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-02 18:09:09 +00:00
sterni
3398c2ab7f fix(3p/lisp/mime4cl): don't store redundant headers in MIME-MESSAGE
MIME-MESSAGE has a HEADERS slot which is an alist of all headers. Some
of those headers will be parsed again and stored in MIME-PART (or a
subclass of it). Having the header content stored in the HEADERS alist
and in MIME-PART causes problems:

- Requires extra knowledge about how messages are parsed when rendering
  messages.
- Makes MIME= depend on the specific whitespace and quoting in those
  headers which isn't preserved by how mime4cl parses e.g. Content-Type.
- Gives users two ways that slightly diverge to access the same thing.

To avoid this, we remove these headers after the MIME-PARTs contained in
MIME-MESSAGE have been initialized (since they reuse the HEADERS slot).

Change-Id: I5b221f88bbac47dd81db369e3c1d5881a5a50e5e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12858
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2024-12-02 18:09:09 +00:00
sterni
db2fa5b3c8 fix(3p/lisp/mime4cl): also default to :7BIT when decoding
Content-Transfer-Encoding should default to 7bit when it's not
given (RFC2045). MIME-PART already defaults to this when manually
constructing this, but MAKE-MIME-PART would always set it, so it would
sometimes be NIL which is incorrect. We now correctly fall back to :7bit
in this case.

Additionally, we make sure that KEYWORDIFY-ENCODING immediately returns
when it's given NIL.

Change-Id: I50f86dd649d83a4c3a8881d6e13dcada889d5521
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12857
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2024-12-02 18:08:37 +00:00
sterni
4ef8ee6f1e refactor(3p/lisp/mime4cl): streamline MIME-MESSAGE dispatching
Change-Id: I1fda161e6e128f1bb085a63dd39541894e397d64
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12856
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-12-02 18:08:37 +00:00
sterni
e761311c46 fix(3p/lisp/mime4cl): support FILE-PORTION in PRINT-MIME-PART
Change-Id: I942e8915d5076628179dfa77bf80b7510b862b51
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12855
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-12-02 18:08:37 +00:00
sterni
3f95f58038 refactor(3p/lisp/mime4cl): eliminate use of READ-CHAR in PRINT-MIME-PART
Change-Id: Ibb422d3b6720b782620e262bbd3555b9a879ad65
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12854
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2024-12-02 18:03:04 +00:00
Vova Kryachko
88d51c9c16 chore(tvix/nix-compat): basic daemon handler tests
This change adds tests for basic request/response handling as per nix
daemon STDERR_* protocol.

Change-Id: Ia6a1904e14955551b11f776b6ccb595fa8984513
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12852
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Vladimir Kryachko <v.kryachko@gmail.com>
2024-12-01 17:58:17 +00:00
Florian Klink
8d4a0ac008 refactor(tvix/glue): make user-agent more granular
Use the crate name in the user-agent, similar to tvix-[ca]store.

Change-Id: I10527fb1f29006dbfd8630d8bb1f00d7905efdd3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12851
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-29 08:09:50 +00:00
Florian Klink
9fabf8a1b5 feat(tvix/castore): set user-agent for object_store blob/directorysvc
Change-Id: I9fcebffb19174cba2e9001398419d3041266400c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12850
Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: flokli <flokli@flokli.de>
2024-11-29 08:09:50 +00:00
Florian Klink
fa305dea90 feat(tvix/store): set user-agent for NixHTTPPathInfoService
Change-Id: I8eb74c5a9457b88ab51bd88084591a4c7c5cdbcc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12849
Reviewed-by: Domen Kožar <domen@cachix.org>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-29 08:09:50 +00:00
Vova Kryachko
b59561b9b1 chore(tvix/glue): Fix fetchTarball for github urls.
GitHub does not allow downloads by clients without a User-Agent set.
This changes sets the client User-Agent to "tvix".

Change-Id: I829b37e63bcedb5ea785b55eff5b10175f5caaa6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12845
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-28 17:16:28 +00:00
sterni
e9b2b0d51c feat(ops/monorepo-gerrit): link r/<id> shortlinks to revisions
I've decided to use the commit view instead of the log view (which cgit
uses) for now. It really depends on how you use it in commit messages:
To refer to a depot state or to a specific change (independently of what
CL gerrit assigned). I'm happy to change it to use the log view.

Change-Id: I472b511fa1322f91304f6543473b51f9c5f21ca2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12837
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-11-25 11:39:36 +00:00
Vova Kryachko
e9acde3c42 feat(tvix/nix-daemon): New operation AddToStoreNar
This operation is particularly used when invoking the following
nix commands:

```
nix-store --add-fixed some-path
nix-store --add-fixed --recursive some-path
```

Change-Id: I0f9b129c838c00e10415881f1e6e0d7bc1d7a3a6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12800
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-24 22:21:20 +00:00
Vova Kryachko
8ef9ba82a8 feat(tvix/store): Add CAHash validation
Validation is done inside ingest_nar_and_hash and
is used by Fetch::NAR and the nar-bridge.

Change-Id: I7e2be4cc13d2447035f1e5a444f44b62339988bf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12836
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-24 20:24:43 +00:00
Florian Klink
ae76eaa761 feat(users/flokli/nixos-tvix-cache): re-enable http2
With nar-bridge supporting zstd content-encoding, we don't need the
nginx zstd module and can re-enable http2.

We also need to propagate the Accept-Encoding sent by the client to
nar-bridge, so it actually knows it can send zstd.

This reduces the time measured in the microbenchmark from ~13s to this:

```
hyperfine 'rm -rf /tmp/cache; nix copy --from https://nixos.tvix.store/ --to "file:///tmp/cache?compression=none" /nix/store/jlkypcf54nrh4n6r0l62ryx93z752hb2-firefox-132.0'
Benchmark 1: rm -rf /tmp/cache; nix copy --from https://nixos.tvix.store/ --to "file:///tmp/cache?compression=none" /nix/store/jlkypcf54nrh4n6r0l62ryx93z752hb2-firefox-132.0
  Time (mean ± σ):      4.880 s ±  0.207 s    [User: 4.661 s, System: 2.377 s]
  Range (min … max):    4.700 s …  5.274 s    10 runs
```

Change-Id: Id092307423636163ae95ef87ec8fa558b83ce0bb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12835
Reviewed-by: Jörg Thalheim <joerg@thalheim.io>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-11-24 18:34:04 +00:00
Florian Klink
f6aee3534b feat(tvix/nar-bridge): support zstd content-encoding
We previously didn't handle compression in nar-bridge, and left it up to
a fronting reverse proxy.

However, at least nginx with http2 enabled pins each connection to a
single core, causing compression to be limited by the throughput of a
single CPU.

Change-Id: Ia11c2ff5c012192b25eb8ad05dae5542a2d2f777
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12834
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: Jörg Thalheim <joerg@thalheim.io>
2024-11-24 18:34:04 +00:00
sterni
a7080a1468 refactor(nix/buildkite): don't calculate deps for skipped targets
We don't need to calculate dependencies between and on targets that are
part of the parent target map since they will be skipped by buildkite
anyways. This speeds up 🦙 considerably for pipeline runs that have a
limited number of changed targets and a parent target map passed
in (i.e. pipeline runs of most CLs, but not canon runs). In my testing
it was about a minute faster (1/6 of the time 🦙 takes currently) for a
pipeline where under five drv targets changed. For the full
pipeline (i.e. no parentTargetMap) 🦙 takes about the same time as
before (it's a few seconds slower as is to be expected, but nothing
significant).

Change-Id: Ia5a80e142da8f40bc591e2c6cfaf48c325b2f577
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12818
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-11-23 22:20:21 +00:00
Florian Klink
25fb9e32f6 chore(tvix/nix-compat-derive-tests): update fixtures
With more implementing NixDeserialize, this error message changed.

Fixtures were regenerated by running:

```
TRYBUILD=overwrite cargo test -p nix-compat-derive-tests --all-features
```

Unfortunately, it's not possible to loop this into CI, as trybuild
invokes cargo during the build.

Change-Id: Ia0ab07d0907d21366845fe06e01df9fb1fe3e7cb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12831
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-11-23 20:23:53 +00:00
Florian Klink
cb85e87376 refactor(users/flokli/nixos-tvix-cache): absorb otlpcollector into alloy
We don't need a separate instance of opentelemetry-collector, alloy can
also do this job for us.

Change-Id: I1b671ba57d70b080f7db112e1afcfe2e0cbdd13e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12829
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: Jonas Chevalier <zimbatm@zimbatm.com>
Tested-by: BuildkiteCI
2024-11-23 09:44:36 +00:00
Florian Klink
09b343864a fix(users/flokli/nixos-tvix-cache): bump max_traces_per_user
These are quite bursty, and I've seen messages about getting rate
limited.

Change-Id: I73058140957cb5718971fa432c003c2d1b0305e3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12828
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-11-23 09:44:36 +00:00
zimbatm
e58e6f6e16 feat(users/flokli/nixos/nixos-tvix-cache): also collect system metrics
Use grafana-alloy to collect system metrics.

Change-Id: I592e64ca722701d4f12e69a531a434b54954955a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12827
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-23 09:41:53 +00:00
Florian Klink
378a6faec2 fix(tvix/nar-bridge): explicitly select fields to add to span
We got some double-quoted strings at narinfo_str, and it didn't align
well with our other field names.

Change-Id: I5c08786d2c4435542bf39ff44b9d4ada5400550d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12826
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-11-23 09:40:21 +00:00
Florian Klink
12d1dcbfcc fix(tvix/castore): instrument blob uploads with current span
Change-Id: I67e18486c48f06787fad8be506e95eecc23e994d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12825
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Jonas Chevalier <zimbatm@zimbatm.com>
2024-11-23 09:40:21 +00:00
Florian Klink
0b1068677e fix(tvix/nar-bridge): set correct service name
We should be able to distinguish tvix-store and nar-bridge.

Change-Id: I616c8e0c1ce2dbacab92975582dd36141b673aa2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12824
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-11-23 09:40:21 +00:00
Florian Klink
02903133f4 feat(tvix/nar-bridge): wire up metrics layer
This provides some global HTTP statistics.

Change-Id: I8bd3e034123154a49d94720b0c8d0c3babde5ae3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12557
Reviewed-by: Jonas Chevalier <zimbatm@zimbatm.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-23 09:40:21 +00:00
Florian Klink
5f670a2f67 feat(tvix/tracing): configure metrics support
This creates and registers a global meter provider, which uses the same
mechanism to get notified of flushes.

Change-Id: I856a67f0b282d494de3b2c2a1b79c06ae8ffe252
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12556
Reviewed-by: Jonas Chevalier <zimbatm@zimbatm.com>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-23 09:40:21 +00:00
Florian Klink
6f1d059c7d feat(users/flokli/nixos/nixos-tvix-cache): collect metrics
This enables routing of metrics to an instance of VictoriaMetrics, and
configures opentelemetry-collector to route metrics there.

Change-Id: If765191a4cc70ddcaad821d45132b96a10a12148
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12812
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Jonas Chevalier <zimbatm@zimbatm.com>
2024-11-23 09:40:21 +00:00
Florian Klink
52a8e47ac1 feat(users/flokli/nixos/nixos-tvix-cache): init
This is a fetch-through mirror of cache.nixos.org, hosted by NumTide.

The current machine is a SX65 Hetzner dedicated server with 4x22TB SATA disks,
and 2x1TB NVMe disks.

The goals of this machine:

 - Exercise tvix-store and nar-bridge code
 - Collect usage metrics (see https://nixos.tvix.store/grafana)
 - Identify bottlenecks
 - Replace cache.nixos.org?

Be however aware that there's zero availability guarantees. Since Tvix doesn't
support garbage collection yet, we either will delete data or order a bigger
box.

Change-Id: Id24baa18cae1629a06caaa059c0c75d4a01659d5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12811
Tested-by: BuildkiteCI
Reviewed-by: Jonas Chevalier <zimbatm@zimbatm.com>
Reviewed-by: flokli <flokli@flokli.de>
2024-11-23 09:40:21 +00:00
Florian Klink
0715163779 chore(tvix): bump opentelemetry to 0.27
Change-Id: I3afbd8c94e0bc2cdf30da1886ae05b922f8a718f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12822
Reviewed-by: Jonas Chevalier <zimbatm@zimbatm.com>
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
2024-11-23 09:40:21 +00:00
Florian Klink
dc21f5e543 feat(tvix/store): add xp-store-composition-cli feature flag
This can be used to transitively enable the `xp-composition-cli` feature
flag in the `tvix-store` crate, which is unnecessarily hard to do with
crate2nix.

Change-Id: I3f7c505a3fd505561c9a7b2f063b6540532cdfd4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12809
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-11-23 09:40:21 +00:00
Florian Klink
923ed3532d fix(users/flokli/nixos): add source_up
This got lost somehow, but is necessary to keep `mg` in `$PATH`.

Change-Id: I2100d68225284bfe825bcc5ab01628891ebd09a3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12810
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: flokli <flokli@flokli.de>
2024-11-22 12:33:34 +00:00
Vova Kryachko
654cc3e43a chore(tvix/nix-daemon): Implement framed protocol
When sending nars over the wire to the nix-daemon, nix protocol versions
>= 1.23 use this framing protocol.

This change implements an AsyncRead for this protocol, to be used in
AddToStoreNar and any other operations when necessary.

Change-Id: I5f7972fe1c9ea145780bf449321bd3efeb833d18
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12814
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-20 17:36:26 +00:00
Vova Kryachko
db13b6c092 chore(tvix/nix-daemon): Implement STDERR_READ protocol
When sending nars over the wire to the nix-daemon, nix protocol versions
1.21 to 1.23 use this framing protocol.

This change implements an AsyncRead for this protocol, to be used in
AddToStoreNar and any other operations when necessary.

Change-Id: I571f1adbb2343c14c98503d1a2c12eea4c783ec9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12813
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-20 17:36:26 +00:00
Thomas Koch
e5fbde94aa fix(corp/website): typo s/existence/assistance/
Change-Id: Ic35bf4706cb660a09fdc36e6ed1d291d429ec7ea
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12786
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-11-20 08:46:39 +00:00
Florian Klink
a01760fcee refactor(tvix/tracing): simplify flushing channel
The TracingHandle::flush function allowed a user to pass in their
own (optional) oneshot::Sender<()> to get notified once the flush is
completed, but that's making things unnecessary complicated.

By simply having the flush() function await the flush, we make its
interface more intuitive, and callsites (only inside tvix-tracing itself
so far) simpler.

We can also remove the Option around the oneshot::Sender entirely, as we
now always call it with that.

For some more clarity, we can remove the channel from the struct fields
entirely if otlp support isn't compiled in.

Change-Id: I0870b9e8e88c6be6494a9c201c1c70b87e0f0810
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12801
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: Marijan Petričević <marijan.petricevic94@gmail.com>
Tested-by: BuildkiteCI
2024-11-18 22:10:58 +00:00
sterni
9656686fb3 chore(fun/paroxysm): regenerate Cargo.nix with crate2nix 0.14.1
This should get rid of some deprecation warnings in 🦙.

Change-Id: I8588169553a312a4df01d9bf71de7d673f28c431
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12808
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2024-11-18 14:36:59 +00:00
sterni
5daaaa2f0b chore(3p/sources): bump channels & overlays
* //3p/overlays/tvl: build nixos-option with latest Nix version (2.24)
  as is required now. It would be nice to avoid this somehow to prevent
  NixOS machines in depot having to carry around two versions of Nix.
  Maybe we can at least use a statically linked nixos-option?

* //3p/{gerrit,gerrit_plugins}: update deps hash

* //tvix/eval: adjust our nixVersion “user agent” so that it'll pass the
  new 2.3.17 minimum version nixpkgs prescribes (to check for zstd
  support when substituting from the binary cache).

Change-Id: I4eb715afdc3dbb857340839f08ce86612aa7f117
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12805
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-11-18 14:01:20 +00:00
sterni
a6f777206a chore(sterni/machines/edwin): remove
This machine hasn't existed for a while. Seems like I forgot to remove
the expression after its final month ran out.

Change-Id: I0e4abbd9af75eabfab0db106f851a1e43aa8c90f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12807
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2024-11-18 12:44:59 +00:00
sterni
0d4bcc38d8 fix(sterni/ingeborg/monitoring): declare missing dep on nginx module
Change-Id: I68777a6c57068afaa7adfd842778a6f991b9e86a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12806
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-11-18 12:43:58 +00:00
sterni
27828e8167 feat(sterni/ingeborg/monitoring): expose netdata via nginx
Change-Id: Iea81625180526a36f8646539e8da0ccdaed79d43
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12804
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-11-18 11:21:37 +00:00
sterni
0a6b387738 chore(sterni/code.sterni.lv): deny indexing
All repositories under code.sterni.lv are mirrors, so there's no value
in AI startups endlessly crawling the nixpkgs git history on
code.sterni.lv…

Change-Id: Iaac296315f325ced3cfd0852ae1d8d3f3815ea5b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12803
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-11-18 11:21:37 +00:00
sterni
bbfffa3fdd refactor(sterni/ingeborg/monitoring): simplify mkIrcMessager
I want to add a warpper script to the mdmonitor program anyways, so
there's not really a point in this.

Change-Id: I92166bd44b54507b782a8d19b9676d91d8fa0f99
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12802
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2024-11-18 11:21:37 +00:00
sterni
a2848751bd chore(sterni/ingeborg/minecraft): 1.21.1 -> 1.21.3
Again, 1.21.3 only fixes uninteresting bugs compared to 1.21.2.

Change-Id: I406fe9692f21537480db734cf77eca183b6caaad
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12799
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-11-17 16:09:44 +00:00
sterni
ef7f281f37 chore(sterni/ingeborg/minecraft): 1.20.4 -> 1.21.1
1.21.1 fixes an exploit in 1.21 without any other changes, so we can
safely skip it.

Change-Id: I72503c9f3869d7bafdfc78842b61804627a1d452
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12798
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-11-17 15:57:41 +00:00
Florian Klink
3f1b326b3a feat(users/flokli/kb): enable mouse support
This switches to a ZMK branch with support for mouse movement, and sets
MIRYOKU_KLUDGE_MOUSEKEYSPR so miryoku makes use of the functionality.

Change-Id: I3d4f48f10d50c202f909bec15189106a1bbcc1b3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12796
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-15 15:26:39 +00:00
sterni
ed7aa322c6 feat(sterni/code.sterni.lv): hide emails in cgit
Change-Id: If48823b7992aa61fee9b1a6f458434a596bead90
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12795
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-11-15 14:53:59 +00:00
sterni
2b9a088845 refactor(sterni/code.sterni.lv): downgrade network-online to wants
`requires` is not recommended in this context. I think I tried it out of
desperation trying to combat the issue that these units would be started
before they were able to resolve names in switch-to-configuration.
Unfortunately, network access during switch-to-configuration can't be
detected using network-online.target, it seems.

Change-Id: Ia98a0a3b505ffa56eb37fb58a5375a1215d6cb1b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12794
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-11-15 14:53:59 +00:00
sterni
e6d0e95cc4 fix(sterni/code.sterni.lv): gc after mirroring repositories
Repositories (especially nixpkgs) WILL grow to ridiculous sizes
otherwise, killing cgit performance in the process.

Change-Id: I3bef3e5dc5a61152e89fd53e31f14e78193a4888
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12793
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-11-15 14:53:59 +00:00
sterni
b72262ca3d docs(sterni/machines/ingeborg): add example ssh config for unlock
Mostly it's important (which I did this time at least) to remember that
with how things work at the moment, the initrd sshd is only reachable
via IPv4.

Change-Id: Ie9a87b6a38b2e128a8a2141d2221bbe7cfe24cdb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12792
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2024-11-15 14:53:59 +00:00
sterni
ced47f74b9 chore(sterni/machines/ingeborg): add usbhid kernel module
nixos-generate-config claims I need this, so let's add it…

Change-Id: I3d852ffce5d0e7c65d9a1bbe887d3de15136698a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12791
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2024-11-15 14:53:59 +00:00
sterni
58f795d7c3 fix(ops/modules/irccat): only start after network is online
I've discovered that it is possible for irccat to fail enough times to
run into the restart limit before network is online after booting.

Change-Id: Ia54a46d56bdc765a825fee50e7bdc8206718edc0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12790
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: sterni <sternenseemann@systemli.org>
2024-11-15 14:53:59 +00:00
Vincent Ambo
8ede491f5e chore(3p/sources): bump channels & overlays (2024-11-14)
* update wasm-bindgen in all wasm projects

* //users/wpcarro/website: declare missing dependency on
  string-conversions. Presumably this was propagated
  before from some other dependency which got updated now.

Change-Id: Ib93de576408974441d532196601e6e53d22cdafe
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12770
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
2024-11-15 14:53:59 +00:00
Vincent Ambo
447f0a2e21 chore(web/tvl): restrict owners to myself
Change-Id: I4800c542b2af0bc2a5e389342f3574b4928b1704
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12789
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-11-15 08:21:04 +00:00
Florian Klink
bf74b800ad chore(users/flokli/kb/k6_pro): drop unused
I don't have this keyboard anymore, no need to build the firmware
anymore.

Change-Id: I1ab25dfaa71d03dc7006312ecab86453d6f90333
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12788
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-15 00:00:22 +00:00
Florian Klink
c445970869 feat(users/flokli/kb): add chocofi
`buildSplitKeyboard`, as well as all the patching of `miryoku_zmk` is
independent of the specific keyboard used, so it can be moved one layer
up.

`config-flat` is now provided through a helper function, accepting the
name of the keymap to use when rendering the config.

This all makes the amount of code added for the new keyboard itself
pleasantly small.

Change-Id: I2216aa246502eddaf9bc4f4d126b0639d574ad87
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12787
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-15 00:00:22 +00:00
Vova Kryachko
7a54360a39 chore(web): Add self to tvl graph
Change-Id: Ia57768d30db4a841f74c4305cfbae45c9e26522e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12767
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-14 17:33:18 +00:00
Vincent Ambo
7c25e2fab3 fix(tazjin/emacs): set telega video player command
Change-Id: If5296eb7aa7304801ade7a2c3a1aa6907b051e4f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12768
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-11-14 17:11:59 +00:00
Thomas Koch
81a341f6eb feat(ops/users): add user thk
Change-Id: Ib5e518359e152553d0a9ebf6c674f1acc846800a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12785
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: lukegb <lukegb@tvl.fyi>
2024-11-14 16:58:49 +00:00
Vova Kryachko
ccecede70b feat(nix-daemon): Implement stubs for QueryReferrers, QueryRealizations
These are required to support certain nix's local-overlay store
operations, it's safer to return empty results for these
operations than failing with "operation not implemented" errors.

Change-Id: Ic9b69d75dd52af5a826bfb6a8b283b082a0f6bcf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12766
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-14 13:39:48 +00:00
Vova Kryachko
fa9c067dc9 feat(nix-daemon): Implement more nix daemon operations.
In particular QueryPathFromHashPart, QueryValidPaths, QueryValidDerivers

Change-Id: Ie6ad83cec5ce9580044b85e201e4e23394f87075
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12762
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
Reviewed-by: flokli <flokli@flokli.de>
2024-11-13 21:21:57 +00:00
Vova Kryachko
6aada91062 feat(tvix-store): Improve tvix-store copy.
This change contains 2 improvements to the tvix-store copy command:

1. Allows reading the reference graph from stdin, using `-` argument
2. Supports json representation produced by `nix path-info --json`
   command.

In general it makes is easier and faster to import arbitrary closures
from an existing nix store with e.g the following command:

```
nix path-info ./result --json --closure-size --recursive | \
  jq -s '{closure: add}' | \
  tvix-store copy -
```

Change-Id: Id6eea2993da233ecfbdc186f1a8c37735b686264
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12765
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-12 16:43:21 +00:00
Florian Klink
b1764e1109 refactor(nix-compat/nix_daemon): drop Sync requirement for StorePath
By manually writing out the async function, and moving the owned String
we can avoid for S to be Sync in the NixSerialize for StorePath<S> impl.

Co-Authored-By: edef@edef.eu
Change-Id: I8427b38d2bd61de2818088728cbad79cda69d17d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12764
Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com>
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
2024-11-12 14:05:24 +00:00
Florian Klink
0b8ec03797 docs(tvix): document Store configuration
This describes the current composition system used for BlobService /
DirectoryService / PathInfoService, why it's hidden, how to expose it,
and adds some common examples to explain it.

Change-Id: I2ce7da40992cc988947c3e924499f8157c5e4937
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12749
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
2024-11-12 14:05:16 +00:00
Florian Klink
1428ea4e19 refactor(nix-compat/store_path): use AsRef<str>
Implement PartialEq/Eq ourselves instead of deriving, by proxying to
name.as_ref() (and digest of course).

Also implement Hash on our own, clippy doesn't like this to be derived,
while Eq/PartialEq is not.

Change-Id: Idbe289a23ba3bc8dabf893d4d8752792ae2778c3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12744
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
2024-11-12 11:55:48 +00:00
Florian Klink
1474471327 docs(tvix/eval): update string context document
NixString doesn't contain a `HashSet<BuildReference>` anymore, there's a
more packed internal data structure. We don't need to be overly specific
in the docs, just say we expose an API.

Change-Id: I13380c49293f9a86d1916909fdfeefbe64d9024b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12755
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
2024-11-12 11:55:36 +00:00
Florian Klink
2af30c8c7f refactor(tvix/eval): rm From<(T, Option<Box<NixContext>>)> for NixString
This conversion was a bit too magic, and we can just use
`NixString::new_context_from` without having to worry about the
distinction between an empty context or no context, as
NixString::new_context_from already deals with that internally.

Change-Id: I3e5d57ecfa0f7456aa6c526863e49f2523afaec3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12754
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
2024-11-12 11:16:08 +00:00
Florian Klink
1bc092b063 refactor(tvix/castore/digest): stop using bytes::Bytes internally
Change-Id: I07a13da0ae4aee4298025fca4345d738f40cfe5a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12757
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
2024-11-12 11:09:11 +00:00
Florian Klink
ef3a51b38d docs(tvix): document more components
Change-Id: I0e75445a34d3ee11e535e6948c6d762f4fb15105
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12760
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Domen Kožar <domen@cachix.org>
Reviewed-by: flokli <flokli@flokli.de>
2024-11-12 09:42:50 +00:00
Vova Kryachko
9d114bf040 feat(nix-daemon): Implement QueryPathInfo and IsValidPath.
Change-Id: Ia601e2eae24a2bc13d8851b2e8ed9d6c1808bb35
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12745
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Vladimir Kryachko <v.kryachko@gmail.com>
Tested-by: BuildkiteCI
2024-11-12 03:06:54 +00:00
Vova Kryachko
b564ed9d43 feat(nix-daemon): Implement client handler.
This change includes only the basic nix handshake protocol handling and
sets up a client session. The only supported operation at this point is
SetOptions.

Additional operations will be implemented in subsequent cls.

Change-Id: I3eccd9e0ceb270c3865929543c702f1491768852
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12743
Autosubmit: Vladimir Kryachko <v.kryachko@gmail.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
Reviewed-by: Brian Olsen <me@griff.name>
2024-11-12 02:15:04 +00:00
Florian Klink
72bc4e0270 fix(tvix): use tracing::field::Empty for all indicatif.pb_show
This prevents the field from getting printed to stderr, apparently.

Change-Id: Ia9860e4ff37224003154db88ee5f83103060e626
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12756
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-11-12 00:28:32 +00:00
Florian Klink
0c5ad94914 feat(tvix/nar-bridge): make root_nodes_cache_capacity configurable
Allow this to be overridden via the CLI, also getting rid of the unsafe
because this doesn't need to be const anymore.

Change-Id: I5e51b52e42522a21f59ef69628b464477c0764d1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12753
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-11-12 00:27:31 +00:00
Florian Klink
85de9b8dab feat(tvix/nar-bridge): avoid unnecessary NAR uploads
When uploading a Store Path to a Nix HTTP Binary Cache, Nix first does a
HEAD request for $outhash.narinfo, and if that's not found, for
`{narhash}.nar[.compression_suffix]`.

If the NAR is already present, only the NARInfo is uploaded.

Even though we don't have a service allowing to globally look up from
NARHash to root node, `root_nodes` in `AppState` at least contains
recently uploaded NARHashes.

If we find it in there, we can prevent Nix unnecessarily uploading NARs
if the same contents have already been recently uploaded.
We also promote this key, chances are high Nix will subsequently upload
a NARInfo referring to this NARHash.

Change-Id: I34e3fd9b334b695abe945e64cd291e30f303c2a2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12752
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
2024-11-12 00:26:30 +00:00
Florian Klink
8400e523ce refactor(tvix/castore/blob): use near/far for CombinedBlobService
Align this naming with CachePathInfoService.

Change-Id: Ib9a0d73b8ca57a93e9fc027ae907fc6ed370842a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12751
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
2024-11-11 18:46:33 +00:00
Florian Klink
a218f421b2 refactor(tvix/store): move Cache to cache mod
This being in combinators makes it harder to find.

Change-Id: If7984bdbd43f164c670548639bb4846d859f6695
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12750
Reviewed-by: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
2024-11-11 18:46:33 +00:00
Florian Klink
a9f453f6da docs(tvix/[ca]store): improve docstrings, remove wildcard imports
Extend the docstrings of `add_default_services`, and add one for
`addrs_to_configs` as well as the module-wide one at
`tvix_store::composition`.

Change-Id: Ie9b449988eb210cd65b19b174094bbe0c4af2fd6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12748
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
2024-11-11 18:46:33 +00:00
Florian Klink
e71a857ec8 refactor(tvix/[ca]store): rename store composition feature flags
tvix-castore already supports composition without any additional feature
flags, the only thing that can be explicitly enabled is referring to
other stores via an anonymous url. Rename that feature flag to
"xp-composition-url-refs".

tvix-store effectively only controls the CLI surface, so rename this to
"xp-composition-cli".

The "store" in the feature name was dropped, as it's already apparent
from being in the tvix-[ca]store crate.

Change-Id: I1175dc6280cbba4cbcdfb7fd4b35fce713b45fc4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12747
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
2024-11-11 18:46:33 +00:00
Florian Klink
d505f03e00 refactor(tvix/store/composition): rename 'default' to 'root'
This becomes the root of the composition. `default` implies we can
directly access anything else, which we cannot. `root` makes this more
understandable, and it's all internal only anyways.

Change-Id: I297511bc05a7c32c59510b9d192b40d1bd937b5f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12746
Reviewed-by: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
2024-11-11 18:46:33 +00:00
Vova Kryachko
8df919dcf0 refactor(nix-compat): Move serialization machinery into wire.
This groups most `wire` feature gated logic into a single module.
The nix_daemon module will be gated by a feature that adds
nix-compat-derive as a dependency.

All of this is a way to break the crate2nix dependency cycle between
nix-compat and nix-compat-derive(which depends on nix-compat for its
doctests).

Change-Id: I95938a6f280c11967371ff21f8b5a19e6d3d3805
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12761
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-10 20:54:12 +00:00
Florian Klink
11ee751aff fix(users/flokli/2024-10-25-nixcon-tvix): fix date
Change-Id: Icd81415c208c26ae606673f3476bfdf0525eec89
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12759
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-10 09:45:00 +00:00
Bob van der Linden
cfa4154131 feat(tvix): add instance_name to instrumentation of *Services
Currently it is not possible to distinguish between tracing of the same
*Service type whenever there are multiple of them. Now the instance_name
of ServiceBuilder is passed into the *Service and used in the existing
instrument as the `instance_name` field.

Places that did not already have a instance_name in its context use
`"default"`. In tests I used `"test"`.

Change-Id: Ia20bf2a7bb849a781e370d087ba7ddb3be79f654
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12739
Tested-by: BuildkiteCI
Autosubmit: Bob van der Linden <bobvanderlinden@gmail.com>
Reviewed-by: flokli <flokli@flokli.de>
2024-11-08 20:16:49 +00:00
Vova Kryachko
951d25676b feat(tvix/tracing): Allow configuring additional layers
This will be used by tvix-daemon to write tracing data into the active
client's connection socket.

Change-Id: I8889dd0a638e004ee2c8cb312946b029c9779313
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12734
Tested-by: BuildkiteCI
Autosubmit: Vladimir Kryachko <v.kryachko@gmail.com>
Reviewed-by: flokli <flokli@flokli.de>
2024-11-07 20:34:27 +00:00
Florian Klink
c0c66f8bcc fix(users/flokli/kb/dilemma): fix one more RALT
This makes it quite hard to press Alt+Number otherwise.

Change-Id: Id1cc4fbfa1575cc213014106f734bec035d46f2c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12737
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2024-11-06 16:48:33 +00:00
Brian Olsen
b88579ade4 feat(tvix/nix-compat): Add nix serialization support
This change implements the serialization part that is needed to
implement the nix daemon protocol. Previously was add deserialization
and derivers for that and this then adds the other part of that equation
so that you can write types that can then be read using deserialization.

Change-Id: I2917de634980a93822a4f5a8ad38897b9ce16d89
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12729
Autosubmit: Brian Olsen <me@griff.name>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-04 20:02:54 +00:00
Brian Olsen
6582fa69f1 fix(tvix/nix-compat-derive): Better errors for default
This adds a span to default handling so that any error message
gives a more precise location as a hint for why the error occurred
instead of just pointing to the type.

Change-Id: I7bf6cf38e0284f9726d670ea50a94a6b1edd8a94
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12728
Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: Brian Olsen <me@griff.name>
2024-11-04 15:33:31 +00:00
Bob van der Linden
cae3afc758 feat(tvix/eval): use with_capacity instead of a growing vec
Change-Id: I4d89663eb9ac772ce1008ed5ee218bc7016164e7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12733
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-04 10:39:19 +00:00
Bob van der Linden
9aa479648b refactor(tvix/eval): remove Value::Json and related functionality
Currently Value::Json is used in combination with VMRequest::ToJson to
recursively convert tvix Value to serde_json::Value. This functionality
is used in builtins.toJSON as well as derivation __structuredAttrs.

Both Value::Json and VMRequest::ToJson were removed in this commit.

Related functionality in vm.rs is also removed: vm.rs does not know
about JSON anymore.

Recursively converting to serde_json now happens without going through
the VM.

Thrown errors that are part of the value of toJSON are now directly
propagated as ErrorKind, were-as previously there was a split between
CatchableErrorKind and ErrorKind, where eventually CatchableErrorKind
would be converted to ErrorKind::Catchable.

Change-Id: I066f064926c491e4c087a984f07af43d19124cfe
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12732
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-04 10:39:19 +00:00
Bob van der Linden
b6e524c726 test(tvix/eval): test throw in __toString with toJSON
Change-Id: Ia4a9a04c7e157b6add94dc8901ffab35486fe344
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12731
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-04 10:39:19 +00:00
Bob van der Linden
f90f14042a test(tvix/glue): check context of __toString after toJSON
Change-Id: I65e3a8e8284ffb4986970ea67ed8d6b216e1eb66
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12730
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-04 10:39:19 +00:00
Brian Olsen
37a7bfa163 chore(tvix/nix-compat-derive): Remove references to nixrs
Some references to nixrs had sneaked in while writing the original
CL so this just removes those.

Change-Id: I635adbd2de46c7c1f31e1d449396253a78e1b762
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12727
Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com>
Autosubmit: Brian Olsen <me@griff.name>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-04 00:10:31 +00:00
Brian Olsen
685f25ebff fix(tvix/build): Fix tests and clippy warnings on MacOS
When running tests for buildservice on MacOS it would fail
because of the oci test. I also got some clippy warnings on
MacOS because of disabled code.

Change-Id: I235739fa4270a4ef46e54d3e2b8cbb55eb20bdda
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12726
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Brian Olsen <me@griff.name>
Tested-by: BuildkiteCI
2024-11-03 23:43:23 +00:00
Brian Olsen
6f914bc0fa fix(tvix/nix-compat-derive-tests) More enum tests
Before this commit only deriving of tuple enums where tested.
This adds a few tests to cover the other types of enums.

Change-Id: I62f311e4db98cab84bd4ac164d50051e9aab0d4d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12725
Autosubmit: Brian Olsen <me@griff.name>
Reviewed-by: Vladimir Kryachko <v.kryachko@gmail.com>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-03 23:43:23 +00:00
Brian Olsen
28dbf5f0eb chore(tvix/docs): Small changes to Nix Daemon protocol description
I found some more operations that are obsolete and a few missing
fields. I also did some small changes to make handshake description
more consistent.

Change-Id: I9f853a37e9d50621491f31ea71879d6a600046e2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12724
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-03 20:49:19 +00:00
Florian Klink
f02bc522b6 docs(tvix/TODO): add Value::Json TODO
Change-Id: Id47c1e3f98cb0bf53006b002417b69cfa49b7410
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12721
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-11-02 20:15:20 +00:00
Bob van der Linden
37835634e8 feat(tvix/glue): use InvalidHash for builtins.path
Previously such errors showed up as:

error[E006]: expected value of type 'sha256', but found a 'not a sha256'

Now they show up as:

error[E041]: Invalid hash: invalid encoded digest length '31' for algo
sha256

This is consistent with the errors of `builtins.fetchurl`.

Change-Id: Id11b26fc7951778640cc4e41b3bf23203eaf07df
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12719
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-02 19:51:53 +00:00
Bob van der Linden
05cb6e9e35 feat(tvix/eval): introduce ErrorKind::InvalidHash
The nixhash errors were wrapped in a generic TvixError. Now it has its
own TvixError with unique error code. The nixhash error is passed along
as a string.

The errors looked like:

error[E997]: invalid encoded digest length '51' for algo sha256

Now they look like:

error[E041]: Invalid hash: invalid encoded digest length '51' for algo
sha256

Change-Id: I5c420815538ba4c6567c95f5d44d60c4d48f43fd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12718
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-11-02 19:51:36 +00:00
Vova Kryachko
aecf0641a4 fix(tvix/nix_compat): Fix nix-daemon handshake
Existing handshake behavior assumed that the server version is always
at least as new as the client. Meaning that the client's version was
always picked the handshake details as well as for further communication

This change removes that assumption and correctly uses
min(server_version, client_version).

Change-Id: Ia5dad4613dd5f69a0aeb6c9d86982f1f36fe1a4c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12722
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-02 18:08:21 +00:00
Vova Kryachko
4ec9a4b7df fix(tvix/tracing): Enable tracing in tvix-build.
Change-Id: Ica9734d7774da4d5e2a5cacab6b9feb27becc3e2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12720
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-11-01 15:30:58 +00:00
Vova Kryachko
9e294db820 feat(tvix/nix-daemon): Initial skeleton for nix-daemon
The goal is to create a drop-in replacement nix-daemon that nix-cpp can
use as a `daemon` store.

Change-Id: Ie092047dcc6a24a3b8d8d1b808f3e6fd2c493bf2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12711
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-30 15:00:32 +00:00
Florian Klink
eb2ca5f079 refactor(tvix/tracing): drop log_level method
There's no more consumers left.

Change-Id: I0585abbdbe0ffcf35cd20ac58077ade67cbf5c75
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12715
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2024-10-30 12:56:02 +00:00
Florian Klink
38f27c4502 refactor(tvix/build): drop log level cli arg
This does the same as cl/12585 did for tvix-cli.

Change-Id: Ia2d693f5ad10feb81777c951bcd4489a3a83ad7c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12716
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-30 12:56:02 +00:00
Florian Klink
6c13491fe0 refactor(tvix/store): drop log level cli arg
This does the same as cl/12585 did for tvix-cli.

Change-Id: I35215947f3616acd65654c2bbdb19d0c360b568b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12714
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2024-10-30 12:31:55 +00:00
sterni
7133e1a4b1 chore(tvix/shell): add cargo-flamegraph
Change-Id: I991337d6db2442b1239ca048b25f28985cfdaa05
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12706
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: sterni <sternenseemann@systemli.org>
2024-10-28 12:45:22 +00:00
Vincent Ambo
37f080d649 chore(3p/overlays): pin niri to latest master
This version has my trackball fixes, and interactive move, both of which are not
in a stable release yet.

Change-Id: Id7356e328772c972db7fb496ac80c318e8c5b330
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12707
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-10-28 08:33:44 +00:00
Vincent Ambo
9882f0d55c feat(tazjin/nixos): enable automatic-gc on all physical machines
Change-Id: I115c29da5d7038a5e6e917928a16a2b8c6eb084e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12692
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-10-27 21:00:49 +00:00
Vincent Ambo
f5c9556129 chore(3p/sources): bump channels & overlays (2024-10-27)
Change-Id: Ida2775fbfb246698dd9ca01740fc28f5785f61c1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12689
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-10-27 21:00:49 +00:00
Vincent Ambo
3c5feb7ebc fix(ops/whitby): fix keycloak header configuration
The copy&paste from the documentation didn't work ...

Change-Id: Ic894356354d6ac2b66562da5aa89590cd94ae347
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12705
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-10-27 20:32:11 +00:00
Yureka
8de99e631d fix(tvix/eval): fix unused variable warnings being inverted
Thanks to lexi for finding this

Change-Id: Ic248af55426630b5e07183e4eac1596d52954478
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12696
Tested-by: BuildkiteCI
Autosubmit: yuka <yuka@yuka.dev>
Reviewed-by: tazjin <tazjin@tvl.su>
2024-10-27 15:20:28 +00:00
Florian Klink
e9d1e7d7fa fix(tvix/build): fix build on MacOS
oci_spec::runtime::Posix* stuff is feature-flagged out on MacOS.

While it might be desirable to emit Linux OCI runtime specs from MacOS to
schedule there, and it being feature-flagged to Linux might be a bug in the
upstream crate, we only have an implementation invoking runc, which certainly
don't work.

Feature-flag this out to make tvix-build and tvix-cli to build on MacOS. This
can be revisited once we actually start thinking about builders on MacOS.

Change-Id: I82002f6d55eddd9c305f1b3a3f3f2b252f617ed0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12694
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-27 14:29:08 +00:00
Florian Klink
e79815dda9 fix(tvix/castore/fs): fix build for MacOS
fuse_backend_rs::api::filesystem::Layer is not exposed for non-Linux, and
feature-flagged on virtiofs, so only implement the trait for these cases.

Change-Id: Id8455dc5be502f8375836ba04288d50c59d69d89
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12693
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-27 14:29:08 +00:00
Florian Klink
057e4e3a99 fix(tvix/shell): fix shell on MacOS
runc is not available on MacOS, we only want to include it in the shell if on
Linux.

Point TVIX_BUILD_SANDBOX_SHELL to /bin/sh if not on Linux.
While we cannot use the OCI/runc executor on MacOS, other implementations might
make use of this env var, so it's good to keep setting it.

Also update the other occurence of it, in tvix/utils.nix.

Change-Id: If7b47e1bb7c41bbde84c93016713754a252c4355
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12691
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-10-27 14:29:08 +00:00
Florian Klink
4c90f723d8 feat(users/flokli/kb/corneish_zen): init
This builds the keyboard firmware using zmk-nix.

The miryoku_zmk config is pulled in from manna-harbour/miryoku_zmk, but
slightly patched to add support for RALT and quick-tap.

Change-Id: I91efbbd789526cce7f086f367c7bccb7857b06e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12695
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: flokli <flokli@flokli.de>
2024-10-27 13:32:08 +00:00
Vincent Ambo
0183c36843 fix(tazjin/emacs): fix completion related problems
A while ago I decided to experiment with corfu and orderless instead of
company/prescient. This was prompted by issues which I had in EXWM, where some
sort of UI race with company elements could lock up a whole frame.

Now that I'm not on EXWM anymore this doesn't really matter, so I can bring back
company and set up prescient again correctly, fixing a whole bunch of issues
along the way:

* Completion issues where not all matching candidates where shown based on
  cursor position (I honestly have no idea what caused this and what was going
  on there, never figured it out, but enabling prescient properly fixes it).

* Code completion works again. Corfu, as I understand it, is technically
  better/cleaner/whatever than company - but it doesn't work anywhere,
  especially not in telega.el where I need completion more than anywhere else.

With this commit my Emacs behaves a lot better again.

Change-Id: I8f082de8211dd3be3bb7a0663d43d414cc320e49
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12690
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
2024-10-27 13:01:21 +00:00
Florian Klink
3695f57d84 feat(tvix/tracing): filter indicatif.pb_show fields in all cases
Change-Id: I688cec79cefeae340872945c35743fae892cd053
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12688
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: yuka <yuka@yuka.dev>
Reviewed-by: flokli <flokli@flokli.de>
2024-10-27 12:28:03 +00:00
Florian Klink
7dd895c258 docs(tvix/TODO): add OCI preflight checks
Change-Id: I0865487f84556932149d95902d7399b5f7037314
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12687
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: yuka <yuka@yuka.dev>
2024-10-27 12:26:01 +00:00
Florian Klink
30617d5b24 docs(tvix/build): we use stricter castore types
Change-Id: Ie96b4f85d46984cac2ecc50ff9b70fa0b26ae80d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12686
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
2024-10-27 12:26:01 +00:00
Vincent Ambo
022cc42395 chore(3p/sources): bump channels & overlays (2024-10-23)
* ops/modules: remove deprecated headscale DNS setting
* users/aspen: use stable julia again (upstream ticket is resolved, and 16 has
  been removed because it's long deprecated)
* users/wpcarro: utillinux -> util-linux
* 3p/overlays: temporarily restore utillinux until upstream breakage is fixed
* users/tazjin: noto-cjk -> noto-cjk-sans
* tvix: regenerate Go protobufs

Change-Id: I9dbec812306cd4e66030d14bbea3805e8224e0d5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12679
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-10-27 00:17:15 +00:00
Florian Klink
0bc686448c feat(users/flokli/slides/2023-asg): add pdf
Change-Id: I85b1f2a9bb99df01546f3d0d3f60d9953f1d8d61
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12684
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-26 10:13:46 +00:00
Florian Klink
f3f20c2080 fix(users/flokli/slides/2023-nixcon): fix pdf gen
reveal-md didn't exit with a nonzero exit code and just didn't contain
the PDF. Fix this.

Change-Id: Ie4bc7cbf4b9117b0a672a3294e9e64fb13459247
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12683
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-26 10:13:46 +00:00
Florian Klink
5faa3f9c65 fix(users/flokli/nixon-2024): fix pdf gen
Change-Id: I02c101fc16e4ce57d53cd423f7aa0b6a98f856df
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12685
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: flokli <flokli@flokli.de>
2024-10-26 10:13:46 +00:00
Florian Klink
85132ec606 feat(users/flokli/nixon-2024): init
Change-Id: I547a5504f6782169dd7280c0b5c21cbe66068a2e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12682
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: flokli <flokli@flokli.de>
2024-10-26 08:44:26 +00:00
Marijan Petričević
2225b52cb5 refactor(tvix/build): use stricter BuildRequest type
Change-Id: Ifadd190e10ec22570ab3ccb4df54f64ae5ef0a44
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12674
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-24 18:09:09 +00:00
Florian Klink
1248fc0a9a chore(tvix/cli): drop direct nix-compat dependency
This is only using nix-compat through tvix-glue.

Change-Id: Ib6391987954a28cc05a2c27c1c21585185d82d1a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12681
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-10-23 13:29:01 +00:00
Florian Klink
9466c82025 chore(tvix/cli): drop direct castore dependency
This is only using tvix-castore through tvix-store.

Change-Id: I342ee1e18f8c3946b712cfb446520b732091d58f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12680
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-23 13:29:00 +00:00
Vincent Ambo
ea0f2d1130 chore(3p/sources): bump channels & overlays (2024-10-12)
* amend keycloak configuration as per upgrade guide for their latest, most
  innovative breaking changes.

  https://www.keycloak.org/docs/latest/upgrading/index.html#deprecated-proxy-option
* users/aspen: remove deprecated noXlibs option. This option has no alternative.

Change-Id: I49f45e38cda6b01ddf6f014b7b1c43972b76629f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12601
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: tazjin <tazjin@tvl.su>
2024-10-23 09:39:11 +00:00
Vincent Ambo
c9610a1b91 fix(tazjin/dotfiles): make trackball left-handed
... because it's on the left side!

Change-Id: I1d67d797bd6137705e69b96349faa32a9c3e94ff
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12678
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-10-22 12:01:11 +00:00
Florian Klink
1f75fee0dd fix(tvix/glue): don't use builtins.currentSystem in test
This test will otherwise obviously fail on aarch64-linux, or anything
not x86_64-linux, as it'll produce a different Derivation.

Change-Id: Iedddcb6aeff05e49fc2e6da27f08111cdc9affec
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12677
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
2024-10-21 12:59:58 +00:00
edef
84a82f6f41 feat(users/edef/weave): use tracing_indicatif for progress
Progress bars :3

Change-Id: I770d0f8381521b6efc8b38c0db4d59c771887fee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12673
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-20 21:22:23 +00:00
Marijan Petričević
b3f0e25fbc feat(ops/users): add marijan to users
Change-Id: I2d2277915d3e679c9388ea9bc0328b4040b22bf6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12671
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-19 18:55:41 +00:00
Florian Klink
a26fb05add feat(users/edef): add .gitignore file
Change-Id: Ia91100f342be2b5ad6ab83bbb3844f2526ea3036
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12672
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
2024-10-19 18:49:21 +00:00
edef
201d8f0cf2 feat(users/edef/weave): use FxHashSet and dedupe early
Deduping early saves a fair bit of memory, but the extra hashing is
costly.

We switch to FxHash, since we don't need a DoS-proof hash, but we do
need it to be *fast*.

Change-Id: Ic6b7010874c417862baa9b882593208c8dd1d5e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12648
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-19 17:01:38 +00:00
edef
06d2536eec feat(users/edef/weave): ingest roots in Parquet format
Parsing of store-paths.xz is now handled by //users/edef/fetchroots.

Change-Id: I78be5aada0c0a321ed79d80c9b615e5f997ac3e0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12670
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-19 17:01:38 +00:00
edef
313899c291 refactor(users/edef/weave/swizzle): use polars streaming
This vastly reduces the memory requirements, so we can run in ~40G RAM.

Change-Id: I4952a780df294bd852a8b4682ba2fd59b9bae675
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12667
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-19 17:01:38 +00:00
edef
bdc2891053 refactor(users/edef/weave): simplify OwningRef handling
We switch to working with the underlying Arc<Bytes<u8>> type, since
Buffer<u8> is already essentially an OwningRef-esque subslice.

Because we're now working with an exposed Arc directly, we don't need
to have our own `unsafe impl StableAddress` any more.

Change-Id: I9ce2edc6899177145e15b72aa5380f708a62173c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12668
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-19 13:49:02 +00:00
edef
549c51f200 refactor(users/edef/weave): use swap rather than CAS
We only care about ordering on the same variable, and we rely on the
release barrier provided by rayon's thread joining.

The comparison failing is always an error path, and we're indifferent
about which thread it fails on.

Change-Id: I592a7eaae5b6935cf424c6576a49786f39909fb6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12666
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-19 13:49:02 +00:00
edef
25671c284f refactor(users/edef/weave): simplify DoubleEndedIterator bound
Thanks, Clippy!

Change-Id: I116b478124b72e070e94150ee850532752f64d60
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12669
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-19 13:49:02 +00:00
Florian Klink
5d235ff283 fix(ops/pipelines): limit depot-nix-eval to concurrency of 3
It seems we need more memory these days, and llama frequently ran OOM.

Decrease the number of concurrent evaluations.

Change-Id: I2648ebdedf09b80c9a231c4614004f953a646bc0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12662
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
2024-10-19 10:51:31 +00:00
Florian Klink
0592614842 fix(tvix/glue/tvix_store_io): err from store_path_to_node with trace lvl
When evaluating nixpkgs from the <nixpkgs> channel, store_path_to_node
returns an error, falling back to regular filesystem access.

This currently produces a warning in the CLI, which is misleading, so
degrade to trace level.

Change-Id: I4cb2297cc85a2c0e904a37343748f9051aa6d5c7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12665
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-10-19 10:13:15 +00:00
Florian Klink
849966d614 refactor(tvix/store/pathinfo/signing_wrapper): remove clone
Construct the owned signature in a separate scope, so all borrows to the
original PathInfo are already dropped again, and we can modify the
PathInfo without having to clone it.

Change-Id: I03e7390540c2cfe7a2c61850bdbe8a33d213a5d9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12663
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-10-19 09:41:58 +00:00
Florian Klink
d52d889f2b refactor(tvix): make indicatif.pb_show=1 more explicit
This pushes generating spans with pb_show up to the caller.
They usually have more context on how to present things, if at all.

Change-Id: Icfcaa64a8a57dce50c0261f2d06e7c051e3946c2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12657
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-10-19 09:37:23 +00:00
Florian Klink
3fda90602d refactor(tvix/castore): add try_into_anonymous_node, rename to try_*
We have two places where we parse protos and want their names to be
empty:

 - Receiving a root node in a nar-bridge NAR request
 - Processing the CalculateNAR gRPC call

We don't have any place where we want to keep a name as bytes::Bytes
around, yet we used the `into_name_bytes_and_node` method.

It was also a bit wrongly named - it wasn't very clear the name was
not validated, and that the function may fail.

This moves the "splitting off the name as bytes::Bytes" part into a
private helper, only leaving the `try_into_name_and_node` and
`try_into_anonymous_node` methods around.

Change-Id: I2c7fd9871d49ec67450d7efa6a30d96197fb319c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12664
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Marijan Petričević <marijan.petricevic94@gmail.com>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-10-19 09:35:53 +00:00
Florian Klink
9c22345019 refactor(tvix/[ca]store): use auto_impl
This implements BS, DS, PS for Box'ed or Arc'ed variants of it with less
code, and less potential to accidentially forget to proxy default trait
methods for blanked impls, as fixed in cl/12658.

Change-Id: If2cdbb563a73792038ebe7bff45d6f880214855b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12661
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
2024-10-18 21:45:55 +00:00
Florian Klink
47efebfc6f docs(tvix/TODO): add instance_name idea for stores
Change-Id: If14f81ca7180109195f35352b0f43b8d997176cd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12660
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
2024-10-18 21:45:55 +00:00
Florian Klink
bd6894d265 fix(tvix/store/pathinfo): use gRPC NarCalculationService
If the PathInfoService is using gRPC, expose it via the
nar_calculation_service() method in the PathInfoService.

Also pass nar_calculation_service through in tha blanket impl.

This now causes a `tvix-store import` using the default config to not
fall back to `SimpleRenderer`, which will calculate the NAR hash and
size by downloading the uploaded blobs (and blobs it didn't need to
upload) locally, making such imports faster.

Change-Id: If2c3fe6584e9093cba322d2360f355a3923904ae
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12658
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
2024-10-18 21:45:55 +00:00
Florian Klink
98df0e4e34 fix(tvix/store/grpc_wrapper): don't validate node name
Clients can (and do) send an empty name in here, and we discard it
anyways.

Change-Id: Iec135d9cba48cc066464e5639319c845079787e9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12659
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2024-10-18 19:51:39 +00:00
Marijan Petričević
cada007937 refactor(tvix/build): remove proto::BuildRequest::validate
Change-Id: I96fa98946bf6aff5eedcb220e2b6b3d90c204eec
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12633
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-18 15:45:18 +00:00
Marijan Petričević
a247b25097 refactor(tvix/build): add stricter BuildRequest type
Change-Id: I2950c76bbc2227952e583426bfb3ed34e8da6d2d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12625
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-18 15:45:18 +00:00
Florian Klink
1c1eb68678 chore(users/edef/crunch-v2): bump crate dependencies
Fixes rustls 0.20.9: RUSTSEC-2024-0336 (CVE-2024-32650,
GHSA-6g7w-8wpp-frhj)

Change-Id: I1be307876465f47c28af05c4b515bf6a7b6713ef
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12654
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
2024-10-17 22:55:15 +00:00
edef
dfff592784 fix(users/edef/weave): use safer_owning_ref
owning_ref has serious unsoundness.

Change-Id: Ie760697cd6399e6bc75f1ad17c9bb74adc077a35
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12656
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
Autosubmit: edef <edef@edef.eu>
Reviewed-by: flokli <flokli@flokli.de>
2024-10-17 22:47:41 +00:00
Florian Klink
211cf7ba7c chore(users/edef/turbofetch): bump crate dependencies
Fixes rustls 0.20.9: RUSTSEC-2024-0336 (CVE-2024-32650,
GHSA-6g7w-8wpp-frhj)

Change-Id: Id38f867a85320e3a3ca870dbf224c4fd4c5abacb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12655
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
2024-10-17 22:41:07 +00:00
Florian Klink
4ebb8f42ed docs(tvix/TODO): extend NAR rendering prefetching idea
With the seekable NAR renderer, figuring out the next few blobs to
render became possible.

Change-Id: I1214302f88e6f9aba74227f84df0f964d587baf2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12652
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
2024-10-17 22:32:32 +00:00
Florian Klink
1c80bc4b5b refactor(tvix/store): remove use of lazy_static
This is now supported in the standard library via std::sync::LazyLock,
but requires some manual shuffling around of code.

Change-Id: Ifca792f4d2dbc36b703de4a4dfa406015ab86da7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12614
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
2024-10-17 22:15:48 +00:00
Florian Klink
f0d594789e refactor(tvix/castore): remove remaining lazy_static usage
Change-Id: I86480cf625a457c4aa8153262f829d34c230b084
Co-authored-by: edef <edef@edef.eu>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12613
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
2024-10-17 21:57:13 +00:00
Florian Klink
cdbdd2d04e refactor(tvix/castore): remove use of lazy_static
This is now supported in the standard library via std::sync::LazyLock,
but requires some manual shuffling around of code.

Change-Id: Ia0370ca46cb1c6122a452b1d117160536b632c7e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12612
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-10-17 21:17:25 +00:00
Florian Klink
a94414e7ff refactor(nix-compat/store_path): drop build_nar_based_store_path
This is the only (remaining) occurence of it, and not really
more code than just calling store_path::build_ca_path with
`CAHash::Nar(NixHash::Sha256(…))`, especially considering we need the
CAHash in the PathInfo struct later anyways - so let's remove this
function.

Change-Id: Ia82212086062c366e0280ca0823d9e68a3f91d3a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12632
Reviewed-by: edef <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-17 18:16:30 +00:00
Florian Klink
1277b0c088 chore(tvix/castore): remove commented-out test fixture
This became obsolete, since the introduction of a stricter `Directory`
struct invalid names cannot be represented anymore.

Change-Id: I9e4b1b6cca01831d0a9735f58d8a1f59ac18676b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12615
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-17 17:37:27 +00:00
Florian Klink
42377ba235 docs(tvix/TODO): drop PathInfo including references by content idea
This is not gonna work out as-is, as we still key PathInfos by
their store path digest, and how to handle thing if we encounter a
Frankenbuild.

For now, let's keep the PathInfoService data as it is, we can record
this information (and more) in the builder structures.

Change-Id: Ic38fc3ecd8096a5fe002e681bdc812a9dbeaa7d2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12607
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
2024-10-17 17:23:29 +00:00
sterni
6501ee194b fix(minecraft-fabric): avoid unset CREDENTIALS_DIRECTORY in ExecStop
For mystifying reasons, Type=simple and CREDENTIALS_DIRECTORY in
ExecStop have stopped working (when exactly I don't know, but presumably
256). Apparently, you are supposed to use Type=exec with credentials due
to raciness (I've personally never experienced):
<https://github.com/systemd/systemd/issues/32583>.

Just changing the type did not resolve the issue of
CREDENTIALS_DIRECTORY being unset, though. It appears, though, that the
issue is merely an unset environment variable and not the credentials
being unavailable: We can work around the problem by setting an
appropriate environment variable ourselves.

Change-Id: Ifcdb1f3bce782ea1c568a9bc413f3fb29f0985c5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12649
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2024-10-17 16:55:38 +00:00
zimbatm
0814eda06b docs(users/edef/fetchroots): add a README for other users
Change-Id: Ibce9121fbd209e713ce04271e285f70e2af9867e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12646
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
Reviewed-by: flokli <flokli@flokli.de>
2024-10-17 16:41:03 +00:00
zimbatm
bc13e68160 chore(users/edef/fetchroots): wire up the build
Change-Id: I6830b885394001882b54fddf310bbd38d253679a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12645
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-17 16:41:03 +00:00
edef
7ec712d6fe feat(users/edef/fetchroots): init
Change-Id: I6861661bcd99652a1875ccde421e78e87c45054c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11094
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
2024-10-17 16:40:38 +00:00
Florian Klink
b4b2ae1cc6 refactor(tvix/glue): merge builtins.{filterSource,path} codepaths
This moves the implementation from builtins.path into a helper function,
which we now call from both builtins.

Most of the Value plumbing stays inside this helper.

We also implemented handling of symlinks at the root, which was handled
in builtins.filterSource, but not builtins.path - by peeking at the
FileType using std::fs::metadata, instead of the EvalIO trait.

For now, this is fine, as our filtered_ingest also goes via the
filesystem directly. It ends up with the same semantics as before and in
Nix - symlinks at the root are followed, except if they point to an
invalid target.

In the future, we should revisit this, and then maybe get both stat and
lstat into EvalIO, though we will need to be very careful about the
semantics for following symlink inside store paths.

Change-Id: I6a941c0187db36165c2f7a338015e4e32d41b298
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12629
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-16 19:29:09 +00:00
Ilan Joselevich
7e78ebe796 fix(tvix/glue/builtins/import): Drop useless bstring conversion
In a previous refactoring CL this into_bstring method was accidentally
kept, when we don't need it and can just to_str directly.

Change-Id: Idd531d508b8fd530611b213d0164e7aaf0e87d80
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12631
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-16 13:21:17 +00:00
Florian Klink
da9a6e5b78 feat(tvix/eval/io): impl From<std::fs::FileType> for FileType
Change-Id: If92ddaf3b469c4635c234b193f8d7716e11887f6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12630
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
2024-10-16 00:16:31 +00:00
edef
a833703dab refactor(tvix/eval/builtin-macros): use match block for f.block
These nested ifs are a bit confusing, a match block makes this cleaner.

Change-Id: I256fd0bc921fbf2e60ad0f6e1ea51c2e0fb00317
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12628
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-16 00:16:27 +00:00
Florian Klink
ca1e628c85 refactor(tvix/glue/builtins/import): refactor
This removes all the intermediate helper functions and reorganizes the
import code to only do the calculations where/when needed, and hopefully
makes things easier to understand as well.

Change-Id: I7e4c89c742bf8569b45e303523f7f801da7127ea
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12627
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Jörg Thalheim <joerg@thalheim.io>
Reviewed-by: edef <edef@edef.eu>
2024-10-15 23:26:26 +00:00
Florian Klink
baebe29bab test(tvix/glue): improve comments and test cases a bit
This makes it easier to understand what the specific test is testing.

Change-Id: I34b2798841c6b9367849668451af2165dc78f997
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12626
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Reviewed-by: Jörg Thalheim <joerg@thalheim.io>
2024-10-15 18:16:40 +00:00
Florian Klink
457decb790 test(tvix/glue): add builtins.storeDir regression test
Change-Id: Ib87f41b3e0d634dd76e648acfe1b3026211f947a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12619
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Jörg Thalheim <joerg@thalheim.io>
Tested-by: BuildkiteCI
2024-10-15 18:16:12 +00:00
Florian Klink
e6b39135bc fix(tvix/glue/import): builtins.storeDir fixes
This didn't support store paths with a subpath joined to them, while
Nix does.

Use state.path_exists, which does. This also means we can drop the
`store_path_exists` helper, which was only used here.

Change-Id: I918ccb270f64acbdc41cb4d2a9c3c5871ce15002
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12618
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: Jörg Thalheim <joerg@thalheim.io>
Autosubmit: flokli <flokli@flokli.de>
2024-10-15 17:27:36 +00:00
Florian Klink
330145fa1f refactor(nix-compat/store_path): use Path in from_absolute_path_full
These are not necessarily strings, and making it paths allows us to stop
converting them to lossy strings.

Change-Id: I11366c721dc5da1778aafe89092a1966b5a43178
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12617
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: Jörg Thalheim <joerg@thalheim.io>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-15 17:20:32 +00:00
Florian Klink
da8fccba7a refactor(nix-compat/store_path): add SP for build_nar_based_store_path
Make this generic on the StorePath<SP> that's being used, similar to the
other functions in there.

Change-Id: I453d1fd3749053d4e5aca156abc18da1f95ca264
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12616
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Jörg Thalheim <joerg@thalheim.io>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-15 17:20:01 +00:00
Florian Klink
3c3436d3ad refactor(tvix/tracing): remove use of lazy_static
This is now supported in the standard library via std::sync::LazyLock,
but requires some manual shuffling around of code.

Change-Id: I14bee4068dc73c948321481b5a4e1fc922a89a27
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12611
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
2024-10-13 16:34:41 +00:00
Florian Klink
15b5bf2003 refactor(tvix/build): remove use of lazy_static
This is now supported in the standard library via std::sync::LazyLock,
but requires some manual shuffling around of code.

Change-Id: Ie2af74beda9fcf8aa19fca7d844bcbe732f05bf8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12610
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-10-13 16:23:34 +00:00
Vincent Ambo
4beee4cba7 refactor(tvix/glue): remove use of lazy_static
This is now supported in the standard library via std::sync::LazyLock, but
requires some manual shuffling around of code.

Change-Id: Ibb3be8458b8a8912ea04c9360d64c5cf914254d4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12609
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-13 14:45:17 +00:00
Vincent Ambo
5faf7c9d7b refactor(tvix/nix-compat): remove use of lazy_static
This is now supported in the standard library via std::sync::LazyLock, but
requires some manual shuffling around of code.

I found at least one dead variable along the way, which I deleted.

Change-Id: I8600c87c49078fb5ff72671994c77b919259e67b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12608
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-10-13 14:31:42 +00:00
Vincent Ambo
cb032b250e chore(tvix/tools): move narinfo2parquet to //users/edef
This is not a core Tvix tool, it's a tool that uses a Tvix component.

Change-Id: I81d2b2374da23489df0097dcabb8295c82652fc1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12606
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-10-12 23:17:29 +00:00
Vincent Ambo
bb34210a64 chore(tvix/tools): move weave to //users/edef
This is not a core Tvix tool, it's a tool that uses a Tvix component.

Change-Id: I705f2c4ab87f1512e005007c933e16b84ed4279f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12605
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-10-12 23:11:25 +00:00
Vincent Ambo
bd8d6e824f chore(tvix/tools): move turbofetch to //users/edef
This was introduced in cl/9925 without any commit message, but this is clearly
not relevant to Tvix itself (it even says so in a comment in Cargo.toml).

Change-Id: I84f12d5145c3f53c9df23863f887bad913856c50
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12604
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: edef <edef@edef.eu>
2024-10-12 23:02:50 +00:00
Vincent Ambo
398a9b5317 chore(tvix/tools): move crunch-v2 to //users/edef
This is not a core Tvix tool, it's some sort of one-off analysis thing.

Change-Id: I05fcbed45abad27d6b5cfd49db1727249dad3971
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12603
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
2024-10-12 23:02:50 +00:00
Vincent Ambo
b21cb11b7f refactor(tvix/eval): remove usage of lazy_static
Equivalent logic is now in the standard library, and this dependency is no
longer needed for eval.

Change-Id: Iaa4410d89fdaa5b84cbd9e6bc6ae479c659d92f2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12602
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
2024-10-12 23:02:50 +00:00
Aspen Smith
b7a6fc2812 refactor(tvix/eval): Make strict an EvalMode enum
Refactor the `strict` boolean passed into evaluation at the top-level to
be a (two-variant, so far) EvalMode enum of Lazy and Strict.

This is more explicit than a boolean, and if we ever add more EvalModes
it's a simple extension of the enum.

Change-Id: I3de50e74ec971011664f6cd0999d08b792118410
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12186
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: aspen <root@gws.fyi>
2024-10-12 12:27:37 +00:00
Florian Klink
934e03c0de chore(users/picnoir/tvix-daemon): bump crate dependencies
Change-Id: I437126bba36b61b8f266915e0fe0ecc229a5bc5b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12600
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-12 12:13:55 +00:00
Florian Klink
9c9e774bb1 chore(tvix/tools/crunch-v2): bump crate dependencies
Change-Id: Ib67e0121cebf6b2f049490125c7ded9637955928
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12599
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-12 12:13:55 +00:00
Florian Klink
b8764032fc chore(tvix/tools/weave): bump crate dependencies
Change-Id: I31e5f3d46321265d662d41aa79aa4178e121818f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12598
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-12 12:13:55 +00:00
Florian Klink
f7c866fb14 chore(tvix/tools/turbofetch): bump crate dependencies
Change-Id: I81988571344829708881021527b83e7d99b598c3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12597
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-12 12:13:55 +00:00
Florian Klink
c35cfc1684 chore(tvix): bump crate dependencies
tonic-build deprecated their `compile()` function, it's now called
`compile_protos()`.

Change-Id: I8cacd7f01a251c207401e4e226b0e880744e96e8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12596
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
2024-10-12 12:13:55 +00:00
Florian Klink
8b7b85359b test(tvix/store/signing_wrapper): restructure
Move things around a bit to make it easier to understand what's going on:

 - We first validate our fixture invariants
 - We then insert into the PathInfoService
 - Do all comparisons and checks we can on the returned PathInfo struct
 - Only convert to the NarInfo variant to calculate the fingerprint,
   and don't keep intermediate let bindings for this

Before cl/12588, this was arguably much harder to do that way, as we
relied on some of the conversions done in the to_narinfo() function.

Change-Id: Iaddbf1079f73ce566ef6d56f69a823e080b2e006
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12595
Reviewed-by: Marijan Petričević <marijan.petricevic94@gmail.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: sinavir <tvix@sinavir.fr>
2024-10-11 17:19:12 +00:00
Florian Klink
6a116d5057 refactor(tvix/glue/register_in_path_info_service): return only PathInfo
The store path is already contained in the PathInfo, and the ca bits is
already passed into the function, so known to the caller - there's no
need to duplicate this.

We can also avoid having two separate block_on in our import builtin -
we already know the content hash before constructing, as we pass it in
via ca_hash.

There's still some room to unclutter some more of the code around
importing - we still do NAR calculation twice in some cases, and some of
the code might be share-able from other places producing PathInfo too.
Log a TODO for this cleanup.

Change-Id: I6a5fc427d15bc9293a396310143c7694dd2996c0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12592
Reviewed-by: Marijan Petričević <marijan.petricevic94@gmail.com>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-11 17:19:12 +00:00
Florian Klink
48fa320cf4 refactor(nix-compat/store_path): consistently use SP as type param
We also use S in other places in the same file, but that's for the
string-like references.

SP is now consistently used as the type parameter for StorePath<_> (and
build_output_path) gets support for it).

By being a bit more careful in the order of assignments in nix-compat/
src/derivation, we can nudge the compiler to use the type we want.

Change-Id: Ia7c298e110dff98d3b113d2388674ce9e22b80e8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12590
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: Marijan Petričević <marijan.petricevic94@gmail.com>
Tested-by: BuildkiteCI
2024-10-11 17:19:12 +00:00
Marijan Petričević
e8040ec61f refactor(tvix/store): use strictly typed PathInfo struct
This switches the PathInfoService trait from using the proto-derived
PathInfo struct to a more restrictive struct, and updates all
implementations to use it.

It removes a lot of the previous conversion and checks, as invalid
states became nonrepresentable, and validations are expressed on the
type level.

PathInfoService implementations consuming protobuf need to convert and
do the verification internally, and can only return the strongly typed
variant.

The nix_compat::narinfo::NarInfo conversions for the proto PathInfo
are removed, we only keep a version showing a NarInfo representation for
the strong struct.

Converting back to a PathInfo requires the root node now, but is
otherwise trivial, so left to the users.

Co-Authored-By: Florian Klink <flokli@flokli.de>
Change-Id: I6fdfdb44063efebb44a8f0097b6b81a828717e03
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12588
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-11 17:18:20 +00:00
Ilan Joselevich
b4ccaac7ad chore(tvix/build): Bump oci-spec dependency
Our oci-spec was a bit oudated and there were some renamings in one of
the release, which made building tvix-build fail if it's a dependency.
I encountered this issue while working on tvix-eval-jobs.

Change-Id: I6d982965176b83170a07445e351d3f5e5679ed2e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12586
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-10-11 12:17:15 +00:00
Yureka
52bb3c6d02 feat(tvix/composition): allow urls as anonymous stores
This allows specifying an url in place of a named reference to another
composition entry, if the castore crate has been compiled with the
 xp-store-composition feature.

Example: `--directory-service-addr cache://?near=memory://&far=memory://`

This would be equivalent to the instantiation via toml file:

```toml
[memory1]
type = "memory"

[memory2]
type = "memory"

[default]
type = "cache"
near = "memory1"
far = "memory2"
```

Note that each anonymous url causes a distinct instance to be created.

Change-Id: Iee5a07a94b063b5e767c704d9cad0114fa843164
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12146
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-10 12:53:08 +00:00
Yureka
ba4e02c3ac feat(tvix/dirsvc/Cache): support building from url
Change-Id: I80121319795319bb977427efeca3666c6b87a1b7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12147
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-10 12:53:08 +00:00
Yureka
07bf8a0b6d feat(tvix/pathinfo/nixhttp): use ingest stores from url
This still defaults to the "default" services, but allows users to tell the
nix+http pathinfoservice to ingest the castore nodes into a non-default
blob-/directoryservice when used with the experimental store composition.

Change-Id: I5c0f683ce95d888eadf3f302520a47f42f1a481d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12148
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-10 12:53:08 +00:00
Marijan Petričević
ae9ff35c32 refactor(tvix/cli/args): remove log-level argument
RUST_LOG allows for a more granular tracing configuration

Change-Id: Iea29fc2b154345eb7479dfd8bbea6abfd4716341
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12585
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-09 14:08:36 +00:00
Vincent Ambo
ac4a77d82f feat(tazjin/nixos): persist yggdrasil keys for tverskoy
Change-Id: If2513b009a82a07b90eb06a5dc4db0859aa6c78d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12584
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-10-06 18:17:07 +00:00
Profpatsch
96a78877eb chore(users/Profpatsch/sync-abfall): park
Change-Id: I9284417cb88f0eb2a0525db789069ca6507a500f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12583
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
2b5a10a45c chore(users/Profpatsch/reverse-haskell-deps): park
Change-Id: I3940764f8aba806f97d62b0e1cf8d200aa6346ff
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12582
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-10-05 13:49:38 +00:00
Profpatsch
b0ee9cd694 fix(users/Profpatsch): remove parked projects from CI
Change-Id: Idf10af114c236f33ed40052fa05f85d1683d78b6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12581
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-10-05 13:49:38 +00:00
Profpatsch
fb4b8ab5ec chore(users/Profpatsch): park mailbox-org
I should probably remove the default.nix files in these as well so
they don’t get built on CI.

Change-Id: I09764f2ee198ab4016a1649f1675f7c45d207b09
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12580
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
2d6e98f8a4 chore(users/Profpatsch): remove ini
Change-Id: I289e133ef64766d4b1a199a26d2eea9db52918a0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12579
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
82dc99fee2 chore(users/Profpatsch/.gitignore): ignore all js lockfiles
Change-Id: Ieeb79ce72e72ffe12ee26576f644e64a5cad456e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12578
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
8c7372406e chore(users/Profpatsch/my-prelude): vendor pa-json
Want to be able to make changes with low overhead, and having it in a
separate library is just annoying.

Change-Id: I30b76885d8e0e6ebaefe9506cf36672783ed4988
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12577
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
f4d2d3ccec fix(users/Profpatsch/lyric/ext): print upload message to log
Change-Id: I178077894eb78c9f9cb5da07c1be23b7dba6c7cb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12576
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
05c7230127 fix(users/Profpatsch/lyric/ext): set user agent in all fetches
Change-Id: I8de1ef76c4d5789536e528f49226e58ee90b8749
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12575
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-10-05 13:49:38 +00:00
Profpatsch
c925902015 chore(users/Profpatsch): remove AoC stuff
Change-Id: Ifb134053c0f92dfdb4f2c0a3418c0c6a7a1a8507
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12574
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
9c8087d705 feat(users/Profpatsch): move eslint & prettier to toplevel
the linters & prettier config should apply to my whole subdir.

This is somewhat nasty, you have to `npm` in the toplevel dir before
it starts working, otoh dev tooling is dev time and I’m working on
these alone.

Change-Id: I96721f549b24a40b7ffbb2d310f37a40d2590b2b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12573
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
9c1e3687fe feat(users/Profpatsch/lyric): add tapping & improve silence warning
Add a tapping command that does not quantize the timestamps.

For the silence warning, we make it BPM-dependent (defaulting to
120BPM as everywhere else), meaning for slower songs we give a higher
possible time difference before we display a warning.

Change-Id: Idefc44166639b23c2105a1a810ac22ed84457225
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12563
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-10-05 13:49:38 +00:00
Profpatsch
92ad57febe fix(users/Profpatsch/lyric): create new lyric file if not exists
That was the original intention, but I didn’t understand that lua
would fail with "r+" if the file does not exist (and "w+" truncates
the file, so you have to try "r+" and then fall back to "w+" which
will create the file as well.)

Change-Id: Ib238f0b73ab403ceeaf035d053a14eba718d1b48
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12562
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-10-05 13:49:38 +00:00
Profpatsch
cf68a34b0d feat(users/Profpatsch/lyric/ext): add lrc upload & ms offset
This adds support for uploading the lyrics part of an .lrc file to
lrclib, see https://lrclib.net/docs

I pretty much only used ChatGPT to translate the rust “proof of work”
challenge to nodejs and it worked first try lol.

Before uploading the lyrics, I construct a webview with a preview of
what is going to be uploaded, and then only upload when that is
accepted. Pretty sweet.

Also adds two commands for increasing/decreasing the current timestamp
by 100ms and starting playback from 2 seconds before that, very handy
for fine-tuning lines.

Change-Id: Ia6adfe26d0c21c62554c8f8c55e97e2caec95d1e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12561
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-10-05 13:49:38 +00:00
Profpatsch
ad711b15a0 chore(users/Profpatsch/lyric): add typescript linting rules
Change-Id: I9ab0336450519648f7a8edeec94bd64b78e2f05b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12554
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
102c9b30a7 feat(users/Profpatsch/lyric/ext): add bpm on quantization
If the bpm header already exists, overwrite it with the new value.
Also use an existing header as suggestion.

Change-Id: If6431e8056504db437c31313d885b5ba0d0e55d5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12553
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
c014e39dfd feat(users/Profpatsch/lyric): add .lrc header for new files
Insert the length and stuff into the .lrc file headers.

Change-Id: Id2565c95c516208f1e46b79d5b8da50f3d6bee62
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12552
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
686b141767 feat(users/Profpatsch/lyric/ext): add bpm quantization
It’s a bit crappy and really depends on the input field opening
quickly again (which it often doesn’t really do…), but it was the
easiest way I figured how to do it haha.

Aligning to eigth notes is pretty much the easiest way to sync
everything up after tapping in the timestamps (for most songs).

Change-Id: Ibbb072f62b6ee17d983e81b6c1554bc3516fa636
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12551
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-10-05 13:49:38 +00:00
Profpatsch
48d021de15 feat(users/Profpatsch/lyric/ext): add lyric shifting
Change-Id: I1b52e2a295ae81d5d9bf488b1e584dda4d5aac9b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12550
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-10-05 13:49:38 +00:00
Profpatsch
fa18fea20e refactor(users/Profpatsch/lyric/ext): use document directly
Change-Id: I6869743727d3b16b74c498b4cd60b33c3ed3997d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12549
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
02713e054f refactor(users/Profpatsch/lyric/ext): move command into fn
Change-Id: I2d38455cdf881e03a390d129f9cee3f9eeca485d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12548
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
9bec21ea1c feat(users/Profpatsch/lyric): add vscode extension & helpers
* tap-bpm: simple CLI program that accepts key inputs and averages a
BPM value

* lyric-timing-mpv-script: If you press Ctrl+l, mpv attaches the
  current timestamp to a .lrc file named after the song.
  This is for manually timing missing songs for uploading them to
  https://lrclib.net/

* extension: vscode extension for `.lrc` files, currently with the
  following features:

    1. A “jump to LRC position” command which reads an .lrc timestamp
    from the current line and expects mpv to listen on
    `~/tmp/mpv-socket` (via `--input-ipc-server`), and will seek to
    the exact timestamp (down to the ms) in the currently playing
    song.

    2. Some initial linting warnings

      - A lint that warns if the difference to the next timestamp is
      more than 10s (which usually means there’s an instrumental and
      the previous line is stuck)

      - A lint that checks that timestamps are monotonically
      increasing

Change-Id: I32a4ac0e2c5bbe3d94e45ffcf647f81bc7c08aa0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12537
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-10-05 13:49:38 +00:00
Profpatsch
970dcaa04f fix(users/Profpatsch/lyrics): remove special chars from search
Leaving out any symbol characters improves the search accuracy.

Change-Id: I00c993d4099bb8e9701783b53afc9423f1b2f674
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12480
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-10-05 13:49:38 +00:00
Profpatsch
ffdcb3bb5e feat(users/Profpatsch/lyrics): integrate into an mpv extension
Slop it together! The mpv script is entirely generated by ChatGPT.

Whoooooooooo

Change-Id: Ic284d142c2f1fd6d407af6b3571db0e815604051
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12478
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-10-05 13:49:38 +00:00
Ilan Joselevich
7fedfe1cde feat(tvix/[ca]store): Add logging support to redb
We wanted to enable this earlier but the log level of many of the
messages in redb were too high, they've now been downgraded, so we can
enable logs from redb.

Context on the fix and release:
 - https://github.com/cberner/redb/pull/828
 - https://github.com/cberner/redb/releases/tag/v2.1.2

Change-Id: I8635e8a0bcb01a7d0b580387ac9134ccdd0205f3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12568
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-04 16:31:53 +00:00
Florian Klink
0ef1b9bc6a feat(users/flokli/kb/dilemma): put LALT on right side too
It prevent some shortcuts from being used the "natural way", like
only being able to type Ctrl-Alt-T with the left hand.

Luckily, RALT isn't needed that frequently, so we can expose it right
next to GACS (on the G and M keys).

Change-Id: Iccba3b1f6a5e2b01195f87471fd9972967b4e175
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12572
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-04 15:55:45 +00:00
Florian Klink
0366ba39a2 chore(users/flokli/kb/dilemma): bump qmk
Change-Id: I54fb10f587f5cfadd2b047e7596020094177959d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12571
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-04 15:55:45 +00:00
Vincent Ambo
e988c804fc fix(tazjin/emacs): fix term-switcher hotkey
Change-Id: I052d4328320699c00e0192405b7392aa660d67ec
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12570
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-10-04 07:44:28 +00:00
Ilan Joselevich
ab6e8d28aa chore(tvix/[ca]store): Drop sled support completely in favor of redb
Over the past couple of months we've been using redb instead of sled as
the default filesystem-based database in PS and DS. I am confident that
we can get rid of sled completely now, and just keep redb.

Change-Id: I11fa1e4453e280253855f8eade990b37eb6965ae
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12567
Reviewed-by: yuka <yuka@yuka.dev>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
2024-10-03 18:16:03 +00:00
Vincent Ambo
56b306f884 feat(tazjin/desktop): install kanshi for output management
Change-Id: I64b41d7ee43cfc882cf313f10888fb4447b4bc33
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12566
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-10-03 08:34:46 +00:00
Vincent Ambo
de39bb422e docs(tazjin/niri-reap): add a simple README
Change-Id: I53c760115bda3df2f964ac359f4c9e127c9890ad
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12565
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-10-02 14:37:20 +00:00
Vincent Ambo
cd050400db feat(tazjin/niri-reap): improve reaping of workspaces above
Previously the script ignored workspaces that were further up, but in practice I
don't care about their order, I just want them to be gone.

To keep IDs stable, this implements a fix where the current workspace is first
moved to the first position (invisible), and windows are then reaped afterwards.

I've tried this in various combinations and it seems to work fine.

Change-Id: Ifc3eb272af761670ec83305665ec2103eb4f269e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12564
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
2024-10-02 14:35:48 +00:00
Yureka
3606d7acc3 test(tvix/castore/refscan): add empty pattern regression test
Change-Id: I165261170edaabfc56f6ac0a6baae388332b3f73
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12559
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: yuka <yuka@yuka.dev>
2024-10-01 15:36:43 +00:00
Yureka
ab3555f5a7 fix(tvix/castore/refscan): don't panic on empty patterns
Previously, the overlap calculation would underflow when
the pattern is empty.

Change-Id: I1f6bf49fafc4b8183a3a5e5e491a5a5bfc41ca97
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12558
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: yuka <yuka@yuka.dev>
2024-10-01 15:27:04 +00:00
Florian Klink
f0d5ed7074 docs(tvix/TODO): add PathInfo data types and ca reference items
With https://cl.tvl.fyi/12533 in, we still need to lookup references to
properly populate `BuildRequest`.

It currently fails as the reference to
h9lc1dpi14z7is86ffhl3ld569138595-audit-tmpdir.sh is not propagated.

We should prevent Frankenbuilds from the go, so let's update our
PathInfo type to accomodate for that.

Change-Id: I26f9215312c258bba222efd390bc135f1a3a3d6d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12560
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-01 14:27:54 +00:00
Yureka
284c1eb45a feat(tvix/build/oci): wire up refscanning
Change-Id: I07d016f831dcc596b4627f1d8f33909e632be416
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12533
Autosubmit: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-01 13:41:24 +00:00
Florian Klink
2414c87282 feat(tvix/build), add OciBuildService, the old way
This is just patchset 10 of CL10855, before the color_eyre changes,
rebased to the tvix_castore api.

Change-Id: If4b42412ff8568058908cda971ad7d6f2d9f9b7b

---
This provides a build service invoking runc. It can be used by using the
`oci://$path_to_some_tempdir` builder URL for now.

For now, it can be tested as such:

```
BUILD_SERVICE_ADDR=oci://$PWD/bundles target/debug/tvix
let pkgs = (import <nixpkgs> {}); in builtins.readDir pkgs.perl
```

readDir is to actually trigger IO into the store path (which triggers
the builds).

For now it fails due to missing reference scanning (see followup CLs).

Change-Id: I09b40e410114ce69966a41a0e3c33281b859e443
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12526
Autosubmit: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-01 13:41:24 +00:00
Yureka
cf91917a9d feat(tvix/glue): wire up nix refscanning
After this, attempting to build the nixpkgs still fails in the same way,
because the references are not yet properly used by the code at
`tvix/glue/src/tvix_store_io.rs`.

Change-Id: I8a59ef8ef3c9a6f6aa7b05106dd9eef2e9ac0d0f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12532
Reviewed-by: Brian Olsen <me@griff.name>
Autosubmit: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-01 13:40:52 +00:00
Yureka
07e0cb1b0a feat(tvix/build): add refscanning interface
This provides a generic interface to let the builder search for needles
 in the output, as described in the notes at `docs/src/build/index.md`.

Change-Id: Ic2c5bd563e9aa2e766c157f2b13cdb19aede12f8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12531
Autosubmit: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: Brian Olsen <me@griff.name>
2024-10-01 13:40:51 +00:00
Yureka
b82cacb449 feat(castore/fs): optional refscanner for ingest
Change-Id: Ieca06de4c2e2680d89fe05a380079fafa5454837
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12529
Autosubmit: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-10-01 13:40:51 +00:00
Yureka
d277bd9fbf feat(tvix/castore/refscan): share the scanner between readers
This changes the only actual state the ReferenceScanner has to use atomic bools, so it no longer requires a mutable borrow for .scan(). This allows passing an immutable borrow of a reference scanner to multiple threads which might be ingesting blobs in parallel, and using
them in the ReferenceReader or calling .scan() there.

Change-Id: Id5c30bcebb06bf15eae8c4451d70eb806cab722e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12528
Autosubmit: yuka <yuka@yuka.dev>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-01 13:40:51 +00:00
Vincent Ambo
84f4ea5e7c fix(tazjin/emacs): ensure niri package is loaded
Change-Id: I8e5e30a1da2937555ac63bf024a4e3d6b2e9872a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12555
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-10-01 11:35:14 +00:00
Florian Klink
752f1f82a6 feat(tvix/nar-bridge): treat HEAD requests explicitly
We don't need to access castore for HEAD requests.

Change-Id: I9365d9520d5a9e52ed92897d3c4972ec5b6e11fb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12547
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
2024-09-30 10:05:01 +00:00
Florian Klink
2e4a373a04 feat(tvix/nar-bridge): implement range request for NARs
With an implementation of AsyncRead + AsyncSeek, axum-range can answer
range requests.

We only use it if a range has been requested, as it uses more memory
than the linear variant.

Change-Id: I0072b0a09b328f3e932f14567a2caa3a49abcbf7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12509
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Reviewed-by: yuka <yuka@yuka.dev>
2024-09-30 10:04:29 +00:00
Aspen Smith
16a3b90125 feat(aspen/system): Add desktop entry for emacs on ogopogo
turns out emacs over ssh forwarding works well if you use ssh -Y

Change-Id: I9c1134d880265b765b0dc52d587ee331fda29f7f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12546
Autosubmit: aspen <root@gws.fyi>
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-09-29 18:43:53 +00:00
Aspen Smith
278ffa2b05 feat(aspen/system): Setup a systemd timer to sync the depot public inbox
Change-Id: Iaeae18af25b00b04bd805dabb320c218cb21fd8f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12545
Tested-by: BuildkiteCI
Autosubmit: aspen <root@gws.fyi>
Reviewed-by: aspen <root@gws.fyi>
2024-09-29 18:43:53 +00:00
Vincent Ambo
e9d10753d5 chore(tazjin/dotfiles): check in more local configuration
Instead of installing and configuring fuzzel and wl-clipboard locally, put them
into Nix, too.

Change-Id: I4b909ac1d0577f8bd176bbaae71583c59aaf5362
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12544
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-29 15:14:34 +00:00
Vincent Ambo
70a0fc0297 feat(tazjin/dotfiles): configure wlr/taskbar for waybar
I think that's the last module I was missing for this to be "feature-complete".

I think ideally the things displayed by the taskbar would have the same order as
the current Niri layout, but I can tackle this later. This might require a patch
in Niri.

Change-Id: I67cc2366b6c510830021954372e29ce0be7d8363
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12543
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-29 15:14:34 +00:00
Vincent Ambo
89bd07ee72 fix(emacs-pkgs/niri): handle non-matching selections adequately
If the user puts in a string that doesn't match any of the selectables, do one
of the following:

1. When called inside of Emacs, create a new buffer with that name.
2. When called outside of Emacs, do nothing.

Change-Id: I92ba985b5cd7805d37d5d0e0631b20fdce7ce479
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12542
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-29 01:16:16 +00:00
Vincent Ambo
334f60008b feat(tazjin/emacs): wire up niri integration
Change-Id: Ib0ef3b7cbf4c1dde121e31aa5052145efe350472
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12541
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-29 00:50:49 +00:00
Vincent Ambo
09cd095d23 feat(emacs-pkgs/niri): add command for external switching
Adds a command which can invoke something like fuzzel (or any other dmenu
compatible system) for the buffer switching logic.

This can be invoked as `emacsclient -e (niri-go-anywhere-external)` from any
shell, given that the Emacs server is running in the given Emacs.

Change-Id: Iafa421e5ad0c3c6cbfecbfc0835e6db878e452e0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12540
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-29 00:50:49 +00:00
Vincent Ambo
5e4f1e7a6a feat(emacs-pkgs/niri): add annotations for buffer targets
Adds a completing-read annotation function which can display the "remoteness" of
Emacs buffers, as well as the app ID of Niri windows.

Change-Id: I15550f7403b91aa4be7076290931da74ac539fac
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12536
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-29 00:50:49 +00:00
Vincent Ambo
867b28bda1 feat(emacs-pkgs/niri): functions for seamless niri/emacs switching
Introduces a new buffer switching function which is also capable of switching to
existing Emacs frames that already display the target buffer, or to other
windows displayed in the same Niri session.

Not all behaviour is done yet, and there's an explanatory comment in the package
with more details.

Change-Id: I5a548931a681ba32fdb352ecec66845a75268c19
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12535
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-29 00:50:49 +00:00
Vincent Ambo
c5e1fbb224 fix(tazjin/dotfiles): minor waybar style fixes
Change-Id: Iac1fb9856b3783912e505ca0e5228718f42abd4f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12534
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-29 00:50:49 +00:00
Yureka
1c24d483d5 chore(tvix/castore/fuse): impl Layer for TvixStoreFs
Allows using a TvixStoreFs in overlay filesystems

Change-Id: I10e63c92776b1c783947d92070f360865ef2883c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12539
Autosubmit: yuka <yuka@yuka.dev>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-09-28 13:30:36 +00:00
Yureka
1034cc7774 chore(tvix/castore/fuse): update fuse-backend-rs
This release includes support for overlay filesystems

Change-Id: I946cbf346df045209afaea2d720bb57fc2f2659f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12538
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
2024-09-28 13:24:00 +00:00
Yureka
caf597db81 refactor(tvix): move refscan module to castore
This is required to add the optional refscanner parameter to the
ingest functions.

Change-Id: Ib40a7287cf857eb55e31e0df309a79474fefb518
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12527
Autosubmit: yuka <yuka@yuka.dev>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-09-27 20:39:58 +00:00
Vincent Ambo
ed2bd88850 style(tazjin/dotfiles): more authentic win95 waybar styling
Brings this a LOT closer to the Windows95 style theming that I'm trying to
achieve with the whole thing.

Change-Id: Ifb457a682cb83a78e4a8e2ba2bb4a5b96f3eaf1f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12525
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-26 23:27:46 +00:00
Vincent Ambo
d0344a0e27 chore(3p/sources): bump channels & overlays (2024-09-25)
Change-Id: I605ca6befee5444901e5a396d626e7b5a9b9a4df
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12505
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-09-26 23:27:29 +00:00
Vincent Ambo
143f35e003 feat(whitby): switch from nix-serve to harmonia for the cache
Harmonia is, ostensibly, faster and better and, most importantly, not a giant
pile of wonky Perl.

I've tested locally that Harmonia works with Nix 2.3 (on both ends), so I think
we should be good to go here.

We have a vendored copy of the upstream module for now. We need to fix Nix 2.3
compatibility in upstream for the module, but the service itself works fine.

Change-Id: I3897bb02b83bd466b6fe7077c05728ac49ea4406
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12517
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-09-26 23:27:29 +00:00
Vincent Ambo
2c2a6c9060 feat(tazjin/home): put niri config in place automatically
This is now stable enough that I can put it under home-manager management.

Change-Id: Ifd92ca8951e0adfddf962a4cd845c3e4fe80cc21
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12516
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-26 16:34:50 +00:00
Vincent Ambo
7f9ad826af fix(tazjin/home): fix swayidle launch order
Change-Id: I2744ae2cef7fc59705b910f48e25289fdea4494d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12515
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-26 16:34:50 +00:00
Vincent Ambo
bd5d07c49e style(tazjin/dotfiles): theme dunst to not look like crap
The previous config was copy&pasted from somewhere, this config makes it look
like an actual thing instead. Much nicer!

Change-Id: I8eb68149964376d6dbe4cef53e86030b5357d17d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12514
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-26 16:34:50 +00:00
Florian Klink
2180e6b820 fix(tvix/castore): don't return object_store::has with INFO level
This otherwise spams the logs quite a bit, for example when uploading
to nar-bridge with the new check from cl/12497.

Change-Id: Idc2bcc513caea6fae38ae04489e4e3ee7be64bce
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12510
Reviewed-by: yuka <yuka@yuka.dev>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-09-26 15:03:40 +00:00
sinavir
9f36632509 feat(tvix/store): Add a signing PathInfoService
- Add a new PathInfoService implementation that wraps transparently
around another except that it dynamically signs all the incoming
path-infos with the provided signer.

- Add a ServiceBuilder for this PathInfoService that provides a
SigningPathInfoService with a keyfile signer

Change-Id: I845ddfdf01d14c503c796b2b80c720dab98be091
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12032
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: sinavir <tvix@sinavir.fr>
Tested-by: BuildkiteCI
2024-09-26 12:29:03 +00:00
Yureka
e4378f0143 feat(tvix/store): seekable nar renderer
Co-authored-by: edef <edef@edef.eu>
Change-Id: I233206e8aae35504ca0519ac88178dfc5596bedb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12439
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
2024-09-25 19:23:45 +00:00
Yureka
6deff4d8e9 refactor(tvix/store/tests): combine tests into one parametrized function
Change-Id: I9ff43b29be68b9840c58286da96fa52927691804
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12507
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-09-25 19:07:54 +00:00
Ilan Joselevich
c1e69e260d feat(tvix/eval): Use thiserror for ErrorKind and CatchableErrorKind
thiserror is much more easier to maintain than manually implementing Error and Display.

Change-Id: Ibf13e2d8a96fba69c8acb362b7515274a593dfd6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12452
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-09-25 18:18:37 +00:00
Vincent Ambo
1bdf5c0c11 chore(tazjin/cursed): don't build this in CI
Change-Id: Id98daf11a4325ecc077a7c30518066aecfad8182
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12508
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-25 12:04:45 +00:00
sinavir
0f92400112 fix(tvix/nar-bridge): Remove name check for root node in nar generation
Nar-bridge tried to parse the name of the protobuf node encoded in the
URL into a PathComponent but this name was empty, leading to an error
when the user tried to retrieve the nar file.

This was an oversight from the conversion to stricter types (some of the
CLs in the serious containing cl/12217).

We need a version converting a protobuf without a name to our stricter
types, but an empty PathComponent cannot be constructed.

So we need a into_name_and_node() version that returns the name as
Bytes, not PathComponent.

Change-Id: I2996cdd2e0107133e502748947298f512f1cc521
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12504
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-09-24 09:45:33 +00:00
Yureka
cd0c3a96ab feat(tvix/nix-compat/nar/writer/sync): add file_manual_write
This is useful for building other NAR writers which use custom (async or optimized) I/O to write the blob parts of the NAR.

Change-Id: I447c09914fb0c99044e2fa910d4213660dc51c64
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12437
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-09-23 12:13:00 +00:00
Vincent Ambo
6f028165f2 chore(tazjin/koptevo): allow other device's public keys
Change-Id: I4955c2cde3cb1ec4d7b72eaaf7f6acc80150dd73
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12503
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-09-23 07:20:19 +00:00
Vincent Ambo
07e5d6b138 fix(tazjin/koptevo): bind quassel on IPv6, too
This should make it possible to use Quassel over Yggdrasil.

Change-Id: Iad81af7c85771928fd50860393d58a14d7878a40
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12502
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-23 07:15:16 +00:00
Aspen Smith
a15760671d feat(aspen/system): Move metrics to ogopogo, refresh
Change-Id: I93ddc961b473e15febe22a16879875dbd926236a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12501
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
2024-09-22 20:39:17 +00:00
Aspen Smith
bf4f1a43e5 feat(aspen/system): Reinstate ddclient, migrate to ogopogo
ddclient is back in nixpkgs and nixos[0], so let's just use that, and
remove the backported package from third_party.

[0] 8a8ec36615

Change-Id: Ib14ab68158a6799c78d71e3bea63869ec9fc1a48
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12500
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: aspen <root@gws.fyi>
2024-09-22 20:38:46 +00:00
Vincent Ambo
0320d778d9 chore(ops): remove volgasprint cache machine
Change-Id: I1030393d843f03af3617487fc70829fcca792839
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12499
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
2024-09-21 15:10:03 +00:00
Florian Klink
21e5fc024d fix(tvix/castore/import): check small blobs first
ConcurrentBlobUploader buffers small blobs in memory, and then uploads
them to the BlobService in the background.

In these cases, we know the hash of the whole blob, so we could check if
it exists first before, uploading it.

We were however not, and this caused rate limiting issues in GCS, as it
has an update limit of one write per second on the same key, which we
ran into especially frequently with the empty blob.

This reduces the amount of writes of the same blob considerably.

In the future, we might be able to drop this, as our chunked blob
uploading protocol gets smarter and covers these cases.

Change-Id: Icf482df815812f80a0b65cec0426f8e686308abb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12497
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-09-19 12:51:09 +00:00
Vincent Ambo
1f5a20736a chore(3p/sources): bump channels & overlays (2024-09-17)
* users/aspen: disable readyset overlay

  sysbench + postgresql is broken, which breaks the overlay, but I suspect the
  overlay is no longer needed

Change-Id: I1845370c88f5fab35fd700535e6fb0972a4ca556
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12494
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: aspen <root@gws.fyi>
2024-09-17 21:16:21 +00:00
Vincent Ambo
e2aa81c0b2 chore(tazjin/dotfiles): reduce gaps
Change-Id: Ia73627328c8ebb6e3e4decf9236f4c155f1c4669
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12496
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-17 16:23:50 +00:00
Vincent Ambo
29f160963e chore(tazjin/niri-reap): bump to niri 0.1.9
This is a stable release that has the IPC features this crate depends on.

Change-Id: I4aaba076a53d7a95a00dd2d59a02c69af6c4d63a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12495
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-09-17 16:23:50 +00:00
Vincent Ambo
e04bbe92a0 fix(tazjin/koptevo): fix yggdrasil listening configuration
Change-Id: Ic7b89fc61f7d5b74e420ae633b2ced26c20909c3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12492
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-16 08:20:45 +00:00
Vincent Ambo
684a06ac3c fix(tazjin/dotfiles): ensure EDITOR=emacsclient is set
Change-Id: I5ab162545493367c0e92c7737800c0c5e23f221e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12491
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-15 00:42:12 +00:00
Vincent Ambo
9b6ebb947b fix(3p/radicle-explorer): remove dependency on plausible
This is some sort of calling home analytics thing. Lets not have that.

Change-Id: I59fcf747c8269052dd3d346bb0873adc38834803
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12490
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-15 00:25:02 +00:00
Vincent Ambo
10c2866ccd fix(tazjin/nixos): set rad.tazj.in as preferred seed in explorer
This requires overriding build-time configuration, so I've added a little fixed
point that takes care of that.

Change-Id: Ie990e362c6e00aa6e3be66b04af4b62034b03515
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12489
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
2024-09-15 00:18:28 +00:00
Vincent Ambo
767bc726ef feat(tazjin/nixos): serve radicle explorer UI on koptevo
Change-Id: Ie5075ee8d2663bfffb3f90388a46f9bc19f6e462
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12488
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-14 23:47:29 +00:00
Vincent Ambo
e737488d92 feat(3p/radicle-explorer): package radicle web interface
For some reason this is not included. The build is based on their experimental
Nix code upstream which I copy&pasted and modified a bit.

Change-Id: I523f9e90a3f5feca0deb317eec1d5283e2a3ca98
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12487
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-14 23:47:29 +00:00
Vincent Ambo
af6dc48971 feat(tazjin/nixos): run Radicle seed node & httpd on koptevo
Change-Id: Icd433f433c0abe8f54735ab45a636b4561fe8d3e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12486
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-14 23:47:29 +00:00
Vincent Ambo
0022285600 feat(tazjin/nixos): set up yggdrasil on all physical machines
Change-Id: I1d722c6d2e6192c445e77cb9b186a5320c2a60ec
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12485
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-14 23:47:29 +00:00
Vincent Ambo
c9eeb7da70 feat(tazjin/nixos): serve homepage on yggdrasil
First test of running an Yggdrasil service, lets see how that goes!

Change-Id: Iac10b72f7314a45df13ea539c5c1cef6c994154f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12484
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-14 23:47:29 +00:00
Vincent Ambo
7593592241 chore(users/tazjin): move my homepage module into //users
This was in //ops for legacy reasons, but this is really not necessary.

Change-Id: I758b257838993ef0f7d55809c137118826e2ba85
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12483
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-14 23:47:29 +00:00
Vincent Ambo
7f5956b2be feat(tazjin/koptevo): configure yggdrasil network
I'm looking to replace tailscale with this for some use-cases.

Change-Id: I00f765a403879ef048e635a6fedcfdde3f685159
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12482
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-14 23:47:29 +00:00
Vincent Ambo
adf8a7da87 feat(tazjin/nixos): issue wildcard cert for yggdrasil services
Issue a wildcard certificate using the Yandex Cloud DNS plugin (which is where
DNS for tazj.in is hosted).

Change-Id: I44fa48add660f4f4324ec4b056a81d78c45ff4f4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12481
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-14 23:47:29 +00:00
Profpatsch
e5edb3b192 feat(users/Profpatsch/lyrics): fall back to plain lyrics
if there are not synced lyrics.

Change-Id: I3e8d452fc63847505886ea0bb01d29dd5dcb56d1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12477
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-09-13 13:44:03 +00:00
Profpatsch
e826ffb19c feat(users/Profpatsch): add lyric
Change-Id: I3171d19f1cd550ef22a3a7e851f9d27d3bf34949
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12476
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-09-13 13:44:03 +00:00
Profpatsch
5c57529675 feat(users/Profpatsch): add xdg-cache-home
Change-Id: I0f4efa16426f590cee9332d11c13dd07569b4acb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12475
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-09-13 13:44:03 +00:00
Profpatsch
af5ce5489f chore(users/Profpatsch): remove git-db & rust deps
This never went anywhere.

We had problems with `git2` breaking, so let’s remove everything that
this pulled in.

Change-Id: Ia29d827cd6fc7b97aedca36a37f8418384579c38
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12474
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-09-13 12:06:12 +00:00
Profpatsch
fcd4bfccdf fix(users/Profpatsch/README): typo
Change-Id: I7176289cd7884e795cfe283fc1ec3fcc674acae6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12473
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-09-13 11:13:59 +00:00
Profpatsch
1bddd9a001 fix(users/Profpatsch/.gitignore): add nix results
Change-Id: I44322b61b0653220173c3b5008ffa0ff727cfd35
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12472
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-09-13 11:13:59 +00:00
Profpatsch
9d02fc4ff1 feat(users/Profpatsch/MonadPostgres): add unzipPGArray fns
Change-Id: I47ae3520998c1da7a8ad34231fd5af39240a771d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12471
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-09-13 11:13:59 +00:00
Profpatsch
f49e047588 fix(users/Profpatsch/whatcd-resolver): refresh table on delete
Instead of serving a stale table when a torrent gets deleted, fetch
the whole view again. This is a little wasteful, but torrents
shouldn’t get deleted very often, so it’s fine.

Change-Id: If33d517270421881852158f27dbc3e7d24880d3b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12333
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-09-13 11:13:59 +00:00
Profpatsch
f6dc1f1819 fix(users/Profpatsch/whatcd-resolver): also delete db torrent file
If transmission does not know about a torrent file anymore, we should
not only delete our local transmission torrent hash, but also the
torrent file.

Before, it would always display the old weighted torrent, even after
removing it from transmission. Now, it will automatically clear and
switch to the new top-weighted mp3 version.

Small bug: since we only clean the torrents after already fetching the
table data, we get a stale result right after clean-up. Maybe we
should re-do the fetch instead.

Also logs what gets deleted and only ever deletes if there is
something to delete, leading to more obvious traces.

Change-Id: I0f6c1dc3669d0f549efaba2c46c34b77c1eb7e33
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12332
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-09-13 11:13:59 +00:00
Profpatsch
861b7caa06 feat(users/Profpatsch/whatcd-resolver): add format to table
Change-Id: I6ca18ad9f73a8e75e4bfb77156d19604ab27b284
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12331
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-09-13 11:13:59 +00:00
Profpatsch
95640e7be4 fix(users/Profpatsch/whatcd-resolver): prefer downloaded torrents
I changed the seeding weight, so now it would not show already
downloaded torrents, prompting me to fetch stuff that I already have
in new qualities. Obviously, that’s not the best idea.

Kinda surprised it’s this easy to fix heh.

Change-Id: I6bbf325672a91d794d144c006ccf3d702a581bce
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12330
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-09-13 11:13:59 +00:00
Profpatsch
9e2ecf9101 chore(users/Profpatsch/whatcd-resolver): ignore .ninja
Change-Id: I1b89161c9b4b763abcf74bd19f03275f987924ca
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12329
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-09-13 11:13:59 +00:00
Profpatsch
2edafd0a5a fix(users/Profpatsch/whatcd-resolver): set empty favicon
Change-Id: Id1fbcb39579f2d3c68989e4395cdadaa04790cec
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12328
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-09-13 11:13:59 +00:00
Profpatsch
b800bf2bd4 fix(users/Profpatsch/whatcd-resolver): pretty AppException
AppException would be a console-pretty-printed version for http
errors, which would print all the escape codes in the jaeger traces of
the exception, making it more-or-less unreadable.

So instead, let’s make AppException two cases, an ErrorTree case which
is printed as-is (no color), and a “Pretty” case which is printed
using the pretty module (colors on console, no colors in otel).

Somewhat involved, I guess this is temporary until I figure out what
is really needed.

Change-Id: Iff4a8651c5f5368a5b798541efc19cc7ab9de34b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12232
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-09-13 11:13:59 +00:00
Profpatsch
e9f1bb9917 fix(users/Profpatsch/whatcd-resolver/services): dont unset builders
Change-Id: I3fdf15d7a3a8e04fd73f22ad9c33a2c011609e3e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12231
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-09-13 11:13:59 +00:00
Profpatsch
5e8729188b feat(users/Profpatsch/whatcd-resolver): adjust seeding_weight
* Prefer MP3 versions to save on ratio
* Definitely never download 24bit flacs, they are not worth it at all

One needs to remove the `seeding_weight` column and restart
for it to have any effect (no real migrations yet, but eh)

bump

Change-Id: I30cc3ea05c4352316e3929f93d90fc27ce833682
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12222
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-09-13 11:13:59 +00:00
Vincent Ambo
158ba0d607 feat(tazjin/niri-reap): add a workspace compacting tool
I don't use workspaces and don't have them bound to anything in my Niri
configuration. However, when an external screen is unplugged, its workspace
(and windows) move to one of the remaining outputs.

This adds a tool that makes the windows available again by "reaping" them from
the other workspaces and moving them to the current one.

For starters I'll bind this to a key and see how it works in practice.

Change-Id: I18b2d60e93c8397dd637cdc426b4e46af5725558
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12451
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-13 10:52:38 +00:00
Vincent Ambo
8206f68aea refactor(eaglemode/avif): use build input parameter from buildPlugin
This somewhat condenses the derivation, which is always nice.

Change-Id: I4e2dd81620b54ab000898337007ffcea509a054b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12468
Reviewed-by: emery <emery@dmz.rs>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-13 10:36:15 +00:00
Vincent Ambo
773ddcb209 feat(tazjin/nixos): install radicle-node on all machines
Change-Id: I67ce259d890bd508cd9c9516702d51d5e70f4065
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12470
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-13 09:48:50 +00:00
Vincent Ambo
485fb81edf fix(tazjin/nixos): fix font name collision
Change-Id: I8780f5906855d2ce39ec78530ede84bbcfb5fbf2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12469
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-09-13 09:23:36 +00:00
Vincent Ambo
374cde20f2 chore(3p/sources): bump channels & overlays (2024-09-10)
Includes the following fixes:

* users/wpcarro: disable pulseaudio option (can't have pipewire _and_ PA)
* users/aspen: disable pipewire (there's PA config here, so whatever)
* bump wasm-bindgen in Rust frontend projects
* users/tazjin: disable builds for frog (it's in storage)

Change-Id: Ia508b14b84619d06c1d98f7245e84d66bc791592
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12466
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
2024-09-12 12:42:44 +00:00
Vincent Ambo
7fa52f5933 refactor(tazjin/niri): configure seamless monitor/column movements
Makes it possible to just keep switching focus or moving a column in the
direction of the target screen. This is MUCH easier to think about.

Change-Id: I0488b8d338261b83327dc476e0173b222de9221a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12467
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-11 21:34:35 +00:00
edef
e573f8389c docs(tvix/nix-compat/wire/bytes/reader): None case doesn't exist
We always read the length before returning a BytesReader, so len()
cannot be called before the length is read.

Change-Id: Ifa1cbc2c0923dd24d59e0af5e135ab8ed7314aa9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12453
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-09-08 02:32:57 +00:00
Vincent Ambo
bdf1162d47 fix(tazjin/home): fix cursor sizes on hidpi/non-hidpi machines
Change-Id: If2e2c7ffeadcd920e518c107b30156a62ea7c5c4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12449
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-07 17:18:58 +00:00
Vincent Ambo
7903d26054 refactor(tazjin/dotfiles): move waybar configuration into Nix
Change-Id: Ia031fd755ecf451b0ef1f9e63f3aec8b56fe2d57
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12448
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-07 15:58:40 +00:00
Yureka
863146295b feat(tvix/nix-compat/nar/writer/sync): trait objects -> generics
This will later be used to allow the user to access the original writer.

Change-Id: I1734600c5d580d18b16727f892cd2f6335cc9459
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12442
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-09-07 12:23:06 +00:00
Yureka
cec28377d8 feat(tvix/castore): expose ValidatedDirectoryGraph type
Change-Id: Id994258e74f75df8790159ed3180ce360874d0de
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12438
Reviewed-by: benjaminedwardwebb <benjaminedwardwebb@gmail.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-09-07 12:22:58 +00:00
Vincent Ambo
0a38618675 feat(tazjin/eaglemode): install new eaglemode plugins
Change-Id: Ic5044ada0a3e07f3982cabb8e16c5dd9b2a38472
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12447
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
2024-09-07 12:17:48 +00:00
Vincent Ambo
c352306491 feat(tazjin/home): configure chicago95 theme in home-manager
Finally no more setting this up manually!

Change-Id: I75d7a53623cc05a0a88f70e20e881a944b6ed818
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12446
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-07 11:40:09 +00:00
Vincent Ambo
732b46c6fa feat(3p/chicago95): package chicago95 theme for GTK/Qt/etc.
Change-Id: Ib72ac7e4490b793940f25b0e6b8fac8c62686092
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12445
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-07 11:40:09 +00:00
sterni
f51d27acb2 refactor(sterni/backup-minecraft-fabric): use systemd-creds
The bundled tool is sort of convenient, I first tried it when debugging
an issue (that doesn't affect this module) and it seems a bit nicer.

Change-Id: Ief948f8e46e51f05b04fe7628ab9298284f780e9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12444
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
2024-09-06 21:43:55 +00:00
Vincent Ambo
31f55d7ce7 fix(tazjin/khamovnik): clean /tmp on boot
Change-Id: I5d71319be952f6524d5804d50e3178858371b4cf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12443
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-06 16:25:09 +00:00
Vincent Ambo
72bdb15958 feat(tazjin/dotfiles): add waybar configuration
This configuration is not automatically placed anywhere yet, because I'm also
still actively iterating on it.

Change-Id: I0a13fcbc2b9a5587480f6a69a73ab99b36d209e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12435
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
2024-09-05 22:11:42 +00:00
Vincent Ambo
730d1cc77b feat(tazjin/dotfiles): check in Niri configuration
Adds the current (fairly simple) Niri configuration, which is annealed from
a few days of being poked constantly.

This isn't yet deployed through home-manager or anything as I'm still doing
stuff with it manually.

Change-Id: I3dfcafb55d98d9655585d3128e1088fc13e60cc7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12434
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-09-05 22:10:40 +00:00
Vincent Ambo
317962fbed fix(tazjin/nixos): add fonts for waybar configuration
These don't actually really work the way I want, but I have no idea how font
configuration works.

Change-Id: I228ab234f37d8ae0847cbdc6a3431fc29a2585e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12433
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
2024-09-05 22:10:09 +00:00
Vincent Ambo
609b68031b chore(3p/sources): bump channels & overlays (2024-09-01)
Included changes:

* users/aspen: explicitly use open-source nvidia driver

  This now has to be specified explicitly, otherwise evaluation fails with an
  error.
* users/aspen: nixfmt -> nixfmt-classic
* users/aspen: fixes for renamed packages & options
* users/tazjin: fixes for renamed packages & options
* 3p/overlays: remove cbtemulator patch (merged upstream)
* tvix/shell: remove unnecessary patches (merged upstream)
* 3p/rust-crates: mark libgit2_sys as broken
* users/Profpatsch: mark git-db as broken
* 3p/overlays: pick `mypaint` from stable channel
* tvix: fix comments that clippy doesn't like anymore
* tvix/glue: disable a misfiring clippy lint (applying its suggestion breaks
  code below)

Change-Id: I6d3fc027694bbe7425a2d25dc53d65467a44f3b0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12403
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: tazjin <tazjin@tvl.su>
2024-09-05 20:56:31 +00:00
Vincent Ambo
200d49a0e1 feat(tazjin/home): configure screen locking with swayidle
Change-Id: I73e42071710f481c0f1acf965e18446c18e7c94b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12430
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-05 11:58:30 +00:00
Vincent Ambo
32cc8016df feat(depot-deps): add git-review CLI
This is a CLI for uploading changes to Gerrit.

Change-Id: I45fe592934174ab86af267c54b1f6a190617be62
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12392
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: Yury Shvedov <yury.shvedov@kaspersky.com>
Tested-by: BuildkiteCI
2024-09-05 11:47:54 +00:00
Vincent Ambo
33f30573f9 fix(tazjin/nixos): fix wayland screen sharing
Apparently something called a "desktop portal" needs to provide a magic
"service" and blabla; the TL;DR is that adding all this Gnome stuff makes screen
sharing work.

Tested using the Mozilla WebRTC test page:
https://mozilla.github.io/webrtc-landing/gum_test.html

Seems like our Chromium/Firefox are new enough not to require magic settings for
Wayland.

Change-Id: I250d857a0e941ef63fffca17a9c9feed14ec1bd9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12432
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-03 22:34:13 +00:00
Vincent Ambo
a9403664e1 fix(tazjin/nixos): always start pipewire before niri
According to discussions in the Niri issue tracker, pipewire must be started
before niri in order for screen sharing to work. Why? No idea.

Change-Id: Id4ff890dd2536b3cc98b14992cd799d257eec9be
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12431
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-03 22:34:13 +00:00
Vincent Ambo
632e74e435 fix(tazjin/khamovnik): try to force suspend on all lid close events
logind doesn't like reliably suspending, and apparently it has a bunch of bugs
around dock detection (I don't even use docks), but maybe this helps

Change-Id: Ia822799cde838d8d41a67f9d39d59d1fa0306116
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12429
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-03 22:26:31 +00:00
Emery Hemingway
1c898f7ddc feat(tools/eaglemode/plugins/avif): AVIF image plugin
Animation not implemented.
https: //en.wikipedia.org/wiki/AVIF

Change-Id: I80f8c4132c4335b2e60ce7b70eb424457e50c73f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12428
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-03 19:44:05 +00:00
Emery Hemingway
e4714db2d5 feat(tools/eaglemode/plugins): QOI image plugin
https://qoiformat.org/

Change-Id: I0c11095c1ac0e65075d032f7c29649cbba9f213f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12427
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-03 19:44:05 +00:00
Florian Klink
c60f4ccfda docs(tvix/contributing): remove reference to b/201
This should be fixed with the switch to a "GitHub App" for
authentication.

Change-Id: I0bd8b4b9c9f53a754a12ce07f193d19f61f56014
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12414
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2024-09-03 15:17:30 +00:00
Vincent Ambo
7f1ecff989 refactor(tazjin/emacs): change key bindings for telega/term-switcher
Change-Id: Ia083a337f69aa258b9d4487affc594f5c4f1096d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12426
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-03 13:45:24 +00:00
Vincent Ambo
69dcd8e92c feat(tazjin/nixos): install waybar on desktop machines
Change-Id: I3b60b12175168e67df55d4eff28d2cac4f30aff1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12425
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-03 13:45:24 +00:00
Vincent Ambo
9ea1862750 fix(tazjin/nixos): replace wezterm with alacritty again
wezterm has very strange rendering bugs which I have no interest in debugging

Change-Id: I59a068df9b4474830ba4706bf8e626b45cd015f0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12424
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-03 13:45:24 +00:00
Vincent Ambo
6cfae6c423 feat(tazjin/nixos): enable Qt theming with qt5ct
Change-Id: I1ce0ab9085951d48021f2034a32bcf91c0a675df
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12423
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-03 13:45:24 +00:00
Emery Hemingway
0f519a6f13 feat(tools/eaglemode/commands): add Sam/Acme plumb command
Change-Id: I80443e88180e87c7f7b7c8ae322c5076d1ce0a02
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12422
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-03 12:51:48 +00:00
Vincent Ambo
a115238f1b feat(tazjin/eaglemode): add example plugin to config
Change-Id: I5993c429dfa066295823d5666763ca0120cc209c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12391
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: emery <emery@dmz.rs>
Tested-by: BuildkiteCI
2024-09-02 21:26:16 +00:00
Vincent Ambo
84bdc582ea feat(eaglemode/plugins): bootstrap Yandex Tracker plugin
Bootstraps a plugin (that doesn't do anything yet) for accessing Yandex Tracker
through Eagle Mode.

This commit only initialises the plugin files, it doesn't actually do anything
other than print the word "Loaded".

API docs for future development: https://yandex.cloud/ru/docs/tracker/about-api

The next steps will be to figure out the emModel classes and the threading model
for fetching the remote data.

Change-Id: Ifce8bc2a61c4fd0c4a591013acbf428a9f5803f8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12398
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-02 21:26:16 +00:00
Vincent Ambo
18578c3458 feat(tools/eaglemode): add plugin builder for eagle mode
Adds a buildPlugin function which can build Eagle Mode plugins that can
ultimately be linked into Eagle Mode using the existing etcDir function.

Change-Id: I338171779d3547faecbfb708fbaa78cd1cfd59ac
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12387
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: emery <emery@dmz.rs>
Reviewed-by: azahi <azat@bahawi.net>
2024-09-02 12:58:12 +00:00
Vincent Ambo
3abc104584 chore(corp/rih): bump Rust dependencies
Required to bump past the broken time crate.

Change-Id: I10c979f2b3abc10ad66ac438834f4caceb661279
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12408
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-09-01 15:47:29 +00:00
Vincent Ambo
8efd6b3cd2 chore(ops/journaldriver): bump Rust dependencies
Required to bump past the broken time crate.

Change-Id: Ied9e3367f5fc69db0671732a75f2e410f4f234f6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12407
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-09-01 14:09:05 +00:00
Florian Klink
7eb6900129 fix(ops/keycloak): update client ID and client secret
This points to a "GitHub App" now
("https://github.com/organizations/tvlfyi/settings/apps"), rather than an
"OAuth App"
("https://github.com/organizations/tvlfyi/settings/applications").

Apparently this makes a big difference, and we should be using a "GitHub
App", not an "OAuth App".

The defails on why are in
https://github.com/keycloak/keycloak/issues/9429#issuecomment-1578953468

The App can be configured at
https://github.com/organizations/tvlfyi/settings/apps/tvl-keycloak .

With this, we should get rid of spurious Exceptions with some GitHub
users trying to log in, hopefully fixing https://b.tvl.fyi/issues/201.

Change-Id: I25d0d6cd1b05ad54ed3d760d3a48ce1f430c0e7d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12413
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-01 13:19:19 +00:00
Florian Klink
ebf4647976 fix(ops/keycloak): ignore delete_default_mappers field
Without this, terraform wants to recreate the resource, just because we
do /not/ want to delete the default mappers:

```
  # keycloak_ldap_user_federation.tvl_ldap must be replaced
-/+ resource "keycloak_ldap_user_federation" "tvl_ldap" {
      + delete_default_mappers          = false # forces replacement
      ~ id                              = "4e68e9f0-7aba-4465-8357-f2af6a55fd0e" -> (known after apply)
        name                            = "tvl-ldap"
      ~ use_truststore_spi              = "ALWAYS" -> "ONLY_FOR_LDAPS"
        # (27 unchanged attributes hidden)
    }
```

Keycloak lists the a few mappers. which are likely the default ones,
but in any case, we don't want to recreate this resource.

Change-Id: I170a91a44b2efa426fae268cf7fc97a7f28a5760
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12412
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2024-09-01 13:18:47 +00:00
Florian Klink
e74378a324 fix(ops/keycloak): set base_path
The docs mention this applies to "users of the legacy distribution of keycloak".
However, we get a "failed to perform initial login to Keycloak: error
sending POST request to https://auth.tvl.fyi/realms/master/protocol/openid-connect/token: 404 Not Found"
if we don't set this.

With this, the provider is able to talk to the API, as long as the
secrets are sourced.

Change-Id: I0b9cdd45b1628aa0870a1673491c12c07bf7f8d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12411
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
2024-09-01 13:18:47 +00:00
Florian Klink
5119cae360 fix(ops/buildkite): fix terraform state config
The same fix from cl/11021 also needs to be applied to other states.

Change-Id: I205b03aab49130639c79702f4bf16f0bf28d89ab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12410
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
2024-09-01 13:18:14 +00:00
Florian Klink
23f97d0df0 fix(ops/keycloak): fix terraform state config
The same fix from cl/11021 also needs to be applied to other states.

Change-Id: I0df3ee2e8970e0d08a119ecc6347f24aef0448c2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12409
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-09-01 13:18:14 +00:00
Vincent Ambo
53908b1b96 chore(tools/cheddar): bump rust dependencies
This is required because of the `time` breakage due to a bugfix in rustc.

Change-Id: I232dabec8bf5498a9e868e811f5822ba39b44d97
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12406
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-09-01 10:22:16 +00:00
Vincent Ambo
1c73c1c703 style(tazjin/wallpapers): add some new Stålenhag content
Change-Id: I693378ae6904f2658b4cf3477aff37d54b3c41f3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12405
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-31 23:55:03 +00:00
Vincent Ambo
a2eb46e3d8 feat(tazjin/home): configure wpaperd
Change-Id: Ic4eecdff48f947a44d2a06039573274a9edb35c8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12404
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-31 23:47:57 +00:00
Vincent Ambo
11aacd7857 feat(tazjin/nixos): setup niri (scrolling window manager)
This commit is experimental for now.

The backstory is this: There are use-cases where tiling windows (as in EXWM,
which I normally use) annoy me. There are also use-cases where stacking
windows (as in e.g. XFCE, which I tried for a bit) are annoying.

Scrolling WMs are a new thing which is sort of similar to tiling, but as it adds
more screen real estate doesn't require shuffling around or resizing of existing
windows basically ever.

I'm going to trial this (assuming I can get everything that's relevant for me
set up) and see how it goes.

Change-Id: I603c87b8ebd7fbde763d9d4708e098e9079889c5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12402
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
2024-08-31 23:47:57 +00:00
Vincent Ambo
b3c790a81e fix(tazjin/khamovnik): ensure networkmanager is always enabled
Got into weird states more than once while the private configuration wasn't
available ...

Change-Id: I75b1a242d9cf10f5e4ac27ad7fce3e40a79898cc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12401
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-31 23:46:55 +00:00
Vincent Ambo
a28c495c38 feat(tazjin/nixos): ensure eaglemode is always installed
Change-Id: I6084e041b760d90929f7e9b3d6f7cd6ca12370ba
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12400
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-31 23:46:55 +00:00
Vincent Ambo
a60998c234 chore(tazjin/emacs): use emacs-pgtk
I'm doing a wayland experiment, this is necessary for now. This disables some
parts of the configuration which are not going to work with wayland.

Change-Id: I61d0042fd52f2c7cade2794c0d5b5849ecaf5229
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12399
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-31 23:45:23 +00:00
Yury Shvedov
6f4d3fec5c chore: Introduce .gitreview file
Useful for [`git review`](https://docs.opendev.org/opendev/git-review/latest/)
ui.

Change-Id: I4a64b87df1539301570ad02da4262e44ade72755
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12380
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-31 13:05:23 +00:00
Vincent Ambo
06f03b4518 feat(eaglemode/emacsclient): use actual Emacs icon for command
Adds a new function that converts anything to a TGA image (imagemagick really is
magic), with which arbitrary icons can be converted.

This is demoed with the emacsclient command, which just takes the icon out of
the Emacs package tree.

Change-Id: I771bafed7b07a37c847bd07db986228b9fda60a0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12374
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: azahi <azat@bahawi.net>
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-30 18:05:59 +00:00
Vincent Ambo
91e76a90a0 refactor(tools/eaglemode): overridable mkCommand
People might especially want to change the default configuration.

Change-Id: If046e036a6d1a702abb8dcd1c08dac4730a01b98
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12371
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: azahi <azat@bahawi.net>
Tested-by: BuildkiteCI
2024-08-30 18:05:59 +00:00
Ilan Joselevich
9803712ab8 fix(tvix): Follow-up fixing no-default-features and comments
In https://cl.tvl.fyi/c/depot/+/12389 I accidentally deleted some
comments. Also fixed some useless no-default-features with futures crate, making it match the previous feature combination.

Change-Id: I72bb2cfb88719ff2f8812d90193de2bd49149cce
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12395
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-30 13:55:11 +00:00
Vincent Ambo
55b0726571 feat(tazjin/eaglemode): add my eaglemode config
Very barebones for now.

Change-Id: I05b89f5f392eda221d0a61999d47d83f9bf3354a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12370
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-30 13:30:07 +00:00
Vincent Ambo
c4654fe373 feat(tools/eaglemode): add configuration wrapper script
Adds a new eaglemode.withConfig function that creates a specially wrapped Eagle
Mode, in which a configuration script joins the user's configuration with the
config passed in.

This produces a fully working and configured Eagle Mode with custom stuff out of
the box.

Change-Id: I6282cafd0b1ac6e77bede90cc91d4ede19ee1d2f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12369
Reviewed-by: azahi <azat@bahawi.net>
Tested-by: BuildkiteCI
Reviewed-by: emery <emery@dmz.rs>
2024-08-30 13:30:07 +00:00
Vincent Ambo
8c8861cb3c feat(tools/eaglemode): add function for creating etc dir
Adds an eaglemode.etcDir function which creates a directory structure suitable
for use with EM_USER_CONFIG_DIR.

The catch is that Eagle Mode requires this to be always writable, so it isn't
possible to just point the environment variable at the Nix store and launch it
from there.

The idea of this function is to make it possible to reuse it in a wrapper
script, a home manager module, a NixOS module or whatever that would make it
possible to provide the result to Eagle Mode in a mutable location.

Change-Id: I95c8b16c6c6fe8510ce9759c9d9b9e36e836e290
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12368
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: azahi <azat@bahawi.net>
2024-08-30 13:30:07 +00:00
Vincent Ambo
4a4c21482b feat(tools/eaglemode): add command for opening Emacsclient
Adds a command that opens the current target in the file browser in Emacsclient.

Change-Id: Idbbec3905eb7763ce5bdc2931415db74bc5a5c31
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12367
Tested-by: BuildkiteCI
Reviewed-by: emery <emery@dmz.rs>
Reviewed-by: azahi <azat@bahawi.net>
2024-08-30 13:30:07 +00:00
Vincent Ambo
d235fd99c2 feat(tools/eaglemode): add helper function for Eagle Mode commands
This generates the correct `.pl` files for adding Eagle Mode commands. This
commit does not yet contain the wiring for adding these into Eagle Mode
directly, which is a bit involved.

Change-Id: I7d88128ba3ddaebfbb618db45e8fa843a3f17dea
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12366
Tested-by: BuildkiteCI
Reviewed-by: emery <emery@dmz.rs>
2024-08-30 13:30:07 +00:00
Ilan Joselevich
0979379980 fix(tvix/utils): Add missing src filtering for nix-compat-derive[-tests]
Change-Id: I2beed2cdcb5423d3594562e0011b1cb889add07f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12390
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-30 12:09:41 +00:00
Florian Klink
f2d9255a98 feat(ops/users): add domenkozar
Change-Id: I4d10a17b43918857188c2b1f1babb8890346d9c0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12397
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-30 11:03:07 +00:00
Florian Klink
348998e1fa docs(tvix): update account creation instructions
This is tvix/docs, so asking to be a member of #tvl here is confusing.
Being a member of #tvix-dev is sufficient, we can still mention #tvl
though.

Change-Id: If9fbf7d098c0a8d77a45a95e321fc0a553f4c63b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12396
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
2024-08-30 10:36:23 +00:00
Ilan Joselevich
5a97888d8b chore(tvix): Migrate members to inherit deps from workspace
From now on we will add the dependencies and their version in the root
Cargo.toml and in order to enable the dependency for a workspace member
we set `workspace = true` in the member's Cargo.toml.

Change-Id: I9738c1cf99810b7ace87ca712c3ea965ba846e25
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12389
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-29 14:37:22 +00:00
Ilan Joselevich
2945a359b4 chore(tvix): Bump versions of all compatible deps via cargo upgrade
This updates all the dependencies and their "minimum" versions in
Cargo.{lock,toml} to the latest compatible version using `cargo-edit`'s
`cargo upgrade` command that will eventually be merged into `cargo
update`.

Change-Id: Iccb2aa4a1c84a0465222244a0bd0cafe2a82e781
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12388
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-29 11:26:15 +00:00
Florian Klink
02ee441626 chore(tvix/[ca]store): bump bigtable_rs
This bumps bigtable_rs to
https://github.com/liufuyang/bigtable_rs/pull/86, allowing us to drop
our second set of prost/tonic/http/axum crates.

Change-Id: I70f9150289c3e8611ebe8a7d99490e3dfd085a6e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12384
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
2024-08-28 20:15:55 +00:00
Florian Klink
b6dd9d2d5b chore(tvix/[ca]store): bump hyper-util to 0.1.7
Change-Id: Ia5eaf7f4614701ad4dd06114476a73e1a041d830
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12383
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
2024-08-28 20:15:55 +00:00
Florian Klink
b2b38f23d0 chore(tvix): bump tonic[-build] from 0.12.1 to 0.12.2
Change-Id: If7d1ae4491d3c70f323cf872d1a70afe6238f78a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12382
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-28 19:01:04 +00:00
Vincent Ambo
c622af481e feat(tvix/eval): allow external users to construct native thunks
This interface is the only way to construct lazy builtins outside of eval, which
is actually a useful feature to have.

Change-Id: I386323af20aa3134bb4f669fa66fbb21e9b05fd4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12386
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: Yury Shvedov <yury.shvedov@kaspersky.com>
2024-08-28 18:05:30 +00:00
Vincent Ambo
82429f0661 refactor(tvix/eval): remove useless impl block
There's no need to duplicate this.

Change-Id: If3d930211a1d625d6c7ef129b05034e7a915da83
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12385
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: Yury Shvedov <yury.shvedov@kaspersky.com>
2024-08-28 18:04:58 +00:00
Florian Klink
fef2fdcf8e feat(users/flokli/nixos): add awscli to shell
Change-Id: I665ba215de12fad58b91604700c09a87444ac3ac
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12381
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: flokli <flokli@flokli.de>
2024-08-28 16:02:41 +00:00
Brian Olsen
a5fcfd80a1 fix(tvix/nix-compat-derive): Get rid of external feature flag
The external feature flag was there because I couldn't find a way to
refer to crate and nix-compat with the same name so that the generated
code could be the same.

In essence `use nix_compat::nix_daemon:🇩🇪:NixDeserialize` is an error
when used inside nix_compat crate.

So my best fix was the external feature flag until I found the solution
used here which also removes the flag completely.

Change-Id: Ia3e89c6c350c3fb22ca87f974a39c21542aae152
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12376
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Brian Olsen <me@griff.name>
2024-08-28 14:43:00 +00:00
Brian Olsen
743407e7ab fix(tvix/nix-compat-derive): Fix doctest for Rust older than 1.80
Exclusive range patterns were stabilized in Rust version 1.80 but Tvix
still uses Rust 1.79 and so would fail this one test when you ran
doctests from `mg shell //tvix:shell`.

It was not caught by CI because that does not currently run doctests.

The fix is just to use an inclusive pattern instead.

Fixes: b/417
Change-Id: Ifea7a3b84bb8f6f8c76e277979833713bdf51f46
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12375
Autosubmit: Brian Olsen <me@griff.name>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-28 14:08:39 +00:00
Alexander Kiselyov
7bf6563da1 fix(ops/users): fix email address for yl3dy
Change-Id: Id943cbb486073173a8391074c326749bffb990f7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12361
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: yl3dy <aleksandr.kiselyov@gmail•com>
Tested-by: BuildkiteCI
2024-08-28 01:26:05 +00:00
Yury Shvedov
5ef54a5583 feat(ops/users): add ein-shved
Change-Id: Idf8083d7f48fb1eca40596003fad1552b87bcef4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12364
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-27 13:54:54 +00:00
Alexander Kiselyov
2bca043c33 feat(users/yl3dy): test gpg-signed commit
Change-Id: I71f34d7ef9c9db106bf6994ee8fdb3047769817a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12363
Reviewed-by: yl3dy <aleksandr.kiselyov@gmail•com>
Tested-by: BuildkiteCI
2024-08-27 13:28:33 +00:00
Alexander Kiselyov
ca695a6f7c chore(users/yl3dy): add OWNERS file
Change-Id: I6618fb8de137c5887d3bd9e1cb0507cc818cb525
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12360
Reviewed-by: yl3dy <aleksandr.kiselyov@gmail•com>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-27 13:00:52 +00:00
azahi
c3645b590e feat(users/azahi/pkgs): add bruh
Just testing out depot workflow by adding random stuff.

Change-Id: I8acafe73b86d1936b64f8a4dd084c21c04e305bf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12358
Tested-by: BuildkiteCI
Autosubmit: azahi <azat@bahawi.net>
Reviewed-by: azahi <azat@bahawi.net>
2024-08-27 12:58:56 +00:00
Vincent Ambo
8edfb085f5 docs: add notes about importing existing projects into depot
Change-Id: Idc8572ae68eb9513c6c63642737ce8fd004ee67e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12325
Reviewed-by: azahi <azat@bahawi.net>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: benjaminedwardwebb <benjaminedwardwebb@gmail.com>
2024-08-27 12:24:38 +00:00
azahi
3e4b9e56a5 chore(users/azahi): add OWNERS file
Change-Id: Ic192e12b8858cc321a91c9ff545bdaaee75503c5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12354
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-27 10:58:48 +00:00
Florian Klink
2fa5e71d5e fix(tvix/store): restore v1alpha reflection endpoint
tonic-reflection 0.12.x moved from the v1alpha to v1 of the reflection
protocol.

However, most clients, like Postman, Kreya and evans don't support that
one yet.

Bump tonic-reflection to 0.12.2, which re-introduces v1alpha support
alongside the v1 version of it, registering both services.

This fixes the example documented in tvix/store/README.md, it was
previously failing as evans couldn't find the v1alpha reflection
service.

See https://github.com/hyperium/tonic/pull/1888 for details.

Change-Id: I55438877317f82dc39face13afeb9594cda07a4e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12353
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-27 10:34:43 +00:00
Vincent Ambo
d292203235 feat(tazjin/cursed): add bubblegum demo from VolgaSprint talk
Change-Id: I4d9bd21e3dd6dbc24d46907e6270d49b97f50b99
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12352
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-27 10:02:59 +00:00
Vincent Ambo
b9a614a90f fix(web/bubblegum): third_party/sources is required in bubblegum
Change-Id: Ifb63ab95a0a11f07e8ad2346aff5893fe7c268cd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12351
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-08-27 10:02:44 +00:00
Vincent Ambo
ae8758c966 feat(ops/users): add yl3dy
Change-Id: I05a11bb1f3496680c22b31a4450e4675d028c59d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12350
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-08-26 10:07:44 +00:00
Florian Klink
248f46e7fc chore(users/aspen): use cargo-* packages from nixpkgs
These started throwing eval warnings due to usage of cargoSha256, and
are both available in nixpkgs.

Change-Id: Ice636bebc0a839410125bc19b2252158add2b96e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12337
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: flokli <flokli@flokli.de>
2024-08-25 21:44:41 +00:00
Florian Klink
7a85fb4c64 chore(users/aspen): hardware.opengl -> hardware.graphics
Change-Id: I388a26221b805bc2aa7563d464888cc8b9ea9c92
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12336
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: flokli <flokli@flokli.de>
2024-08-25 21:44:40 +00:00
Brian Olsen
228bf55646 fix(tvix/nix-compat): Feature flag code only used in async
When only the wire feature was enabled two methods were unused and so
would faild `cargo check --no-default-features --features wire`.

This feature flags those two methods on async feature since that is the
only place they are used.

Change-Id: I6ec18a670e3c6e3ecee8d1417c99f1a5084e0ae7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12346
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Brian Olsen <me@griff.name>
Tested-by: BuildkiteCI
2024-08-25 15:05:53 +00:00
Brian Olsen
ced05a2bb6 feat(tvix/nix-compat-derive): Add deriver for NixDeserialize
This adds a nix-compat-derive derive crate that implements a deriver
for NixDeserialize implementations. This is to reduce the amount of
code needed to implement deserialization for all the types used by
the Nix daemon protocol.

Change-Id: I484724b550e8a1d5e9adad9555d9dc1374ae95c2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12022
Autosubmit: Brian Olsen <me@griff.name>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-25 15:05:50 +00:00
Brian Olsen
9af6920478 feat(nix-compat): Add NixDeserialize and NixRead traits
Add a trait for deserializing a type from a daemon worker connection.
This adds the NixDeserialize trait which is kind of like the serde
Deserialize trait in that individual types are meant to implement it
and it can potentially be derived in the future.

The NixDeserialize trait takes something that implements NixRead as
input so that you can among other things mock the reader.

Change-Id: Ibb59e3562dfc822652f7d18039f00a1c0d422997
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11990
Autosubmit: Brian Olsen <me@griff.name>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-25 15:05:50 +00:00
Azat Bahawi
a774cb8c10 feat(ops/users): Add azahi to users
Change-Id: I4df81b7f08e173d3c887bc89f869889a7901dbf0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12347
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-25 13:12:50 +00:00
Vincent Ambo
fe07ebfb30 feat(volgasprint-cache): enable auto deploy
Change-Id: I3b0a4695f69ef24a4f1f6280402c8a72223ff0c9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12344
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: mrflos <mrflos@yeswiki.pro>
2024-08-25 11:29:56 +00:00
Vincent Ambo
a77b1d176b chore(ops/machines): add nixery & cache machines to system list
Change-Id: I40a4e7b9b993b2af57b03da1036ddeca2a0d298a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12343
Reviewed-by: mrflos <mrflos@yeswiki.pro>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-08-25 11:29:24 +00:00
Vincent Ambo
6167e63e07 feat(tazjin/german-string): impl Clone for GermanString
Small strings are always copied fully, without allocations.

Large transient strings copy the data and allocate.

Large persistent strings are also a trivial copy.

Change-Id: I319c0b800fa7a4a62e634176b959bb2fa766a4eb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12342
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-25 10:07:03 +00:00
Vincent Ambo
d504f668e0 feat(ops/machines): add temporary VolgaSprint cache machine
Change-Id: I5b5bb98f591e7bf3b1f16673f7f670b758444066
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12327
Reviewed-by: mrflos <mrflos@yeswiki.pro>
Tested-by: BuildkiteCI
2024-08-25 09:38:57 +00:00
Florian Klink
6dff303c5f chore(users/tazjin): hardware.opengl -> hardware.graphics
Change-Id: I649a6de6eef0b9b8c9cb658fdb6e4e46f5c8be1c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12335
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-25 09:19:25 +00:00
Florian Klink
a742fafdbf chore(tvix/tools/turbofetch): bump deps
h2:
 - https://rustsec.org/advisories/RUSTSEC-2024-0332.html
 - https://rustsec.org/advisories/RUSTSEC-2024-0003.html

mio:
 - https://rustsec.org/advisories/RUSTSEC-2024-0019.html

shlex:
 - https://rustsec.org/advisories/RUSTSEC-2024-0006.html

zerocopy:
 - https://rustsec.org/advisories/RUSTSEC-2024-0006.html

Change-Id: I7ce3cab410b9c2b6c28474ca81c3fa5b5283f3fd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12341
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-08-24 18:08:08 +00:00
Florian Klink
25f8ddca6d chore(tvix/tools/crunch-v2): bump deps
h2:
 - https://rustsec.org/advisories/RUSTSEC-2024-0332.html
 - https://rustsec.org/advisories/RUSTSEC-2024-0003.html

mio:
 - https://rustsec.org/advisories/RUSTSEC-2024-0019.html

shlex:
 - https://rustsec.org/advisories/RUSTSEC-2024-0006.html

zerocopy:
 - https://rustsec.org/advisories/RUSTSEC-2024-0006.html

Change-Id: Ia5f6f96378d5f7e77e178dc054f47bda8b766a30
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12340
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-08-24 18:08:08 +00:00
Florian Klink
478a746a92 chore(tvix/tools/weave): bump mio
https: //rustsec.org/advisories/RUSTSEC-2024-0019.html
Change-Id: I03543105b35da6407a4930893b1514b379a89fbc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12339
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-08-24 18:08:08 +00:00
Vincent Ambo
47ff0d0893 chore(depotfmt): exclude users/emery/*
Change-Id: I971456e97a809665fdd011c31b0437510f4b7fba
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12306
Reviewed-by: emery <emery@dmz.rs>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-08-24 09:27:31 +00:00
Vincent Ambo
f22defa541 fix(cgit-tvl): disable follow-links in cgit
These cause segfaults in cgit due to an old wontfix git issue:

https://bugzilla.redhat.com/show_bug.cgi?id=1791810

Change-Id: I831655faf3cfdef5bad13eba8cb8bb274de83ea0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12307
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-24 08:38:06 +00:00
Vincent Ambo
bfab474d0c fix(ops/modules): re-add cheddar highlighting server
This was deleted when removing the Sourcegraph module, but it turns out it is
also needed by panettone.

Change-Id: I8f14165bf783743247894c2b64882fbb032ffbf8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12295
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-23 23:41:39 +00:00
Ilan Joselevich
8b624f93bf feat(users/picnoir/tvix-daemon): Add crate2nix-check
Change-Id: I92a2fd6369e1f45c8afa25f778ac424782699b55
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12304
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-23 19:55:10 +00:00
Ilan Joselevich
e7ff04b5f1 feat(tvix/tools/weave): Add crate2nix-check
Change-Id: I4e02f56678e6efa6e2656b2f7398b6ad92581c57
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12303
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-23 19:55:10 +00:00
Ilan Joselevich
beb6713983 feat(tvix/tools/turbofetch): Add crate2nix-check
Change-Id: Ie615d824032c85af6f8f40419bc22d7e3f38bb4c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12302
Tested-by: BuildkiteCI
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: flokli <flokli@flokli.de>
2024-08-23 19:55:10 +00:00
Ilan Joselevich
424b1ab5ad feat(tvix/tools/narinfo2parquet): Add crate2nix-check
Change-Id: I22bc6e7711e5e2c0a76d4eea4dd6edaf724e4cef
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12301
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-23 19:55:10 +00:00
Ilan Joselevich
a8d2d6e97e feat(tvix/tools/crunch-v2): Add crate2nix-check
Change-Id: I922caae2ec3f87a7f3a5dcc8e9d366f0e71ce900
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12300
Tested-by: BuildkiteCI
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: flokli <flokli@flokli.de>
2024-08-23 19:55:10 +00:00
Emery Hemingway
4157fbad43 feat(users/emery/pkgs): add syndicate-server
Change-Id: I3cd358e55a7f0208af8fe8aa990b9f2ee7ffe865
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12299
Reviewed-by: emery <emery@dmz.rs>
Tested-by: BuildkiteCI
2024-08-23 17:23:06 +00:00
Ilan Joselevich
43cf713417 feat(web/tvixbolt): Add crate2nix-check and re-generate Cargo.nix
Change-Id: Ib9881efd6a78ba28e283759e0ed5125fb175b89e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12221
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-23 17:03:02 +00:00
Ilan Joselevich
6da55dc1a6 feat(tvix/utils): Add mkCrate2nixCheck
This adds a function which can be used across the monorepo to create a
an extra CI step that checks whether the Cargo.nix file is up-to-date.

Change-Id: Idb8298b29ddc2ca5dff1facb1b9ed86a236ee66d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12227
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-23 17:03:02 +00:00
Vincent Ambo
afef485221 feat(ops/users): add mrflos
Patch submitted via public inbox.

Change-Id: I5dc2d86aefd909216e8a16f428fc2cf818a125c2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12296
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-23 16:24:25 +00:00
Vincent Ambo
3530841a13 chore(tools/depotfmt): remove terraform fmt
This adds almost a gigabyte of closure size for formatting files that almost
never change.

I'll look into building just the formatter somehow, but it's not a very high
priority task.

Change-Id: Ib0f841e1a98133381c5ae154e2a57df8af52dc1f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12293
Tested-by: BuildkiteCI
Reviewed-by: emery <emery@dmz.rs>
Autosubmit: tazjin <tazjin@tvl.su>
2024-08-23 16:13:19 +00:00
Emery Hemingway
6c31d72000 feat(users/emery): add custom Cyrillic keyboard layout
Change-Id: I37f95c904e8a05cf8d8e437c41b9710c2ebf0300
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12294
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-23 16:07:08 +00:00
Florian Klink
a4ebc8da7c feat(tvix/nar-bridge): send content-type headers
This prevents browsers from treating NARInfo and nix-cache-info paths as
a separate "Download", but just show it in plaintext.

Change-Id: If99abe20ef1d24e4fa86c055160861ca47aa81ce
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12267
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-08-23 15:02:14 +00:00
Florian Klink
35d5811eec feat(nix-compat): add constants for mime types
This adds the MIME types Nix uses when uploading files to a S3 bucket /
HTTP endpoint. It ignores them when retrieving.

Change-Id: I75fa96d5e53349f0470bbe8cbba93f961fbd5f05
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12266
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
2024-08-23 15:02:14 +00:00
Vincent Ambo
c321a5136f feat(ops/users): add nikiv
Patch submitted to me IRL.

Change-Id: Idd8aa75313ba73d5c1e92b98d390e43e7108c6b6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12292
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-08-23 14:53:08 +00:00
Vincent Ambo
1099b5603c docs: remove mention of Sourcegraph from depot README
Change-Id: I721d08d2862256e5e973792b8fc7fac73b0326fc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12288
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-23 14:40:09 +00:00
Vincent Ambo
caf653be32 chore(ops/besadii): remove sourcegraph index update support
Change-Id: I4ee9a5a69c90e2050c60b2ef8483431d691b499f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12287
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-23 14:40:09 +00:00
Vincent Ambo
11665f4e0a chore(whitby): remove Sourcegraph instance
Change-Id: I4d03f98e79de5e3a9c8c4a33682d5c78e3e0f028
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12286
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-23 14:40:09 +00:00
Vincent Ambo
83a6ad9717 feat(ops/users): add aziz
Patch submitted to me IRL.

Change-Id: I43805e3932ccbe383fb5ec7780a29fae187f64db
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12290
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-23 14:26:24 +00:00
Vincent Ambo
1694ff4e22 feat(ops/users): add emery
Patch submitted to me IRL.

Change-Id: I4cbfb138f616adf8635ca84f25cb77f8b8af7959
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12289
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-23 14:15:18 +00:00
Vincent Ambo
73896eb075 feat(ops/www): redirect cs.tvl.fyi to livegrep & cgit
Goodbye, Sourcegraph.

Relates to b/290.

Change-Id: Ic1cf3c1cf52ae17cdcc18c675b4c01d477644a3c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12285
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-23 11:07:15 +00:00
Vincent Ambo
8041ce7cbd chore(web/atward): remove sourcegraph support
We're moving away from sourcegraph to livegrep and so on, as Sourcegraph has
gone fully proprietary.

This removes support for redirecting to Sourcegraph.

Relates to b/290

Change-Id: I04ccf8dfef72113cd49d444151cb0c3eb834845d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12268
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-08-23 11:07:15 +00:00
Vincent Ambo
8f6f45097e feat(tazjin/german-string): add constructor that leaks a Vec<u8>
Change-Id: Id0b6b4794128573ddb62e82fd77d080e564978be
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12264
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
2024-08-22 14:02:15 +00:00
Vincent Ambo
012da7d0e1 feat(tazjin/german-string): add persistent construction from statics
Makes it possible to construct persistent German Strings from data with 'static
lifetime. This doesn't leak any additional data.

Change-Id: Ifb3a36ff72b106724883302e4c2195ac54acd352
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12263
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
2024-08-22 14:02:15 +00:00
Vincent Ambo
95ebcc24b0 refactor(tazjin/german-string): add type for encoding storage class
Adds a StorageClassPtr type that is set up to be able to steal bits from an
aligned pointer to encode the storage class of a German String.

Change-Id: I64591174eac1ebcb73e624a59bd107ba1e02c69d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12262
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-22 14:02:15 +00:00
Ben Webb
565c0fd24c fix(tvix/castore): u32 -> u64 in DirectoryError::SizeOverflow message
Fix a discrepancy in the error message for DirectoryError::SizeOverflow.

The message indicates that the SizeOverflow error occurs when total size
exceeds u32::MAX, but that's not true. All size fields within the
castore's internal Directory ADT are u64, and the SizeOverflow error is
only returned after a call to the checked_add implementation on u64.

See tvix/castore/nodes/directory.rs +111
and tvix/castore/nodes/directory.rs +88
as of this commit.

Change-Id: I74d161ea8927362e1cb601ba163489aa96fb91b1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12259
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-21 22:05:57 +00:00
Florian Klink
e03ea11bad feat(nix-compat/nix_http): init parse_nar[info]_str
This moves the URL component parsing code we had in nar-bridge to
nix-compat.

We change the function signature to return an Option, not a
Result<_, StatusCode>.

This allows returning more appropriate error codes, as we can
ok_or(…) at the callsite, which we now do: on an upload to an
invalid path, we now return "unauthorized", while on a GET/HEAD, we
return "not found".

This also adds support to parse compression suffixes. While not
supported in nar-bridge, other users of nix-compat might very well want
to parse these paths.

Also fix the error message when parsing NAR urls, it mentioned 32, not
52, which is a copypasta error from the narinfo URL parsing code.

Change-Id: Id1be9a8044814b54ce68b125c52dfe933c9c4f74
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12260
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-21 09:40:32 +00:00
Armin Schlegel
2357079891 feat(kontemplate): defaults can now have nested values
See https://b.tvl.fyi/issues/409 for details.

Change-Id: Ibb54fab7a78e0e5f708c2a7dc8bb26ac0b2b4689
Signed-off-by: Armin Schlegel <a.schlegel@gridx.de>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11972
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-20 17:09:57 +00:00
Florian Klink
2beabe968c refactor(nix-compat/store_path): make StorePath generic on S
Similar to how cl/12253 already did this for `Signature`, we apply the
same logic to `StorePath`.

`StorePathRef<'a>'` is now a `StorePath<&'a str>`, and there's less
redundant code for the two different implementation.

`.as_ref()` returns a `StorePathRef<'_>`, `.to_owned()` gives a
`StorePath<String>` (for now).

I briefly thought about only publicly exporting `StorePath<String>`
as `StorePath`, but the diff is not too large and this will make it
easier to gradually introduce more flexibility in which store paths to
accept.

Also, remove some silliness in `StorePath::from_absolute_path_full`,
which now doesn't allocate anymore.

Change-Id: Ife8843857a1a0a3a99177ca997649fd45b8198e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12258
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-08-20 15:14:27 +00:00
Florian Klink
413135b925 refactor(nix-compat/aterm): update function names a bit
Don't call functions bstr or str when they return BString or String,
it's confusing.

Rename them to `string` and `bytes`. We might be able to generalize over
this being BString or Vec<u8> later.

Change-Id: I8198551ed3ba1cfc479bf7e3cbbc13a426faf4c0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12257
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-08-20 15:14:27 +00:00
Ilan Joselevich
e579d3869d feat(tools/depotfmt): Get gofmt from pkgs.go instead of buildGo
This allows importing just //tools/depotfmt.nix when using a josh
workspace.

Change-Id: Idf7eb438be1cc1e60445aace982fdca1f4367595
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12254
Tested-by: BuildkiteCI
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: flokli <flokli@flokli.de>
2024-08-20 05:13:39 +00:00
Aspen Smith
01af37c532 chore(aspen/system): Turn off disableWhileTyping for libinput
I... actually really hate this, it turns out. Plus it breaks video
games, lol.

Change-Id: I4b86e38ee78f5f3b6ffec5e7cc4f1dc054d91c56
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12256
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-08-20 02:27:13 +00:00
Ryan Lahfa
a4e40d1dfa feat(tvix/nix-compat): entry locator in listing structures
This implements a simple DFS locator in listing structures.

It is interoperable with the Rust standard library paths, we also build our
own errors to restrict path values to reasonable secure defaults, e.g.
relative paths with no `..` component.

Tests are added for this new feature for a positive and a negative
check.

In addition, a path validation test was added. The Windows-style prefix
is gated on the Windows platform as UNIX does not parse `C:\\` as a
`Component::Prefix(_)` but as a `Component::Normal(_)`.

Change-Id: Iae2a80bebd8138e41af94aa7d09f2842c3c5a786
Signed-off-by: Ryan Lahfa <tvl@lahfa.xyz>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12255
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-19 22:32:09 +00:00
Florian Klink
a259613c76 feat(nix-compat/narinfo/signature): generalize name field
Requiring `name` to be a `&str` means it'll get annoying to pass around
`Signature`, but being able to pass them around in an owned fashion is
kinda a requirement for a stronger typed `PathInfo` struct, where we
want to have full ownership.

Rework the `Signature` struct to become generic over the type of the
`name` field. This means, it becomes possible to have owned versions
of it.

We don't want to impose `String` or `SmolStr` for example, but want to
leave it up to the nix-compat user to decide.

Provide a type alias for the existing `&str` variant (`SignatureRef`),
and use it where we previously used the non-generic `Signature` one.

Add some tests to ensure it's possible to *use* `Signature` with both
`String` and `SmolStr` (but only pull in `smol_str` as dev dependency
for the tests).

Also, add some more docstrings, these were a bit sparse.

Change-Id: I3f75691498c6bda9cd072d2d9dac83c4f6c57287
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12253
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-08-19 19:46:34 +00:00
Ryan Lahfa
7612cb4c31 feat(tvix/nix-compat): add a basic listing deserializer
.ls files are useful to seek in a NAR without parsing it entirely.

The responsibility of validating the files is on the caller.

Change-Id: I5d1da28b5479c38f20ca5babe60e362a2217c9ea
Signed-off-by: Ryan Lahfa <tvl@lahfa.xyz>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12196
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-19 19:18:42 +00:00
Ilan Joselevich
73e16c1855 feat(tvix): drop usage of sparseTree in favor of lib.sourceByRegex
We can avoid depending on things outside //tvix by just using a similar
util from nixpkgs.

Change-Id: I9ea3e1f0a8a059ea10caaec173569ba9f316aec6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12247
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-19 16:56:19 +00:00
Ilan Joselevich
bc967c538d feat(tvix/boot/tests): use pkgs.nixos instead of nixosFor
Using pkgs.nixos directly allows us to create a smaller nixos closure
for the tests and also not depend on things in depot.ops which can be
beneficial for extending the tvix josh workspace.

Change-Id: Ic6ad2122733418114b43aa692d6e42ac1e308eeb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12251
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-19 16:55:22 +00:00
Florian Klink
70d199ea44 refactor(nix-compat/narinfo/signature): use ed25519::SignatureBytes
It's a `[u8; SIGNATURE_LENGTH]` type alias, and conveys what we're
accepting or returning a bit nicer.

Change-Id: I974cd97d56d383e51417eb0f26e1431a05711922
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12252
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-08-19 14:34:35 +00:00
Vincent Ambo
ed4f68b1d3 feat(tazjin/german-string): add constructor method from owned data
Makes it possible to construct a GermanString from an owned byte vector, without
having to clone the data.

This is done by "disowning" the vector using ManuallyDrop to access its internal
pointer. For transient strings, this memory is then owned (and freed) by the
GermanString instance.

Small strings are copied out of the heap and stored inline as before, to avoid
any dereferencing operations.

Change-Id: I754736099f71d646d430aed73e558a5a7626c394
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12249
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-19 13:19:40 +00:00
Vincent Ambo
0d6d31bc66 feat(tazjin/german-string): add pointer equality check in Eq
This can short-circuit two large string comparisons.

Change-Id: If45e7cf33921fe571482dc710c27ef8cc7c70885
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12245
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-19 13:19:40 +00:00
Vincent Ambo
a521f9e5f8 chore(tazjin/german-string): add Nix build
Change-Id: I1e8c500c9bb4ba365ba32f53f60bcf657f62ed62
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12243
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-19 13:19:40 +00:00
Vincent Ambo
56d4f01e9f feat(tazjin/german-string): add [Partial]Ord implementation
Change-Id: I8002ec63be45a15160387c21ed1fa8721a7c3eb4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12242
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
2024-08-19 13:19:40 +00:00
Vincent Ambo
86f467cee6 test(tazjin/german-string): add roundtrip proptests
Change-Id: Iee392368252d5c6e96d879b213aee34a301d13d6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12241
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-19 13:19:40 +00:00
Vincent Ambo
64a085cf52 feat(tazjin/german-string): add Eq impl & corresponding proptests
Change-Id: I66a258fad5d4e249268b9d2743d46b30c5ac1dac
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12240
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
2024-08-19 13:19:40 +00:00
Vincent Ambo
ab6a4815ff feat(tazjin/german-string): add Debug implementation
Change-Id: I9a4a8a4815ac210c402cfc2feb1fe0606affb327
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12239
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-19 13:19:40 +00:00
Vincent Ambo
2284c00417 feat(tazjin/german-string): PartialEq implementation for GermanString
This is where one of the advantages of this string representation starts to
shine: For small strings there's no derefencing any heap memory at all, and for
the long representation we can compare the prefix before moving on.

Change-Id: Iac333a52e8d7c9dd09e33dbcf51754e321c880e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12238
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-19 13:19:25 +00:00
Ilan Joselevich
0714184b1f feat(tvix/boot): Use buildGoModule instead of buildGo for tvix-init
//tvix depending less on other parts of depot is prefered as it will
help with extending the josh workspace of tvix.

Change-Id: Ifcac3af1782dfd82e7543cb4c3ae57fbd186edff
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12250
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-19 12:42:44 +00:00
Ilan Joselevich
7b1acc5c16 feat(third_party/gitignoreSource): Get gitignore-nix from sources (niv)
It's easier to implement readTree/depot polyfills for gitignoreSource
when it's imported from third_party.sources, rather than in a file at
//third_party.gitignoreSource.

Change-Id: I1323f932bd0feeb2c50ccc76397a80e035842992
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12248
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-19 12:14:08 +00:00
Vincent Ambo
9aa1c2dd19 fix(tazjin/german-string): add maximum length check
Change-Id: I4fd9b2a31749d65632b662807c4e703a9df9ec9e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12237
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-19 11:50:11 +00:00
Vincent Ambo
d8640b6e67 feat(tazjin/german-string): add data accessors for &str and &[u8]
Change-Id: I992e625861f79ef6d9993e8caee4e02d3fc5557e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12236
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-19 11:50:11 +00:00
Vincent Ambo
4d5abbe232 feat(tazjin/german-string): add Drop impl for transient strings
All of these strings are currently transient (the storage class is not yet
represented anywhere), and the ones that are heap allocated need to be
deallocated when the transient string dies.

Change-Id: Iba0ca926df5db7594f304c5d5318db9d69c6f42c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12235
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-19 11:50:11 +00:00
Vincent Ambo
ef75a6300b feat(tazjin/german-string): init initial representation
This adds an initial implementation of the so-called "German Strings" in Rust.

https://cedardb.com/blog/german_strings/

This implementation is *far from* complete, the only thing that can be done
right now is construct a string, and even that I'm not fully happy with.

Change-Id: I2697932a0ef373be76ffd14d59677493a5783b58
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12234
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-19 11:42:56 +00:00
Vincent Ambo
abff828ccc refactor(tvix/eval): remove use of imbl::OrdMap
Removes imbl::OrdMap in favour of an Rc over the standard library's BTreeMap,
which allows us to drop the imbl dependency completely.

In my local tests this is actually slightly faster for `hello` and `firefox`.

Change-Id: Ic9597ead4e98bf9530f290c6a94a3c5c3efd0acc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12201
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-08-19 11:02:50 +00:00
Vincent Ambo
adf9b4c54a refactor(tvix/eval): remove use of imbl::Vector
This vector type has served us well for now, but it contains internal refcounts
which are incompatible with upcoming changes related to garbage collection.

The performance impact of this change within all benchmarks I ran was within the
margin of error:

[nix-shell:/tmp/perf]$ hyperfine "./before -E '(import <nixpkgs> {}).firefox.outPath' --log-level ERROR --no-warnings"
Benchmark 1: ./u64 -E '(import <nixpkgs> {}).firefox.outPath' --log-level ERROR --no-warnings
  Time (mean ± σ):      7.528 s ±  0.272 s    [User: 6.578 s, System: 0.631 s]
  Range (min … max):    7.160 s …  8.012 s    10 runs

nix-shell:/tmp/perf]$ hyperfine "./std-vec -E '(import <nixpkgs> {}).firefox.outPath' --log-level ERROR --no-warnings"
Benchmark 1: ./std-vec -E '(import <nixpkgs> {}).firefox.outPath' --log-level ERROR --no-warnings
  Time (mean ± σ):      7.515 s ±  0.178 s    [User: 6.508 s, System: 0.652 s]
  Range (min … max):    7.276 s …  7.861 s    10 runs

Change-Id: Ib95f871956e336a1e5771f6293583854b1efb276
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12197
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-08-19 11:02:50 +00:00
Vincent Ambo
d6c57eb957 refactor(tvix/eval): ensure VM operations fit in a single byte
This replaces the OpCode enum with a new Op enum which is guaranteed to fit in a
single byte. Instead of carrying enum variants with data, every variant that has
runtime data encodes it into the `Vec<u8>` that a `Chunk` now carries.

This has several advantages:

* Less stack space is required at runtime, and fewer allocations are required
  while compiling.
* The OpCode doesn't need to carry "weird" special-cased data variants anymore.
* It is faster (albeit, not by much). On my laptop, results consistently look
  approximately like this:

  Benchmark 1: ./before -E '(import <nixpkgs> {}).firefox.outPath' --log-level ERROR --no-warnings
  Time (mean ± σ):      8.224 s ±  0.272 s    [User: 7.149 s, System: 0.688 s]
  Range (min … max):    7.759 s …  8.583 s    10 runs

  Benchmark 2: ./after -E '(import <nixpkgs> {}).firefox.outPath' --log-level ERROR --no-warnings
  Time (mean ± σ):      8.000 s ±  0.198 s    [User: 7.036 s, System: 0.633 s]
  Range (min … max):    7.718 s …  8.334 s    10 runs

  See notes below for why the performance impact might be less than expected.
* It is faster while at the same time dropping some optimisations we previously
  performed.

This has several disadvantages:

* The code is closer to how one would write it in C or Go.
* Bit shifting!
* There is (for now) slightly more code than before.

On performance I have the following thoughts at the moment:

In order to prepare for adding GC, there's a couple of places in Tvix where I'd
like to fence off certain kinds of complexity (such as mutating bytecode, which,
for various reaons, also has to be part of data that is subject to GC). With
this change, we can drop optimisations like retroactively modifying existing
bytecode and *still* achieve better performance than before.

I believe that this is currently worth it to pave the way for changes that are
more significant for performance.

In general this also opens other avenues of optimisation: For example, we can
profile which argument sizes actually exist and remove the copy overhead of
varint decoding (which does show up in profiles) by using more adequately sized
types for, e.g., constant indices.

Known regressions:

* Op::Constant is no longer printing its values in disassembly (this can be
  fixed, I just didn't get around to it, will do separately).

Change-Id: Id9b3a4254623a45de03069dbdb70b8349e976743
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12191
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-19 11:02:50 +00:00
Florian Klink
ddca074886 docs(tvix/glue/tvix_io): update doc-comments
Since we switched from reference scanning to string context, this only
handles the `__corepkgs__` hack. Update the docstrings.

Change-Id: Ie857c8c99ae1cdb4697323ec738f88be0580df3e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12246
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-19 10:24:37 +00:00
Florian Klink
bb5d7c9678 feat(ops/pipelines): support buildkite retries
cl/12228 did enable automatic retries for some flaky tests, which
generally did work, as can be seen in
https://buildkite.com/tvl/depot/builds/35893

However, "🦆" still reports as failing, because we check the number
of steps to be nonzero, which is not the case if retries have happened.

We cannot check for the overall status of the build, as it's still
"RUNNING", but instead of counting all failed steps so far, we can query
all failed jobs and then filter out the ones that were already retried.

Change-Id: Ib9d27587c8a8ba7970850812c4302fecdc4482e7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12233
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2024-08-19 10:07:08 +00:00
Florian Klink
98863e7312 docs(views): update where josh-filter is coming from
We started using josh from nixpkgs since cl/11457, but forgot to update
this documentation.

Change-Id: I6e07227bcd3e955076d46146024edd89b69f08f7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12244
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-18 20:44:39 +00:00
Aspen Smith
5382cbb93a refactor(tvix/eval): Pull context out into its own module
I'm gonna be doing some poking around in the internals of Context, so in
preparation this pulls it out into its own module.

Change-Id: I72ea7df80b5f36f838934ee07bdba66874c334c9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12189
Autosubmit: aspen <root@gws.fyi>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-18 19:49:14 +00:00
Florian Klink
e086c76ee9 refactor(tvix/castore): have SymlinkTarget-specific errors
Don't use ValidateNodeError, but SymlinkTargetError.

Also, add checks for too long symlink targets.

Change-Id: I4b533325d494232ff9d0b3f4f695f5a1a0a36199
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12230
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-18 17:22:21 +00:00
Florian Klink
56fa533e43 refactor(tvix/castore): have PathComponent-specific errors
Don't use DirectoryError, but PathComponentError.

Also add checks for too long path components.

Change-Id: Ia9deb9dd0351138baadb2e9c9454c3e019d5a45e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12229
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
2024-08-18 17:22:21 +00:00
Florian Klink
0cfe2aaf6a feat(tvix/castore/proto): add owned conv to castore::Directory
Replace the hand-rolled code comparing names with a try_fold. Also, make
it slightly stricter here, detecting duplicates in the same fields
earlier.

Change-Id: I9c560838ece88c3b8b339249a8ecbf3b05969538
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12226
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
2024-08-18 17:22:21 +00:00
Florian Klink
96832c0411 feat(tvix/castore): add Directory::try_from_iter()
This provides a batched variant to construct a Directory, which reuses
the previously calculated size.

Checking and inserting code is factored out into a check_insert_node
function, taking the current size as a parameter and returning the new
size.

Change-Id: Ia6c2970a0c12181b7c40e63cf7ce8c93298ea37c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12225
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
Tested-by: BuildkiteCI
2024-08-18 16:49:58 +00:00
Florian Klink
76839683a7 fix(tvix/boot): workaround test flakiness
The boot tests are sometimes flaky, and we don't want them to
periodically fail other build. Have Buildkite auto-retry them 2 times
on failure.
Logs for individual failures are still available, so it won't hinder
flakiness debuggability.

See https://buildkite.com/docs/pipelines/command-step#retry-attributes
for a documentation of a parameter, and cl/8983 for the introduction of
that feature to //nix/buildkite.

Change-Id: I1c0d25fa1d0ca940b3bdcd145ede87154b0c28eb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12228
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-17 20:36:05 +00:00
Florian Klink
c75b0d08ce chore(tvix/glue): drop some explicit allow(clippy::mutable_key_type)
This is covered by clippy.toml these days.

Change-Id: I2330af5781844d5f9d975793d770efcea48d371b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12223
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-08-17 15:59:10 +00:00
Florian Klink
5d01892274 refactor(tvix/castore): add name back to edge weights
Make this a proper struct with named fields. We apparently never access
B3Digest in there, so it can be removed.

Change-Id: Ifc07310393e1afb0a835778eae137a19b54070b9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12224
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-17 15:59:10 +00:00
Florian Klink
21ceef4934 refactor(tvix/castore): add into_nodes(), implement consuming proto conv
Provide a into_nodes() function on a Directory, which consumes self and
returns owned PathComponent and Node.

Use it to provide a proper conversion from Directory to the proto
variant that doesn't clone.

There's no need for the one taking only &Directory, we don't use it
anywhere, and once someone needs that they might as well clone Directory
before converting it.

Update all other users of the `.nodes()` function to use `.into_nodes()`
where applicable, and avoid some more cloning there.

Change-Id: Id4577b9eb173c012e225337458898d3937112bcb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12218
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-08-17 15:59:10 +00:00
Florian Klink
5ec93b57e6 refactor(tvix/castore): add PathComponent type for checked components
This encodes a verified component on the type level. Internally, it
contains a bytes::Bytes.

The castore Path/PathBuf component() and file_name() methods now
return this type, the old ones returning bytes were renamed to
component_bytes() and component_file_name() respectively.

We can drop the directory_reject_invalid_name test - it's not possible
anymore to pass an invalid name to Directories::add.
Invalid names in the Directory proto are still being tested to be
rejected in the validate_invalid_names tests.

Change-Id: Ide4d16415dfd50b7e2d7e0c36d42a3bbeeb9b6c5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12217
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
2024-08-17 15:59:10 +00:00
Florian Klink
8ea7d2b60e refactor(tvix/castore): drop {Directory,File,Symlink}Node
Add a `SymlinkTarget` type to represent validated symlink targets.
With this, no invalid states are representable, so we can make `Node` be
just an enum of all three kind of types, and allow access to these
fields directly.

Change-Id: I20bdd480c8d5e64a827649f303c97023b7e390f2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12216
Reviewed-by: benjaminedwardwebb <benjaminedwardwebb@gmail.com>
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
2024-08-17 09:46:01 +00:00
Florian Klink
49b173786c refactor(tvix/castore): remove name from Nodes
Nodes only have names if they're contained inside a Directory, or if
they're a root node and have something else possibly giving them a name
externally.

This removes all `name` fields in the three different Nodes, and instead
maintains it inside a BTreeMap inside the Directory.

It also removes the NamedNode trait (they don't have a get_name()), as
well as Node::rename(self, name), and all [Partial]Ord implementations
for Node (as they don't have names to use for sorting).

The `nodes()`, `directories()`, `files()` iterators inside a `Directory`
now return a tuple of Name and Node, as does the RootNodesProvider.

The different {Directory,File,Symlink}Node struct constructors got
simpler, and the {Directory,File}Node ones became infallible - as
there's no more possibility to represent invalid state.

The proto structs stayed the same - there's now from_name_and_node and
into_name_and_node to convert back and forth between the two `Node`
structs.

Some further cleanups:

The error types for Node validation were renamed. Everything related to
names is now in the DirectoryError (not yet happy about the naming)

There's some leftover cleanups to do:
 - There should be a from_(sorted_)iter and into_iter in Directory, so
   we can construct and deconstruct in one go.
   That should also enable us to implement conversions from and to the
   proto representation that moves, rather than clones.

 - The BuildRequest and PathInfo structs are still proto-based, so we
   still do a bunch of conversions back and forth there (and have some
   ugly expect there). There's not much point for error handling here,
   this will be moved to stricter types in a followup CL.

Change-Id: I7369a8e3a426f44419c349077cb4fcab2044ebb6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12205
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: benjaminedwardwebb <benjaminedwardwebb@gmail.com>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
2024-08-17 09:45:58 +00:00
Ilan Joselevich
04e9531e65 feat(tvix/cli): Extend nixpkgs eval test to include NixOS installer
The tvix-cli tests now include evaluating the NixOS GNOME installer ISO
image and making sure that its drvPath and outPath matches the one
evaluated by Nix. (This required extending the helper function a bit and
adding docs).

NixOS docs generation is disabled for now, see comments in diff.

Change-Id: Ia510f209b1ec3ef9a823f1e5ac0ef2f5f193976f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12177
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-16 20:59:51 +00:00
Brian Olsen
3cd57ce4e3 feat(tvix/glue): Add refscanner pattern and AsyncRead
This splits the existing ReferenceScanner into a ReferenceScanner and
ReferencePattern as well as adds an AsyncRead implementation that can
do a scan while you read from it.

The reason to split the scanner in two is that generating the pattern
is expensive and when ingesting build results with multiple outputs you
want to do several independant scans that look for the same pattern.

The reader is for scanning files without having to load the entire file
into memory.

Change-Id: I993f5a32308c12d9035840f8e04fe82e8dc1d962
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12052
Autosubmit: Brian Olsen <me@griff.name>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-16 16:26:18 +00:00
Florian Klink
9d20176241 docs(tvix/build/protos): clarify content-addressing
This comment is a bit misleading - everything that's not in this field
is referenced in a content-addressed fashion (by their digest).

Change-Id: I5097131530fd188173393063643c057f588ea2c4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12219
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
2024-08-16 16:03:08 +00:00
Florian Klink
d3c32f214c chore(tvix): bump object_store
Fix for RUSTSEC-2024-0358.

Change-Id: Id9e8c6ae67845d95a52c884035fcea02d2d71505
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12214
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-16 06:52:15 +00:00
Florian Klink
1d3fce5857 chore(tvix/tools/crunch-v2): bump curve25519-dalek
Fix for RUSTSEC-2024-0344.

Change-Id: I11651ea56e52988ee7cef2e02d0cbf61062f5c7b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12213
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
2024-08-16 06:52:15 +00:00
Florian Klink
fa05f12d5d chore(tvix/tools/narinfo2parquet): bump curve25519-dalek
Fix for RUSTSEC-2024-0344.

Change-Id: Iad02bcf312af8b6bf450ab3c4c6de31d9c02ab87
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12212
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-16 06:52:15 +00:00
Florian Klink
65d8b85dca chore(tvix/tools/weave): bump curve25519-dalek
Fix for RUSTSEC-2024-0344.

Change-Id: I414c1424941af1352f4d3b4e5908083ab0cf4e9d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12211
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-16 06:52:15 +00:00
Florian Klink
5d3ae11aa5 chore(tvix/nix-compat): bump curve25519-dalek
Fix for RUSTSEC-2024-0344.

Change-Id: I9e9cac5f0dac9e5b2e5a934c99762d982136c0e4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12210
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-16 06:45:37 +00:00
Florian Klink
a0a13126ee chore(tvix/tools/crunch-v2): update Cargo.{lock,nix}
These were out of date.

Change-Id: Ideaf888c2851bb9ec36ae01b11d93165b62cd7a5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12209
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-16 06:45:37 +00:00
Brian Olsen
39ef171e00 chore(tvix): Retain original passthru in Rust builds
When using the runTests feature of crate2nix the derivation that runs the
tests is put into passthru.test but all default.nix files for Rust crates
in Tvix threw that away.

This commit retains passthru so that you can get access to the test
derivation.

Change-Id: I8b7b7db57a49069348f08c12c00a3b1a41a0c05b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12215
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-15 23:37:00 +00:00
Florian Klink
ad92083dea chore(tvix/tools/narinfo2parquet): update Cargo.{lock,nix}
These were out of date.

Change-Id: I89df37f088ad6c53b676d965f0dc1023f40481f4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12208
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-15 21:10:44 +00:00
Florian Klink
38b94f5591 chore(tvix/tools/turbofetch): update Cargo.nix
This was out of date.

Change-Id: Icea6ee865d389d56bc46941f6049721db293ef7e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12207
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
2024-08-15 21:10:44 +00:00
Florian Klink
a4748e5fa6 chore(tvix/tools/wave): update Cargo.lock and Cargo.nix
This apparently was out of date.

Change-Id: I9768d5e62f200169d7815ad85aa0f12eadc56a8e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12206
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-15 21:10:44 +00:00
Aspen Smith
83e25fdd19 fix(aspen/system): Remove duplicate email
Change-Id: I7b30ca4940bcc65488b2fbb190b3f51dc4d76c15
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12204
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
2024-08-15 01:28:10 +00:00
sterni
9d8832474c chore(tvix/verify-lang-tests): update latest Nix version
Change-Id: I656c183d970806565d45ffd31f99f73c804dda1d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12203
Tested-by: BuildkiteCI
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-14 15:01:03 +00:00
sterni
41706c8764 chore(3p/sources): Bump channels & overlays
* //users/sterni/machines/ingeborg: adjust to yet another API
  change in the fcgiwrap module

Change-Id: Ic601bb7161887dec5cfbe68205be816cf9b92d17
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12202
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
2024-08-14 14:10:44 +00:00
Florian Klink
97c60d9857 docs(tvix/TODO): castore Directory struct is done
There's some followup work on making tvix-build use the stricter structs
natively, but that should probably be combined with the overall trait
changes there.

Add an item there so we won't forget, but this isn't really castore
territory anymore.

Change-Id: I6b1f9fa02d5c87c821d4ddc4b1dcc6a98c4eeaa5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12200
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-13 18:52:25 +00:00
Florian Klink
c7845f3c88 refactor(tvix/castore): move *Node and Directory to crate root
*Node and Directory are types of the tvix-castore model, not the tvix
DirectoryService model. A DirectoryService only happens to send
Directories.

Move types into individual files in a nodes/ subdirectory, as it's
gotten too cluttered in a single file, and (re-)export all types from
the crate root.

This has the effect that we now cannot poke at private fields directly
from other files inside `crate::directoryservice` (as it's not all in
the same file anymore), but that's a good thing, it now forces us to go
through the proper accessors.

For the same reasons, we currently also need to introduce the `rename`
functions on each *Node directly.

A followup is gonna move the names out of the individual enum kinds, so
we can better represent "unnamed nodes".

Change-Id: Icdb34dcfe454c41c94f2396e8e99973d27db8418
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12199
Reviewed-by: yuka <yuka@yuka.dev>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-13 18:39:49 +00:00
Florian Klink
2f4185ff1a docs(tvix/TODO): DirectoryService with bucketed directories is done
We have this (`ObjectStoreDirectoryService`), as well as some store
composition.

Change-Id: I876f85da1d5b183d80b148c378f825033ec080e4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12198
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-13 17:50:27 +00:00
Yureka
3ca0b53840 refactor(tvix/castore): use Directory struct separate from proto one
This uses our own data type to deal with Directories in the castore model.

It makes some undesired states unrepresentable, removing the need for conversions and checking in various places:

 - In the protobuf, blake3 digests could have a wrong length, as proto doesn't know fixed-size fields. We now use `B3Digest`, which makes cloning cheaper, and removes the need to do size-checking everywhere.
 - In the protobuf, we had three different lists for `files`, `symlinks` and `directories`. This was mostly a protobuf size optimization, but made interacting with them a bit awkward. This has now been replaced with a list of enums, and convenience iterators to get various nodes, and add new ones.

Change-Id: I7b92691bb06d77ff3f58a5ccea94a22c16f84f04
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12057
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-13 12:17:01 +00:00
Florian Klink
5d3f3158d6 docs(tvix/store/utils): add docstrings for ServiceUrls*
Describe what these structs are used for, and for each of it, explain
which usecases it's used for.

Change-Id: I8b7857bc68ec2b37df9f5163e06d028a64a12c79
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12195
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-12 15:26:31 +00:00
Ilan Joselevich
d2a80dda88 feat(tvix/cli): Add derivation file dumping functionality
Provides a derivation file dumping functionality for tvix-cli that can
be used when passing the --drv-dumpdir CLI arg to tvix-cli.

This will dump all the known derivation files into the specified
directory, making it easier to debug derivation divergences between Tvix
generated drvs and the drvs generated by Nix.

Supersedes: https://cl.tvl.fyi/c/depot/+/11265

Change-Id: I0e10b26eba22032b84ac543af0d4150ad87aed3e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12192
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-12 14:50:17 +00:00
Florian Klink
fd64df0511 fix(tvix/cli): add toplevel docstring to Args struct
Otherwise the flattened `ServiceUrlsMemory` docstring becomes the main
binary description, which doesn't make an awful lot of sense.

The help now describes what this CLI does currently (an interface to use
the different Tvix component.

Also, describe what it does not, so people running it without looking
too much other documentation might not get confused about why this
doesn't do anything in `/nix/store`, or doesn't provide the same CLI
surface as Nix.

Change-Id: Ia4838b444f03a10821801a6171d3e956b3cdfdaf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12194
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Tested-by: BuildkiteCI
2024-08-12 13:41:50 +00:00
Aspen Smith
1f5a85740e chore(tvix/eval): Update module comment for value::string
This sentence is a little stale; let's just link to NixString directly
for the authoritative source of truth.

Change-Id: I64e065c4148d29702b09820a0e7724a65fae7c67
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12181
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-11 16:41:34 +00:00
Aspen Smith
e176e1f11a feat(tvix/value): Print derivation values specially
Just like tvix-repl does (except we don't force values when printing
them, so... not entirely like tvix-repl does). But it's something.

Change-Id: I2e69b08d7d82b0b2d337f1d4c5d87ed28475fa84
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12180
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: aspen <root@gws.fyi>
2024-08-11 16:41:34 +00:00
Elle Najt
a781cfcc49 feat(ops/users): Add elle to users
Change-Id: I18492d6e6167f3c010e8f66670a127807ac7d99c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12183
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-08-11 03:32:13 +00:00
Aspen Smith
12e6c0bfc0 chore(mailmap): Add my name and email
Change-Id: I109da892dc01368ceb38d34e9095559895cbd60c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12182
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: aspen <root@gws.fyi>
2024-08-11 01:23:46 +00:00
Aspen Smith
f5c6acbbeb fix(tvix/cli): always configure nix path
Configure the nix path even if globals is already set.

Change-Id: I6598c92ab40ff952f73da04d9e7d3aeb13c16b53
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12176
Tested-by: BuildkiteCI
Autosubmit: aspen <root@gws.fyi>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-11 01:12:42 +00:00
Aspen Smith
7c2ac040db chore(tvix/eval): Drop obsolete todo
the answer is at https://cl.tvl.fyi/c/depot/+/10798

Change-Id: I5f0ed51a3954c7241ef15a8268e0e51695e994c6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12175
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-10 19:18:40 +00:00
Aspen Smith
d378111d77 feat(tvix/eval): Store hash in key of interner
Rather than storing the leaked allocation for the string as the key in
the interner, store the hash (using NoHashHashBuilder). I thought this
would improve performance, but it doesn't:

hello outpath           time:   [736.85 ms 748.42 ms 760.42 ms]
                        change: [-2.0754% +0.4798% +2.7096%] (p = 0.72 > 0.05)
                        No change in performance detected.

but it at least doesn't *hurt* performance, and it *does* avoid an
`unsafe`, so it's probably net good.

Change-Id: Ie413955bdb6f04b1f468f511e5ebce56e329fa37
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12049
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: aspen <root@gws.fyi>
2024-08-10 15:28:30 +00:00
Vincent Ambo
a6d6fc418d chore(tazjin/khamovnik): enable ADB
Change-Id: I1c754fdc54465f93dfb10e9d903a66a90447ab85
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12070
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-10 11:37:45 +00:00
Vincent Ambo
c06e26f1cc chore(tazjin/emacs): add tree-sitter grammar for typescript
Had to fix some stuff in a typescript project, it's better with highlighting.

Change-Id: I984540a791167427acde3494182521b8839aed6d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12069
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-08-10 11:37:45 +00:00
Florian Klink
3ea69235a4 fix(web/tvl/2024-08-tvix-update): small fixes
The `Fetch` is an enum, not a struct, and "Type" probably makes more
sense here. Slightly reword the "generic" to not be confused with
generics.

Also fix the link to Tvixbolt, which got eaten by the line wrapping.

Change-Id: I677229f0365523620a640c2333e76790573f7318
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12174
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-09 19:18:01 +00:00
Profpatsch
8e13838451 fix(web/tvl): fix 24-08 update typo
Change-Id: I0dc69e527a258c298275f688e728b0f951e3071d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12173
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-09 18:29:12 +00:00
Florian Klink
c9a2783d2d feat(web/tvl): add Tvix August Update
Change-Id: I97caa794a2573f7b34f25030c84b5531a9136c44
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12170
Tested-by: BuildkiteCI
Reviewed-by: benjaminedwardwebb <benjaminedwardwebb@gmail.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
2024-08-09 16:24:30 +00:00
edef
7f8997fc80 test(tvix/nix-compat/nar/wire): cover TOK_PAD_PAR
Change-Id: Ib4da612a4144d062f55a22b437c725b8566bee70
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12172
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-09 15:28:46 +00:00
Ilan Joselevich
e505880fde feat(tvix/eval): Re-enable testing for eval-okay-readDir
When we moved to building tvix with crate2nix we had to disable the
readDir tests for the same reasons mentioned in
https://cl.tvl.fyi/c/depot/+/12131. But now with the 12131 CL, we can
re-enable the readDir tests.

In this change I re-enabled the readDir tests in nix_tests by moving
them out of notyetpassing and I also deleted them from tvix_tests
because we don't need them in both places.

Change-Id: I82ac39605299a8b22d80f8b51fc8ec2476d21dc9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12133
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-09 14:56:57 +00:00
Ilan Joselevich
3511e328ec feat(tvix/eval): Implement builtins.readFileType
builtins.readFileType was added to Nix back in version 2.14.

The tests were also moved out of notyetpassing in addition to the
readDir fixtures they depend on.

I caught a bug where we previously used std::fs::metadata (via the
.metadata() method on File) which follows symlinks so it would always
return false for is_symlink(). Instead we now use
std::fs::symlink_metadata directly which does not follow symlinks, so
tests now pass. This wasn't an issue for builtins.readDir as it uses
walkdir and walkdir doesn't follow symlinks either.

Change-Id: I58eb97bdb5ec95df4f6882f495f8c572fe7c6793
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12130
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-09 14:35:57 +00:00
Ilan Joselevich
9c4b57ac63 fix(third_party/overlays): Patch crate2nix to use mkDerivation for tests
The problem with using runCommand and recreating the src directory with
lndir is that it changes the file types of individual files, they will
now be a symlink instead of a regular file. If you have a crate that tests
that a file is of regular type then it will fail inside the crate2nix
derivation.

Also regenerate Cargo.nix for //tvix as it will be needed in the next
commit.

Change-Id: I9275602cc17a428f9fdf0e55daf12cd673bbc030
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12131
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-09 14:35:57 +00:00
Ilan Joselevich
549e86d95b feat(tvix/verify-lang-tests): Test nixVersions.nix_{2_3,2_23}
With this change the latest Nix version being checked is 2.23
(previously was 2.18). A warning will now be printed when the
latest verified Nix version is out of date.

I added a test to the skip-list because the behavior of
builtins.dirOf has changed in Nix 2.22

Change-Id: Iaf7fa98dbfa599a2d2723df0e42bb459711e2413
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12105
Tested-by: BuildkiteCI
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: flokli <flokli@flokli.de>
2024-08-09 14:19:25 +00:00
Ilan Joselevich
c554c1c1c0 feat(tvix/eval): Implement Display for io::FileType
In newer versions of Nix there's a builtins.readFileType builtin, we
should try to avoid duplicating the enum -> string conversion by
implementating Display before we implement builtins.readFileType.

Change-Id: I579e95949a76eb33d2e7bda0000ed84859df765e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12129
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-09 14:03:46 +00:00
edef
591c5ffe53 docs(tvix/nix-compat/nar/wire): fix TOK_EXE grammar
Change-Id: I12b640fe1cbe7a4c69efe4660040486e510deadc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12171
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-09 08:33:01 +00:00
Ilan Joselevich
f648f17ec3 feat(tvix): Jemalloc -> MiMalloc
Use the faster and newer MiMalloc memory allocator for all endpoints in
the workspace.

Change-Id: Ic60237284ed168e46ec6e8f28e2710bae4385c6f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12149
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
2024-08-08 08:06:23 +00:00
Aspen Smith
000fb856be chore(aspen/web): some tweaks
Change-Id: I268728af52785efb5e6b3df7d4bfe0e0d54c13a1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12169
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
2024-08-08 03:22:53 +00:00
Aspen Smith
3536a7c7fa feat(aspen/web): Link to some more music i released this year
Change-Id: Ib55b5b02d85257e2d9c30697df7dbb303a6b3c27
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12168
Tested-by: BuildkiteCI
Autosubmit: aspen <root@gws.fyi>
Reviewed-by: aspen <root@gws.fyi>
2024-08-08 03:16:18 +00:00
Aspen Smith
6bd2760aa7 feat(aspen/web): freshen up, mention tvix in projects list
Change-Id: I34d1c3efd32882271ca553f180deb6249014fb32
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12165
Autosubmit: aspen <root@gws.fyi>
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-08-08 00:59:17 +00:00
Aspen Smith
d33fd78202 fix(web/tvl/tvl.dot): Update my name
it's about time

Change-Id: Ib93dd8313a0006da1190ca371e83662746333d34
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12062
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
2024-08-08 00:39:18 +00:00
Aspen Smith
172405c40c fix(aspen/system): Drop a broken remote builder
bye bye mugwump

Change-Id: Ie30771caaf23dd10872c33ad60f904f089fa6b6c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12150
Autosubmit: aspen <root@gws.fyi>
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-08-08 00:24:53 +00:00
Aspen Smith
6559ab4cf5 feat(tvix/eval): Put interner in a thread-local RefCell
Rather than making the interner be a global lazy_static mutex, put it in
a thread-local RefCell. This doesn't change anything in terms of
sharing (since we're currently actually just single threaded), but
avoids the overhead of a mutex, for a nice performance boost (compared
to the mutex version):

hello outpath           time:   [726.71 ms 729.79 ms 735.69 ms]
                        change: [-5.7277% -3.9733% -2.1144%] (p = 0.00 < 0.05)
                        Performance has improved.

Change-Id: I240b238dcbaf854ebafc3017b4425fb7d7b91b03
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12048
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: aspen <root@gws.fyi>
2024-08-08 00:02:36 +00:00
Aspen Smith
6366cee717 feat(tvix/eval): Intern (and leak) small strings, behind a mutex
This is the most naive version of string interning possible - we store a
map from the string itself to the pointer behind a global mutex, and
memoize the allocation of all strings below a threshold length (16
bytes, for now) into that map. This requires leaking /all/ strings,
since it's not easy to know just from the pointer that a string has been
interned - so interning is disabled if string leaking is also disabled.

In the case where we're leaking strings (the default), even the naive
version of this gets us a pretty nice perfomance boost:

hello outpath           time:   [742.54 ms 745.89 ms 749.14 ms]
                        change: [-2.8722% -2.0135% -1.0654%] (p = 0.00 < 0.05)
                        Performance has improved.

However, in the case where we're not leaking strings, we have to keep
track of which strings have and haven't been interned, which makes this
a little worse:

hello outpath           time:   [779.30 ms 792.82 ms 808.74 ms]
                        change: [+2.5258% +4.0884% +5.8931%] (p = 0.00 < 0.05)
                        Performance has regressed.

Hopefully we can close the gap here a bit with some clever
tricks (coming next).

Change-Id: If08cb48ede703c7fe3bdd8d617443f8a561ad09b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12047
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: aspen <root@gws.fyi>
2024-08-08 00:02:36 +00:00
Aspen Smith
b8f92a6d53 feat(tvix/eval): Forbid Hash{Map,Set}, use Fx instead
Per https://nnethercote.github.io/perf-book/hashing.html, we have
basically no reason to use the default hasher over a faster,
non-DoS-resistant hasher. This gives a nice perf boost basically for
free:

hello outpath           time:   [704.76 ms 714.91 ms 725.63 ms]
                        change: [-7.2391% -6.1018% -4.9189%] (p = 0.00 < 0.05)
                        Performance has improved.

Change-Id: If5587f444ed3af69f8af4eead6af3ea303b4ae68
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12046
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: aspen <root@gws.fyi>
2024-08-07 12:38:40 +00:00
Yureka
1d7ba89c19 chore(tvix): change deprecated default_features to default-features
Change-Id: Ida31fe9a1205cdfc852d2ecbcbda32933b634562
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12143
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-08-07 11:36:04 +00:00
Florian Klink
5b0264223f docs(tvix/TODO): document blob prefetching dependency
This depends on the ChunkReader work.

Change-Id: I38878d0f822c312151131e55baee4db6ef1c3650
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12142
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
2024-08-07 10:50:46 +00:00
Florian Klink
c2c4169e49 docs(tvix/TODO): add Correctness > Performance section
Explain the current caveats as far as performance tuning is concerned.

Change-Id: I1a9c11c81de09350240fb61e3c130fc401ef6618
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12141
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
2024-08-07 10:50:46 +00:00
Profpatsch
f9703a9af5 fix(users/Profpatsch/whatcd-resolver): reduce json data from db
We’d transfer the full json data for each torrent from the db instead
of just the 2 or 3 fields we need.

Adds some more helpers for parsing database values.

Adds some better logging events & traces.

Change-Id: I5db386c4ea247febf5f9fc3815da2e7f11286d41
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12140
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-08-06 09:59:40 +00:00
Profpatsch
13d79e04d8 fix(users/Profpatsch/whatcd-resolver): fix postgres query log
The queries would not be interpolated anymore, because we didn’t pass
the thing down deep enough.

Also only init the `pgFormatPool` if we want to use the formatter,
this saves on a bunch of subprocesses.

Change-Id: I8d69ef5aab4d8eac1cbfb1c3991d4edaacba254f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12139
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-08-06 09:59:40 +00:00
Profpatsch
2510cd6a5c fix(users/Profpatsch/whatcd-resolver): SQL formatting off
It turns out the pg_format thing is just too slow for my use-cases
most of the time, even when pooling the mf. Most queries stay 90%+ in
the perl script, even though they are very fast to execute on their
own, screwing up the traces a lot.

So instead I replace the `postgres-simple` quasi-quoter that strips
whitespace (and tends to screw up queries anyway) with a simple one
that just removes the outer indentation up to the first line.

Why did I spend so much time on pg_format haha

Change-Id: I911cd869deec68aa5cf430ff4d111b0662ec6d28
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12138
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-08-06 09:59:40 +00:00
Profpatsch
3202d008d5 chore(users/Profpatsch): park ical-smolify
Parked projects: I might pick these up again, but don’t want to
maintain them right now. Might delete later, or reinstate.

Change-Id: Ieb4f51dfaeba33c84820ca804b57c016e05bf566
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12137
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-08-06 09:59:40 +00:00
Profpatsch
37b2c2ce78 refactor(users/Profpatsch/whatcd-resolver): continue http
Ideally there’d be a better generic abstraction of doing basic http
calls (with tracing) in the future, but for now just reexport.

Change-Id: Id7548739ea62e9172f2773f8db79fe726096b7f1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12136
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-08-06 09:59:40 +00:00
Profpatsch
8908fd18ca refactor(users/Profpatsch/whatcd-resolver): start moving http stuff
There’s a bunch of duplication in how http client things are done,
let’s move that all to a single module.

Change-Id: Ic08c9bce49d562e4fa640a5bdfc15973a28a7bcb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12135
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-08-06 09:59:40 +00:00
Aspen Smith
59056cf705 feat(tvix/eval): Leak strings (with flag to disable)
Default to always leaking strings, and copying strings by copying
pointers rather than cloning the underlying allocation. This (somewhat
bafflingly) doesn't seem to affect any benchmarks, but paves the way for
some tricks around string allocation that do.

Unfortunately, we can't do this (yet?) for contextful strings, for
reasons I don't currently understand but which I will address later,
when I address contextful strings more holistically.

I've left a flag in here to disable this, both to test the cloning logic
for strings for when/if we decide to bring this back, and to allow
people who care more about memory usage than perf to disable leaking.

Change-Id: Iec44bcbfe9b3d20389d2450b9a551792a79b9b26
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12045
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-08-05 10:49:27 +00:00
Ilan Joselevich
480a8106cf feat(tvix/store): Sled{PathInfo,Directory}Service -> Redb…
Use redb instead of sled for the default filesystem implementation of
PathInfoService and DirectoryService. In the future we'll also drop sled
support completely.

Change-Id: I513ff0c2ff953d59714aa50b9aa1301b02f53d40
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12085
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-08-04 13:58:07 +00:00
Ilan Joselevich
26129c1761 fix(tvix/crate2nix-check): Revert use of depotfmt.check wrapper
This is a partial revert of https://cl.tvl.fyi/c/depot/+/12068 where I
changed tvix/crate2nix-check to use depotfmt.check. It turns out that we
don't actually want to be using it in this case as the wrapper sets
`--fail-on-change` which would always fail because the Cargo.nix
generated by crate2nix will always need to be changed (It's not
formatted properly).

Change-Id: Ife35c812ca69c90459ce4445f4252d0a24c218fa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12132
Tested-by: BuildkiteCI
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: flokli <flokli@flokli.de>
2024-08-04 13:47:31 +00:00
Aspen Smith
9c01ab3e84 feat(aspen/system): Switch to podman
Change-Id: Ifc5e724f455627d34b784509c62900fd112cb492
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12134
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
2024-08-04 01:31:49 +00:00
Aspen Smith
66c75ef694 feat(aspen/system): Tweak trackpad settings on laptops
Change-Id: Ie04c97b9b043bdfd8d2d20138d5bc795f340e8b7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12126
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: aspen <root@gws.fyi>
2024-08-03 19:50:45 +00:00
Aspen Smith
af61d64209 chore(aspen/system): Update NixOS config for renamed options
Change-Id: If25502452070492a698326e9f101f9ae421e2426
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12125
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-08-03 19:50:45 +00:00
Ilan Joselevich
41dc9ee6a2 feat(tvix/castore): add RedbDirectoryService
This provides a DirectoryService implementation which uses
redb (https://github.com/cberner/redb) as the database. It provides both
in-memory and persistent on-filesystem implementations.

Change-Id: Id8f7c812e2cf401cccd1c382b19907b17a6887bc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12038
Tested-by: BuildkiteCI
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: flokli <flokli@flokli.de>
2024-08-01 13:20:01 +00:00
Ilan Joselevich
87d4b00ff5 chore(web/tvixbolt): Update to latest yew version
Change-Id: I8e89aea317f088142e8006b3a888ec6d28467b47
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12064
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
2024-08-01 11:32:32 +00:00
Aspen Smith
756539a596 chore(3p/sources): Bump channels & overlays (2024-07-28)
* Treewide: re-run depotfmt

* //third_party/nixpkgs:html5validator: build with Python 3.11,
  dependency openstackdocstheme doesn't support 3.12

* //users/sterni/machines/ingeborg: adapt to poorly handled fcgiwrap
  module API change: https://github.com/NixOS/nixpkgs/pull/318599

* //tvix/*-go: regenerate protobuf files

* //third_party/nixpkgs:treefmt: Remove patch for merged pull request

* //users/flokli/ipu6-softisp: rebase, drop upstreamed kernel patches

Change-Id: Ie4e0df007c287e8cd6207683a9a25838aa5bd39a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11971
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: flokli <flokli@flokli.de>
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-08-01 10:06:33 +00:00
Aspen Smith
bdf8269859 fix(tvix/glue): coerce path argument to builtins.path to a path
The "path" key in the arguments to builtins.path supports any
path-coercible type (a string, a path...). Coerce it to a path in the
argument rather than just requiring it already be one and throwing an
error if it's not.

This is... annoying to test, since it requires a file with known
contents that's available in the build sandbox. But it works! Trust me!

Fixes: b/412
Change-Id: I3c8e339bf344a208d5ed5990193942651f318745
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12053
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: aspen <root@gws.fyi>
2024-07-31 20:18:46 +00:00
Ilan Joselevich
13720d90bf fix(tvix): Reuse now exposed depotfmt wrapper in crate2nix-check
This change exposes the already existing wrapper for treefmt/depotfmt
that supports running it inside a sandbox. We now reuse it inside
//tvix/crate2nix-check, where we previously duplicated the code. The
check is now stricter and will also fail on changes, so I had to set the
rust edition in the treefmt config.

Change-Id: I000e52421258979c038ba6b1f1ff2db14e391b0c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12068
Tested-by: BuildkiteCI
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: flokli <flokli@flokli.de>
2024-07-31 20:07:43 +00:00
Florian Klink
7cfac04b7d chore(tvix): drop nar-bridge-go
This functionality exists in nar-bridge(-rs) now.

Change-Id: I717484ef64aafad9466c982d2aa8195fe8b98bb9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12065
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-07-30 14:36:31 +00:00
Ilan Joselevich
a595d409de fix(tvix/nar-bridge): filter src in utils.nix
Change-Id: I3c8956a50ecdcc53f882fb46ffdc221dd1515b1a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12066
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-07-30 14:26:58 +00:00
Florian Klink
4277aa0db6 docs(tvix/boot): update README more
The environment variables caused both nar-bridge and tvix-store daemon
to try to connect to the same store, which fails due to locking issues.

Pass the config to `tvix-store daemon` directly. Also, add the
`--otlp=false` to the instructions to remove spam, most users don't have
a OTLP collector running.

Explain when to use gRPC in `tvix-store virtiofs` and when not.

Also, point out to be able to boot a NixOS closure, it needs to be
copied into the store first.

Change-Id: If4eda07bba28ad0bbe70e468cb727441a21b0588
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12067
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-07-30 14:14:24 +00:00
Ilan Joselevich
b21ca2ac26 docs(tvix/boot): Update README example
It was previously pointing to a sled implementation which no longer
exists. It was also using nar-bridge-go instead of the new nar-bridge
(rust).

Closes: https://b.tvl.fyi/issues/413
Change-Id: Id0df61d4728198c3ae95a8e27ba7303434892966
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12063
Reviewed-by: aspen <root@gws.fyi>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
2024-07-30 13:10:12 +00:00
Profpatsch
e682e5ce2a fix(users/Profpatsch/whatcd-resolver): make getTorrent no js
Start of an effort to make the app work without javascript
enabled (graceful degradation yay).

We use a trick where buttons are nested into a form element, passing
their value as input; this should be better than depending on
`hx-vals`. If htmx is disabled, just redirect and reload the full page
instead of sending back the snippet. Probably depends on the use-case
of each snippet though.

Change-Id: I6c73e624c4bd29b1cbd5492b2f84f48102edc68b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12056
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-07-30 12:41:26 +00:00
Profpatsch
a86dca8c78 feat(users/Profpatsch/whatcd-resolver): read redacted key from env
Change-Id: I5667710423aeeacfbb8dddf5b0b8750dc8f878aa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12055
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
2024-07-30 12:41:26 +00:00
Profpatsch
1f65a7b0d0 fix(users/Profpatsch/whatcd-resolver): better show ApplicationError
Change-Id: I7a1087afc4000299529a7518f273bfee8d651c72
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12054
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2024-07-30 12:41:26 +00:00
Aspen Smith
8aa038a90e test(tvix/glue): Add a benchmark for firefox outPath
This is nice to test too - it's similar to hello, but runs for a lot
longer (like 7.5 seconds on my laptop) which means we get even better
stats for stuff.

Change-Id: I7935818f10a6d846d446e685b9263a72d7e2aabd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12061
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: aspen <root@gws.fyi>
2024-07-30 08:58:49 +00:00
Ilan Joselevich
3f6cd7aebc fix(tvix/store): Immediately return an error when using sled on /
We already do this for redb and for sled in SledDirectoryService.

Change-Id: I34c7178257a6a04e9f12ed4037a4ef585d7b0d54
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12060
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
2024-07-29 16:43:04 +00:00
Ilan Joselevich
47a8baf178 docs(tvix/docs): Remove redb path info service from TODO
It is now implemented and tested since https://cl.tvl.fyi/c/depot/+/11995

Change-Id: Ie08f511edf10bba4f46efc2c13f8db17eb7182a9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12059
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-07-29 15:50:11 +00:00
Ilan Joselevich
9cbebfea27 fix(tvix/store) RedbPathInfoService: improve logs and errors
Add more logging and remove context from errors because that's already
provided by the logs (Errors also need to be refactored anyway, there's
also confusion about StorageError vs InvalidRequest, there's no
consistency)

Change-Id: Ia43c0d237d9075152490c635b05fb3fb343abcc8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12058
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-07-29 15:50:11 +00:00
Brian Olsen
a794790203 fix(tvix/nix-compat): Fix panic in nixbase32 decoding
The decode function didn't check that the input had a valid length and
so would panic when given input with invalid length.

Change-Id: Ie27d006b8fe20f005b4a47a1763821a61e9a95c7
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12051
Reviewed-by: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Autosubmit: Brian Olsen <me@griff.name>
2024-07-28 20:55:51 +00:00
Ilan Joselevich
a982f73477 fix(tvix/store): adjust from_addr redb test to do what it says
Change-Id: If15f161d5c7aba05ac1d8e2a4f6fac5a7053943a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12040
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-07-28 17:47:41 +00:00
Ilan Joselevich
d17f0592da docs(tvix/store): Document redb in from_addr
Change-Id: Id2ef4ee1b22c20e5b79156f40821578979105ddc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12039
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-07-28 16:40:40 +00:00
Matthew Tromp
038d1dd551 feat(tvix/eval): ConstantIdx expansion for more ops
Previously, OpConstant would display some detail about its
ConstantIdx: whether it's a thunk or closure, and what its address
is. This has been expanded to also show when the ConstantIdx is a
blueprint, along with the blueprint's address, and to the other
opcodes that use a ConstantIdx.

Currently, it seems like blueprint addresses don't correspond to the
address of the thunk listed in the bytecode output, but it's still
useful to see that the constant being grabbed is a blueprint, and
maybe this pointer can be made to make more sense in the future.

Change-Id: Ia212b0d52b004c87051542c093274e7106ee08e4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12044
Tested-by: BuildkiteCI
Reviewed-by: aspen <root@gws.fyi>
Autosubmit: chickadee <matthewktromp@gmail.com>
2024-07-27 22:37:59 +00:00
edef
f3c80c10b9 feat(tvix/tools/narinfo2parquet): preserve the deriver
Change-Id: Idbada585b87eef81cad5d40cb7592a7890704695
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12037
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-07-27 21:31:18 +00:00
Matthew Tromp
0b987a509f fix(tvix/eval): don't bubble up io errors from path_exists
path_exists was returning an error when certain common IO errors were
encountered. e.g. in the path "/dev/null/.", path_exists would throw
an error because the underlying call to Path::try_exists threw an
error because null isn't a directory. But if null isn't a directory,
then the path is invalid, so this should really be returning
false. That's what nix's behavior is and that's what makes sense.

The trait function isn't being changed because some other
implementers (e.g. tvix_store_io) have actual errors they can throw.

Fixes: b/411
Change-Id: I9e810e7a198bffe61365697c6d3d7e71f264c20b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12042
Tested-by: BuildkiteCI
Autosubmit: chickadee <matthewktromp@gmail.com>
Reviewed-by: aspen <root@gws.fyi>
2024-07-27 21:29:46 +00:00
Aspen Smith
4769d047b2 fix(tvix/cli): Make :q actually quit
whoops

Change-Id: I5f24163c276992c7858b038ae2bb636da75f3f91
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12043
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: lukegb <lukegb@tvl.fyi>
2024-07-27 21:19:43 +00:00
Florian Klink
c8f92c6e9f refactor(tvix/nix-compat): introduce CaHash::algo_str
This is the `{fixed,fixed:r,text}:{sha*,md5}` prefix used in various
string representations.

Factor that code out, and use it in the two places it can be used in.

Change-Id: Ic9555fa9e1884198d435e55c7f630b8d3ba2a032
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12041
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: Brian Olsen <me@griff.name>
2024-07-27 10:53:56 +00:00
Yureka
5114504b67 test(tvix/castore/dirsvc): check for a pitfall with deduplicated dirs
Change-Id: I3cff2c2e8b2c8a2fd8d8074647d0d99a1db8e693
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12034
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-07-25 09:52:29 +00:00
Yureka
6a988a1598 fix(tvix/castore/GRPCDirectorySvc): fix a bug in the get_recursive fn
When retrieving a closure with get_recursive, the following could happen in the GRPC client:
- The first reference to the deduplicated directory is added to expected_directory_digests
- The deduplicated directory is obtained removed from expected_directory_digests
- The second reference to the deduplicated directory is added to expected_directory_digests
- The deduplicated directory has already been sent, but is still in the
  expected_directory_digests. It looks to the GRPC client like the
  closure is incomplete and the stream ended prematurely.

Change-Id: Ic62bca12e7f8fb85af5fa4dacd199f0f3b8eea8c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12033
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-07-25 09:52:29 +00:00
Yureka
e97202e54a refactor(directoryservice): get rid of NaiveSeeker helper
Use the ChunkedReader in CombinedBlobService instead which also supports seeking.

Change-Id: I681331a80763172c27e55362b7044fe81aaa323b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12031
Autosubmit: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-07-23 20:53:08 +00:00
Florian Klink
9385b3bcfb fix(tvix/boot/tests): check nar-bridge being fully up
Ensure nar-bridge is healthy before connecting to it, don't just check
for the unix socket to be present.

We don't have a proper /health endpoint yet, but nix-cache-info works
fine for now.

Change-Id: I22df2c3b7bffcf52dbd3d00f3ba5382dc06ab03d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12030
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
2024-07-23 14:47:03 +00:00
Florian Klink
636647ce03 fix(tvix/boot/tests): use grpc health check
Ensure the service is healthy before connecting to it, don't just check
for the unix socket to be present.

Change-Id: If6501828677c247910d91f35b860960802084691
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12029
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
2024-07-23 14:47:03 +00:00
Florian Klink
ca5134c3da feat(3p/overlays/tvl): init grpc-health-check
Change-Id: Icc2429070b0daea9fd230f1f4bb97b9c2eaf24d2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12027
Tested-by: BuildkiteCI
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: flokli <flokli@flokli.de>
2024-07-23 14:34:59 +00:00
Yureka
94a0e21e68 fix(tvix/directoryservice): clarify get_recursive not found
Change-Id: I47f21b4b7db9304eadb04094d41bf04d443fcc3b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12025
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: yuka <yuka@yuka.dev>
2024-07-23 14:04:23 +00:00
Florian Klink
b9aa6456e2 docs(tvix/docs): add TODO for protobuf
Change-Id: Iacf4ef517885bdd6d6366446124863d9a138b12b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12024
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-07-23 13:24:42 +00:00
Ilan Joselevich
9f10a71ec5 feat(tvix/store): add redb PathInfoService
This provides a PathInfoService implementation using redb
(https://github.com/cberner/redb) as the underlying storage engine.

Both an in-memory variant, as well as a filesystem one is provided,
similar how it's done with the sled implementation.

Supersedes: https://cl.tvl.fyi/c/depot/+/11692
Change-Id: I744619c51bf2efd0fb63659b12a27cbe0b2fd6fc
Signed-off-by: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11995
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-07-22 18:49:04 +00:00
Yureka
dbe698042d test(tvix/store): add xp-store-composition to feature powerset
Change-Id: Ibbd9a7585ec2f70c8f0f4d25ad858aa5ebc031dd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12023
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-07-22 16:30:08 +00:00
Yureka
2547ff2cf6 feat(tvix/store): add grpc healthcheck service to daemon
Change-Id: Ib95fc9352a45d54f9a16c8841c7e8f7cbeeaee8c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12019
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: yuka <yuka@yuka.dev>
2024-07-22 15:57:30 +00:00
Yureka
39c8b6dece fix(store): add toml dependency for feature xp-store-composition
Fixes 'use of undeclared crate or module ' with --features xp-store-composition

Change-Id: I44dce86e656094d180b91a00f385f685d21f3fbd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12021
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: yuka <yuka@yuka.dev>
2024-07-22 15:56:59 +00:00
Vincent Ambo
849e639c71 fix(tazjin/emacs): fix Go indentation offset in tree-sitter mode
Change-Id: Id72ddc6345ee3eb70b7a1d594fe6bcd60d8d0868
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12020
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-07-22 14:39:44 +00:00
Yureka
14a4b4cbc3 feat(tvix): add experimental-store-composition option
Change-Id: I61661fbb0e77ce3c00c2a467dfabdf3fc77d8575
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12011
Autosubmit: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-07-22 13:36:08 +00:00
Yureka
67335c41b7 refactor(tvix): move service addrs into shared clap struct
Change-Id: I7cab29ecfa1823c2103b4c47b7d784bc31459d55
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12008
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: yuka <yuka@yuka.dev>
2024-07-22 13:36:08 +00:00
Yureka
6774d9c59c chore(tvix/tracing): switch tracing-opentelemetry from git to release
Change-Id: Ib830c8b642496a6cdf3d4b9093f0343f5fb80622
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12018
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-07-22 13:36:08 +00:00
Yureka
8342f70c60 feat(tvix/composition): improve error message for unknown tag
Change-Id: I61a31488de17725ae4311f5f5bf8e02edb752cf9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12017
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-07-22 13:36:08 +00:00
sinavir
5d82e1e62f fix(tvix/store): Fix narinfo compression selection
Parsing of the narinfo file sets the compression field to None instead
of Some("none"). The mapping selecting the decompression reader expected
the former in //tvix/store/src/pathinfoservice/nix_http.rs.

Change-Id: I254a825b88a4016aab087446bdc0c7b6286de40c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12007
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-07-21 22:11:20 +00:00
Florian Klink
a3194e9280 feat(tvix/nix-compat): add SigningKey, NARInfo::add_signature
This adds a generic `SigningKey` struct that can be used to sign
NARInfos with signers.

It also includes tooling to parse keypairs from bytes generated by Nix,
returning a specialized ed25519_dalek variant.

Change-Id: Ic9780c370939af54e7177c93cde3321adf189fc3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12014
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-07-21 21:41:54 +00:00
Florian Klink
05b4e805ee refactor(tvix/nix-compat): rename PubKey to VerifyingKey
Align these with the way it's called in the ed25519 crates.

Change-Id: Ia52d3bb9bf831dc6b5f7d5356f5ac62135672883
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12013
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
2024-07-21 21:41:54 +00:00
Florian Klink
62184ee35a docs(tvix): document the builder API
This documents some thoughts and goals of the Tvix Build protocol, and
how it is possible to express Nix builds with it.

Additionally, it explains a proposed design for reference scanning.

Change-Id: I4b1f3feb2278e3c7ce06de831eb8eb1715cba1c9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12012
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: yuka <yuka@yuka.dev>
Tested-by: BuildkiteCI
2024-07-21 21:35:22 +00:00
Yureka
e408783bac test(tvix/composition): add recursion and concurrent tests
Change-Id: Ic10773b08d940b45c3067bd514c3080cadac9606
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12003
Autosubmit: yuka <yuka@yuka.dev>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-07-21 21:18:17 +00:00
Yureka
eea9f3d9ee docs(tvix/composition): add comment about stack
Change-Id: I3888b5034c53728e2f9cfe24213f8854eb38bfe1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12005
Autosubmit: yuka <yuka@yuka.dev>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-07-21 18:37:50 +00:00
Yureka
76394daca3 feat(tvix/composition): downcast boxed error if possible
We still have the unique store name to identify which instantiation caused the error. For recursion errors, the full chain is still retained inside the CompositionError.

Change-Id: Iaddcece445a5df331e578d7c69d710db3d5f8dcd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12002
Tested-by: BuildkiteCI
Autosubmit: yuka <yuka@yuka.dev>
Reviewed-by: flokli <flokli@flokli.de>
2024-07-21 17:03:27 +00:00
sinavir
1f89cf9027 feat(ops/users): add sinavir to users
Change-Id: I54c47f8119d38f7403e27cbc23efd919dcf8e8d5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12006
Reviewed-by: yuka <yuka@yuka.dev>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-07-21 14:02:44 +00:00
Yureka
a805a80b48 fix(tvix/composition): include typeid in recursion check
Change-Id: Icc279d41a4980d4b57acbb4243bbd509039b753f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12000
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-07-21 13:20:00 +00:00
Florian Klink
ba38883a4f fix(tvix/nar-bridge): remove leftover debug statement
Change-Id: Ie6fb822e1a4b76f2f6aef15bbe846e0a89c644fb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11999
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
2024-07-21 11:26:13 +00:00
Florian Klink
98f59cb828 feat(tvix/nar-bridge): change default port
Having `tvix-store daemon` and `nar-bridge` listen on the same port by
default is silly.
Use the same port that nar-bridge-go was using previously.

Change-Id: Id374a12e52ba9dac4318e43d0ca0853866eadabc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11998
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: yuka <yuka@yuka.dev>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
2024-07-21 11:26:13 +00:00
Yureka
ca8e2b9fbf chore(tvix): upgrade to tonic 0.12 / hyper 1.0
Change-Id: Idd8ce48869ddd869d51a10959b920f1290a8a9b3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11991
Autosubmit: yuka <yuka@yuka.dev>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-07-21 11:01:38 +00:00
843 changed files with 70413 additions and 50693 deletions

5
.gitreview Normal file
View file

@ -0,0 +1,5 @@
[gerrit]
host=cl.tvl.fyi
port=29418
project=depot
defaultbranch=canon

View file

@ -1 +1,2 @@
Alyssa Ross <hi@alyssa.is>
Aspen Smith <root@gws.fyi> <aspen@gws.fyi> <grfn@gws.fyi>

View file

@ -15,10 +15,9 @@ partially see this as [an experiment][] in tooling for monorepos.
## Services
* Source code is available primarily through Sourcegraph on
[cs.tvl.fyi](https://cs.tvl.fyi), where it is searchable and even semantically
indexed. A lower-tech view of the repository is also available via cgit-pink
on [code.tvl.fyi](https://code.tvl.fyi).
* Source code can be viewed primarily via `cgit-pink` on
[code.tvl.fyi](https://code.tvl.fyi), with code search being available through
Livegrep on [grep.tvl.fyi](https://grep.tvl.fyi).
The repository can be cloned using `git` from `https://cl.tvl.fyi/depot`.

File diff suppressed because it is too large Load diff

View file

@ -1500,19 +1500,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasm-bindgen"
version = "0.2.92"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
dependencies = [
"cfg-if",
"once_cell",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.92"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
dependencies = [
"bumpalo",
"log",
@ -1537,9 +1538,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.92"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@ -1547,9 +1548,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.92"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
dependencies = [
"proc-macro2",
"quote",
@ -1560,9 +1561,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.92"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
[[package]]
name = "web-sys"

View file

@ -19,7 +19,7 @@ yew-router = "0.17"
wasm-bindgen-futures = "0.4"
# needs to be in sync with nixpkgs
wasm-bindgen = "= 0.2.92"
wasm-bindgen = "= 0.2.95"
uuid = { version = "1.3.3", features = ["v4", "serde"] }
[dependencies.serde]

View file

@ -363,19 +363,20 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "wasm-bindgen"
version = "0.2.92"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e"
dependencies = [
"cfg-if",
"once_cell",
"wasm-bindgen-macro",
]
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.92"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358"
dependencies = [
"bumpalo",
"log",
@ -400,9 +401,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.92"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@ -410,9 +411,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.92"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
dependencies = [
"proc-macro2",
"quote",
@ -423,9 +424,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.92"
version = "0.2.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d"
[[package]]
name = "web-sys"

View file

@ -9,4 +9,4 @@ lazy_static = "1.4"
yew = "0.19"
# needs to be in sync with nixpkgs
wasm-bindgen = "= 0.2.92"
wasm-bindgen = "= 0.2.95"

View file

@ -44,7 +44,7 @@ We are a technology company headquartered in Moscow, working with a variety of t
</details>
* **Software development**. We offer a wide range of software development
services. Whether you need existence with existing projects, or want to create
services. Whether you need assistance with existing projects, or want to create
a new solution from scratch, we can help. We specialize in helping
organizations avoid the trap of building overly complex systems that don't
meet their needs.

View file

@ -117,6 +117,10 @@ readTree.fix (self: (readDepot {
self.users.wpcarro.nixos.kyokoSystem
self.users.wpcarro.nixos.marcusSystem
self.users.wpcarro.nixos.tarascoSystem
# Disabled because it depends on an unstable FOD, which, when updated,
# breaks the build. Needs to be investigated by flokli.
self.users.flokli.keyboards.corneish_zen.firmware
];
# List of all buildable targets, for CI purposes.

View file

@ -0,0 +1,91 @@
Importing projects into depot
=============================
Before importing an existing `git`-based project into depot, a few questions
need to be answered:
* Is the project licensed under a free software license, or public domain?
* Do you need to import existing history?
* Do you need to export new history with hashes that continue on from the old
history? (e.g. importing an existing repository, and exporting from depot to
the old upstream)
Think about this and then pick an approach below:
## Import with no history (just commit)
Simply copy the files to where you want them to be in depot, and commit. Nothing
else to do!
## Import without continuous history (subtree merge)
This import approach lets you drop an existing project into depot, keep its
existing history, but not retain the ability to continue external history.
This means that if you, for example, import a project from a different git host
using this method, and then continue to commit to it inside of depot, you will
not be able to export a history consistent with your previous hashes using
`josh`.
Commit hashes before the import will exist in depot and be valid.
Still, this approach might be viable if a project "moves into" depot, or has
nothing depending on it externally.
1. Pick a location in depot where you want your project to be (`$loc` from now on).
2. Fetch your project into the same git store as your depot clone (e.g. by
adding it as an upstream and fetching it).
3. Pick the commit you want to merge (`$commit` from now on).
4. Run `git subtree add --prefix=$loc $commit`, which will create the correct
merge commit.
5. Ensure Gerrit [knows about your commit](#preparing-merges-in-gerrit) for the
parent that is being merged.
6. Modify the merge commit's message to start with `subtree($project_name):`.
Gerrit **will not** allow merge commits that do not follow this format.
7. Push your subtree commit for review as normal.
## Import with continuous history
This approach imports the history using `josh`, which means that external
history before/after the import is consistent (you can continue committing in
`depot`, export the history back out, and from an external perspective nothing
changes).
This is what we did with repositories like `nix-1p` and `nixery`.
Note: Inside of depot, the pre-import commit hashes will **not make sense**.
`josh` will rewrite them in such a way that exporting the project will yield the
same hashes, but this rewriting changes the hashes of your commits inside of
depot.
1. Pick a location in depot where you want your project to be (`$loc`).
2. Fetch your project into the same git store as your depot clone (e.g. by
adding it as an upstream and fetching it).
3. Check out the commit you want to merge into depot.
4. Run `josh-filter ":prefix=$loc"`, and take note of the `FILTERED_HEAD` ref
that it produces (`$filtered` from now on).
5. Ensure Gerrit [knows about the filtered commit](#preparing-merges-in-gerrit).
6. Merge the filtered commit into depot using a standard merge, but make sure to
add the `--allow-unrelated-histories` flag. Your commit message **must**
start with `subtree($project_name):`, otherwise Gerrit will not let you push
a merge.
7. Push the merge commit for review as usual.
------------------------------------------------------
## Preparing merges in Gerrit
When pushing a merge to Gerrit, it needs to know about all ancestors of the
merge, otherwise it will try to interpret commits as new CLs and reject them for
not having a change ID (or create a huge number of CLs, if they do have one).
To prevent this, we have a special git ref called `subtree-staging` which you
can push external trees to.
Access to `subtree-staging` has to be granted by a TVL admin, so ping tazjin,
lukegb, flokli, sterni and so on before proceeding.
1. Determine the commit you want to merge (`$commit`).
2. Run `git push -f $commit origin/subtree-staging` (or replace `origin` with
whatever the TVL Gerrit remote is called in your clone).

View file

@ -1,4 +1,4 @@
# This file was @generated by crate2nix 0.12.0 with the command:
# This file was @generated by crate2nix 0.14.1 with the command:
# "generate"
# See https://github.com/kolloch/crate2nix for more info.
@ -13,6 +13,8 @@
, rootFeatures ? [ "default" ]
# If true, throw errors instead of issueing deprecation warnings.
, strictDeprecation ? false
# Elements to add to the `-C target-feature=` argument passed to `rustc`
# (separated by `,`, prefixed with `+`).
# Used for conditional compilation based on CPU feature detection.
, targetFeatures ? [ ]
# Whether to perform release builds: longer compile times, faster binaries.
@ -155,6 +157,7 @@ rec {
version = "0.1.1";
edition = "2018";
sha256 = "1w7ynjxrfs97xg3qlcdns4kgfpwcdv824g611fq32cag4cdr96g9";
libName = "android_tzdata";
authors = [
"RumovZ"
];
@ -393,6 +396,7 @@ rec {
version = "0.1.10";
edition = "2018";
sha256 = "08h80ihs74jcyp24cd75wwabygbbdgl05k6p5dmq8akbr78vv1a7";
libName = "cfg_if";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
@ -407,6 +411,7 @@ rec {
version = "1.0.0";
edition = "2018";
sha256 = "1za0vb97n4brpzpv8lsbnzmq5r8f2b0cpqqr0sy8h5bn751xxwds";
libName = "cfg_if";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
@ -572,6 +577,7 @@ rec {
version = "0.9.4";
edition = "2018";
sha256 = "13zvbbj07yk3b61b8fhwfzhy35535a583irf23vlcg59j7h9bqci";
libName = "core_foundation";
authors = [
"The Servo Project Developers"
];
@ -603,6 +609,7 @@ rec {
version = "0.8.6";
edition = "2018";
sha256 = "13w6sdf06r0hn7bx2b45zxsg1mm2phz34jikm6xc5qrbr6djpsh6";
libName = "core_foundation_sys";
authors = [
"The Servo Project Developers"
];
@ -615,12 +622,7 @@ rec {
crateName = "crimp";
version = "4087.0.0";
edition = "2015";
# We can't filter paths with references in Nix 2.4
# See https://github.com/NixOS/nix/issues/5410
src =
if ((lib.versionOlder builtins.nixVersion "2.4pre20211007") || (lib.versionOlder "2.5" builtins.nixVersion))
then lib.cleanSourceWith { filter = sourceFilter; src = ../../net/crimp; }
else ../../net/crimp;
src = lib.cleanSourceWith { filter = sourceFilter; src = ../../net/crimp; };
authors = [
"Vincent Ambo <tazjin@tvl.su>"
];
@ -653,6 +655,7 @@ rec {
version = "0.7.4";
edition = "2015";
sha256 = "1v99xcdjk4zixvxnq7pssip670mlyhw1ma3qc88ca11jxnfz43y2";
libName = "crossbeam_deque";
authors = [
"The Crossbeam Project Developers"
];
@ -677,6 +680,7 @@ rec {
version = "0.8.2";
edition = "2015";
sha256 = "1knsf0zz7rgzxn0nwz5gajjcrivxpw3zrdcp946gdhdgr9sd53h5";
libName = "crossbeam_epoch";
authors = [
"The Crossbeam Project Developers"
];
@ -729,6 +733,7 @@ rec {
version = "0.2.3";
edition = "2015";
sha256 = "0w15z68nz3ac4f2s4djhwha8vmlwsh9dlfrmsl4x84y2ah5acjvp";
libName = "crossbeam_queue";
authors = [
"The Crossbeam Project Developers"
];
@ -759,6 +764,7 @@ rec {
version = "0.7.2";
edition = "2015";
sha256 = "1a31wbrda1320gj2a6az1lin2d34xfc3xf88da4c17qy5lxcgiy3";
libName = "crossbeam_utils";
authors = [
"The Crossbeam Project Developers"
];
@ -1331,6 +1337,7 @@ rec {
version = "0.3.2";
edition = "2015";
sha256 = "1cgk0vyd7r45cj769jym4a6s7vwshvd0z4bqrb92q1fwibmkkwzn";
libName = "foreign_types";
authors = [
"Steven Fackler <sfackler@gmail.com>"
];
@ -1347,6 +1354,7 @@ rec {
version = "0.1.1";
edition = "2015";
sha256 = "0jxgzd04ra4imjv8jgkmdq59kj8fsz6w4zxsbmlai34h26225c00";
libName = "foreign_types_shared";
authors = [
"Steven Fackler <sfackler@gmail.com>"
];
@ -1357,6 +1365,7 @@ rec {
version = "0.3.3";
edition = "2015";
sha256 = "10jxc5ks1x06gpd0xg51kcjrxr35nj6qhx2zlc5n7bmskv3675rf";
libName = "fuchsia_zircon";
authors = [
"Raph Levien <raph@google.com>"
];
@ -1377,6 +1386,7 @@ rec {
version = "0.3.3";
edition = "2015";
sha256 = "19zp2085qsyq2bh1gvcxq1lb8w6v6jj9kbdkhpdjrl95fypakjix";
libName = "fuchsia_zircon_sys";
authors = [
"Raph Levien <raph@google.com>"
];
@ -1455,6 +1465,7 @@ rec {
version = "0.1.19";
edition = "2018";
sha256 = "0cxcm8093nf5fyn114w8vxbrbcyvv91d4015rdnlgfll7cs6gd32";
libName = "hermit_abi";
authors = [
"Stefan Lankes"
];
@ -1477,6 +1488,7 @@ rec {
version = "0.3.9";
edition = "2021";
sha256 = "092hxjbjnq5fmz66grd9plxd0sh6ssg5fhgwwwqbrzgzkjwdycfj";
libName = "hermit_abi";
authors = [
"Stefan Lankes"
];
@ -1509,6 +1521,7 @@ rec {
version = "0.1.60";
edition = "2018";
sha256 = "0hdid5xz3jznm04lysjm3vi93h3c523w0hcc3xba47jl3ddbpzz7";
libName = "iana_time_zone";
authors = [
"Andrew Straw <strawman@astraw.com>"
"René Kijewski <rene.kijewski@fu-berlin.de>"
@ -1554,6 +1567,7 @@ rec {
version = "0.1.2";
edition = "2018";
sha256 = "17r6jmj31chn7xs9698r122mapq85mfnv98bb4pg6spm0si2f67k";
libName = "iana_time_zone_haiku";
authors = [
"René Kijewski <crates.io@k6i.de>"
];
@ -1688,6 +1702,7 @@ rec {
version = "0.3.69";
edition = "2018";
sha256 = "0v99rz97asnzapb0jsc3jjhvxpfxr7h7qd97yqyrf9i7viimbh99";
libName = "js_sys";
authors = [
"The wasm-bindgen Developers"
];
@ -1772,6 +1787,7 @@ rec {
edition = "2018";
links = "z";
sha256 = "1xj89rjhk642x8271xr9phj7da7ivwyvd5g8fmb7ma5asgsk2xq3";
libName = "libz_sys";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
"Josh Triplett <josh@joshtriplett.org>"
@ -1811,6 +1827,7 @@ rec {
version = "0.3.0";
edition = "2015";
sha256 = "1kaf95grvfqchxn8pl0854g8ab0fzl56217hndhhhz5qqm2j09kd";
libName = "linked_hash_map";
authors = [
"Stepan Koltsov <stepan.koltsov@gmail.com>"
"Andrew Paseltiner <apaseltiner@gmail.com>"
@ -1840,6 +1857,7 @@ rec {
version = "0.5.6";
edition = "2015";
sha256 = "03vpgw7x507g524nx5i1jf5dl8k3kv0fzg8v3ip6qqwbpkqww5q7";
libName = "linked_hash_map";
authors = [
"Stepan Koltsov <stepan.koltsov@gmail.com>"
"Andrew Paseltiner <apaseltiner@gmail.com>"
@ -1856,6 +1874,7 @@ rec {
version = "0.4.13";
edition = "2021";
sha256 = "172k2c6422gsc914ig8rh99mb9yc7siw6ikc3d9xw1k7vx0s3k81";
libName = "linux_raw_sys";
authors = [
"Dan Gohman <dev@sunfishcode.online>"
];
@ -1943,6 +1962,7 @@ rec {
version = "2.0.0";
edition = "2015";
sha256 = "004y0nzmpfdrhz251278341z6ql34iv1k6dp1h6af7d6nd6jwc30";
libName = "maybe_uninit";
authors = [
"est31 <MTest31@outlook.com>"
"The Rust Project Developers"
@ -2082,6 +2102,7 @@ rec {
version = "0.6.8";
edition = "2015";
sha256 = "1w36w09gd8as1mah80wdy0kgpshmphmljj68gij34hvdnag6kjxg";
libName = "mio_uds";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
@ -2138,6 +2159,7 @@ rec {
version = "0.2.11";
edition = "2015";
sha256 = "0bmrlg0fmzxaycjpkgkchi93av07v2yf9k33gc12ca9gqdrn28h7";
libName = "native_tls";
authors = [
"Steven Fackler <sfackler@gmail.com>"
];
@ -2271,6 +2293,7 @@ rec {
version = "0.1.43";
edition = "2015";
sha256 = "0c9whknf2dm74a3cqirafy6gj83a76gl56g4v3g19k6lkwz13rcj";
libName = "num_traits";
authors = [
"The Rust Project Developers"
];
@ -2287,6 +2310,7 @@ rec {
version = "0.2.18";
edition = "2018";
sha256 = "0yjib8p2p9kzmaz48xwhs69w5dh1wipph9jgnillzd2x33jz03fs";
libName = "num_traits";
authors = [
"The Rust Project Developers"
];
@ -2427,6 +2451,7 @@ rec {
edition = "2018";
sha256 = "173xxvfc63rr5ybwqwylsir0vq6xsj4kxiv4hmg4c3vscdmncj59";
procMacro = true;
libName = "openssl_macros";
dependencies = [
{
name = "proc-macro2";
@ -2449,6 +2474,7 @@ rec {
version = "0.1.5";
edition = "2015";
sha256 = "1kq18qm48rvkwgcggfkqq6pm948190czqc94d6bm2sir5hq1l0gz";
libName = "openssl_probe";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
@ -2461,6 +2487,7 @@ rec {
links = "openssl";
sha256 = "1zwd35nc5bq7m26vjsmja4hxf3fzk389blgpmhpzr3p78krv18nx";
build = "build/main.rs";
libName = "openssl_sys";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
"Steven Fackler <sfackler@gmail.com>"
@ -2655,12 +2682,7 @@ rec {
requiredFeatures = [ ];
}
];
# We can't filter paths with references in Nix 2.4
# See https://github.com/NixOS/nix/issues/5410
src =
if ((lib.versionOlder builtins.nixVersion "2.4pre20211007") || (lib.versionOlder "2.5" builtins.nixVersion))
then lib.cleanSourceWith { filter = sourceFilter; src = ./.; }
else ./.;
src = lib.cleanSourceWith { filter = sourceFilter; src = ./.; };
authors = [
"eeeeeta <eta@theta.eu.org>"
];
@ -2723,6 +2745,7 @@ rec {
version = "0.3.30";
edition = "2015";
sha256 = "1v07557dj1sa0aly9c90wsygc0i8xv5vnmyv0g94lpkvj8qb4cfj";
libName = "pkg_config";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
@ -2733,6 +2756,7 @@ rec {
version = "0.2.17";
edition = "2018";
sha256 = "1pp6g52aw970adv3x2310n7glqnji96z0a9wiamzw89ibf0ayh2v";
libName = "ppv_lite86";
authors = [
"The CryptoCorrosion Contributors"
];
@ -2764,6 +2788,7 @@ rec {
version = "1.0.78";
edition = "2021";
sha256 = "1bjak27pqdn4f4ih1c9nr3manzyavsgqmf76ygw9k76q8pb2lhp2";
libName = "proc_macro2";
authors = [
"David Tolnay <dtolnay@gmail.com>"
"Alex Crichton <alex@alexcrichton.com>"
@ -2784,6 +2809,7 @@ rec {
version = "1.2.3";
edition = "2015";
sha256 = "1q6za3v78hsspisc197bg3g7rpc989qycy8ypr8ap8igv10ikl51";
libName = "quick_error";
authors = [
"Paul Colomiets <paul@colomiets.name>"
"Colin Kiegel <kiegel@gmx.de>"
@ -3060,6 +3086,7 @@ rec {
version = "0.4.6";
edition = "2021";
sha256 = "1spaq7y4im7s56d1gxa2hi4hzf6dwswb1bv8xyavzya7k25kpf46";
libName = "regex_automata";
authors = [
"The Rust Project Developers"
"Andrew Gallant <jamslam@gmail.com>"
@ -3120,6 +3147,7 @@ rec {
version = "0.8.2";
edition = "2021";
sha256 = "17rd2s8xbiyf6lb4aj2nfi44zqlj98g2ays8zzj2vfs743k79360";
libName = "regex_syntax";
authors = [
"The Rust Project Developers"
"Andrew Gallant <jamslam@gmail.com>"
@ -3147,6 +3175,7 @@ rec {
version = "0.1.23";
edition = "2015";
sha256 = "0xnbk2bmyzshacjm2g1kd4zzv2y2az14bw3sjccq5qkpmsfvn9nn";
libName = "rustc_demangle";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
@ -3323,6 +3352,7 @@ rec {
version = "0.2.7";
edition = "2018";
sha256 = "068s77f9xcpvzl70nsxk8750dzzc6f9pixajhd979815cj0ndg1w";
libName = "scheduled_thread_pool";
authors = [
"Steven Fackler <sfackler@gmail.com>"
];
@ -3339,6 +3369,7 @@ rec {
version = "0.1.2";
edition = "2015";
sha256 = "0a2bn9d2mb07c6l16sadijy4p540g498zddfxyiq4rsqpwrglbrk";
libName = "scoped_tls";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
@ -3361,6 +3392,7 @@ rec {
version = "2.9.2";
edition = "2021";
sha256 = "1pplxk15s5yxvi2m1sz5xfmjibp96cscdcl432w9jzbk0frlzdh5";
libName = "security_framework";
authors = [
"Steven Fackler <sfackler@gmail.com>"
"Kornel <kornel@geekhood.net>"
@ -3407,6 +3439,7 @@ rec {
version = "2.9.1";
edition = "2021";
sha256 = "0yhciwlsy9dh0ps1gw3197kvyqx1bvc4knrhiznhid6kax196cp9";
libName = "security_framework_sys";
authors = [
"Steven Fackler <sfackler@gmail.com>"
"Kornel <kornel@geekhood.net>"
@ -3458,6 +3491,7 @@ rec {
version = "0.7.0";
edition = "2015";
sha256 = "18vhypw6zgccnrlm5ps1pwa0khz7ry927iznpr88b87cagr1v2iq";
libName = "semver_parser";
authors = [
"Steve Klabnik <steve@steveklabnik.com>"
];
@ -3519,6 +3553,7 @@ rec {
version = "0.8.2";
edition = "2015";
sha256 = "0lv1qwis9rr767xv9w27y1g1r71ayf02k2wkypawwlkxsrd3r0qb";
libName = "serde_hjson";
authors = [
"Christian Zangl <laktak@cdak.net>"
];
@ -4022,6 +4057,7 @@ rec {
version = "0.1.2";
edition = "2015";
sha256 = "0swpfngcb331lzggk6j68yks6w0bnw35vpl4hv8p03msc239kci5";
libName = "tokio_codec";
authors = [
"Carl Lerche <me@carllerche.com>"
"Bryan Burgers <bryan@burgers.io>"
@ -4047,6 +4083,7 @@ rec {
version = "0.1.18";
edition = "2015";
sha256 = "1m7zij19xy13wmlb7a1bghvi4vs8s1hlyggnaajvqfj46i9kkcc7";
libName = "tokio_core";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4103,6 +4140,7 @@ rec {
version = "0.1.7";
edition = "2015";
sha256 = "03p2w316ha0irgzvy37njx9hl71133gcrmrq4801w4rzm0r0xpmi";
libName = "tokio_current_thread";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4123,6 +4161,7 @@ rec {
version = "0.1.10";
edition = "2015";
sha256 = "0w8n78d2vixs1vghqc4wy9w0d1h6qkli51c1yzhzbns88n7inbgv";
libName = "tokio_executor";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4143,6 +4182,7 @@ rec {
version = "0.1.7";
edition = "2015";
sha256 = "1x3gkdi5x7bjlzzg7qlnymb549rb546p0nykxsh04qyaw0314yi9";
libName = "tokio_fs";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4173,6 +4213,7 @@ rec {
version = "0.1.13";
edition = "2015";
sha256 = "0x06zyzinans1pn90g6i150lgixijdf1cg8y2gipjd09ms58dz2p";
libName = "tokio_io";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4197,6 +4238,7 @@ rec {
version = "1.1.0";
edition = "2015";
sha256 = "0mg1i39cl8x32wxwbn74hlirks8a6f3g0gfzkb0n0zwbxwvc9gs1";
libName = "tokio_mockstream";
authors = [
"Aaron Weiss <awe@pdgn.co>"
];
@ -4217,6 +4259,7 @@ rec {
version = "0.1.12";
edition = "2015";
sha256 = "0l8klnd41q55f3ialzz0lb7s5bfwa38nh86sa9vai2xsqh75kg09";
libName = "tokio_reactor";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4279,6 +4322,7 @@ rec {
version = "0.1.8";
edition = "2015";
sha256 = "1vkxz0y7qf9sshfpxvn506pvxy4vza8piavd8p64y5n85cam1zpd";
libName = "tokio_sync";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4299,6 +4343,7 @@ rec {
version = "0.1.4";
edition = "2015";
sha256 = "0whzqnkyfym1ipzznibyjl3j9281walq4n0q5xs2xdz3cvniipwq";
libName = "tokio_tcp";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4335,6 +4380,7 @@ rec {
version = "0.1.18";
edition = "2015";
sha256 = "12azq8jm71b7hdm72pxrgqm2879bn6b0fcdl1s7i2k3qh5jhnwnz";
libName = "tokio_threadpool";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4383,6 +4429,7 @@ rec {
version = "0.1.2";
edition = "2015";
sha256 = "1z0fwbh5bm6hdbfm0y17fa5l60na7fl9vbca7wdzz1vp0f0ffcb1";
libName = "tokio_timer";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4403,6 +4450,7 @@ rec {
version = "0.2.13";
edition = "2015";
sha256 = "15pjjj6daks3sii8p24a509b0dapl2kyk740nwfgz59w64nly14k";
libName = "tokio_timer";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4431,6 +4479,7 @@ rec {
version = "0.2.1";
edition = "2015";
sha256 = "0z0gmvv7jrpan6y42p5f5wd48rqcd96igp592w1c5cr573c8qjrm";
libName = "tokio_tls";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4455,6 +4504,7 @@ rec {
version = "0.1.6";
edition = "2015";
sha256 = "10hdcnxdp0dxvj44jl1nrrpg30jbisqclbqs0f5w6f8bc47b3872";
libName = "tokio_udp";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4495,6 +4545,7 @@ rec {
version = "0.2.7";
edition = "2015";
sha256 = "1q74sydx22l4mkmrz02l4i5swddwr1pryxvhrzdwkj0i86na8mxb";
libName = "tokio_uds";
authors = [
"Carl Lerche <me@carllerche.com>"
];
@ -4563,6 +4614,7 @@ rec {
version = "1.0.12";
edition = "2018";
sha256 = "0jzf1znfpb2gx8nr8mvmyqs1crnv79l57nxnbiszc7xf7ynbjm1k";
libName = "unicode_ident";
authors = [
"David Tolnay <dtolnay@gmail.com>"
];
@ -4573,6 +4625,7 @@ rec {
version = "0.2.4";
edition = "2015";
sha256 = "131dfzf7d8fsr1ivch34x42c2d1ik5ig3g78brxncnn0r1sdyqpr";
libName = "unicode_xid";
authors = [
"erick.tryzelaar <erick.tryzelaar@gmail.com>"
"kwantam <kwantam@gmail.com>"
@ -4623,6 +4676,7 @@ rec {
version = "0.2.92";
edition = "2018";
sha256 = "1a4mcw13nsk3fr8fxjzf9kk1wj88xkfsmnm0pjraw01ryqfm7qjb";
libName = "wasm_bindgen";
authors = [
"The wasm-bindgen Developers"
];
@ -4654,6 +4708,7 @@ rec {
version = "0.2.92";
edition = "2018";
sha256 = "1nj7wxbi49f0rw9d44rjzms26xlw6r76b2mrggx8jfbdjrxphkb1";
libName = "wasm_bindgen_backend";
authors = [
"The wasm-bindgen Developers"
];
@ -4699,6 +4754,7 @@ rec {
edition = "2018";
sha256 = "09npa1srjjabd6nfph5yc03jb26sycjlxhy0c2a1pdrpx4yq5y51";
procMacro = true;
libName = "wasm_bindgen_macro";
authors = [
"The wasm-bindgen Developers"
];
@ -4723,6 +4779,7 @@ rec {
version = "0.2.92";
edition = "2018";
sha256 = "1dqv2xs8zcyw4kjgzj84bknp2h76phmsb3n7j6hn396h4ssifkz9";
libName = "wasm_bindgen_macro_support";
authors = [
"The wasm-bindgen Developers"
];
@ -4761,6 +4818,7 @@ rec {
edition = "2018";
links = "wasm_bindgen";
sha256 = "15kyavsrna2cvy30kg03va257fraf9x00ny554vxngvpyaa0q6dg";
libName = "wasm_bindgen_shared";
authors = [
"The wasm-bindgen Developers"
];
@ -4788,12 +4846,12 @@ rec {
{
name = "winapi-i686-pc-windows-gnu";
packageId = "winapi-i686-pc-windows-gnu";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "i686-pc-windows-gnu");
target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "i686-pc-windows-gnu");
}
{
name = "winapi-x86_64-pc-windows-gnu";
packageId = "winapi-x86_64-pc-windows-gnu";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-pc-windows-gnu");
target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "x86_64-pc-windows-gnu");
}
];
features = {
@ -4817,6 +4875,7 @@ rec {
version = "0.4.0";
edition = "2015";
sha256 = "1dmpa6mvcvzz16zg6d5vrfy4bxgg541wxrcip7cnshi06v38ffxc";
libName = "winapi_i686_pc_windows_gnu";
authors = [
"Peter Atashian <retep998@gmail.com>"
];
@ -4827,6 +4886,7 @@ rec {
version = "0.1.6";
edition = "2021";
sha256 = "15i5lm39wd44004i9d5qspry2cynkrpvwzghr6s2c3dsk28nz7pj";
libName = "winapi_util";
authors = [
"Andrew Gallant <jamslam@gmail.com>"
];
@ -4845,6 +4905,7 @@ rec {
version = "0.4.0";
edition = "2015";
sha256 = "0gqq64czqb64kskjryj8isp62m2sgvx25yyj3kpc2myh85w24bki";
libName = "winapi_x86_64_pc_windows_gnu";
authors = [
"Peter Atashian <retep998@gmail.com>"
];
@ -4855,6 +4916,7 @@ rec {
version = "0.52.0";
edition = "2021";
sha256 = "1nc3qv7sy24x0nlnb32f7alzpd6f72l4p24vl65vydbyil669ark";
libName = "windows_core";
authors = [
"Microsoft"
];
@ -4872,6 +4934,7 @@ rec {
version = "0.52.0";
edition = "2021";
sha256 = "0gd3v4ji88490zgb6b5mq5zgbvwv7zx1ibn8v3x83rwcdbryaar8";
libName = "windows_sys";
authors = [
"Microsoft"
];
@ -5119,6 +5182,7 @@ rec {
version = "0.48.5";
edition = "2018";
sha256 = "034ljxqshifs1lan89xwpcy1hp0lhdh4b5n0d2z4fwjx2piacbws";
libName = "windows_targets";
authors = [
"Microsoft"
];
@ -5126,7 +5190,7 @@ rec {
{
name = "windows_aarch64_gnullvm";
packageId = "windows_aarch64_gnullvm 0.48.5";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "aarch64-pc-windows-gnullvm");
target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "aarch64-pc-windows-gnullvm");
}
{
name = "windows_aarch64_msvc";
@ -5151,7 +5215,7 @@ rec {
{
name = "windows_x86_64_gnullvm";
packageId = "windows_x86_64_gnullvm 0.48.5";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-pc-windows-gnullvm");
target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "x86_64-pc-windows-gnullvm");
}
{
name = "windows_x86_64_msvc";
@ -5166,6 +5230,7 @@ rec {
version = "0.52.4";
edition = "2021";
sha256 = "06sdd7fin3dj9cmlg6n1dw0n1l10jhn9b8ckz1cqf0drb9z7plvx";
libName = "windows_targets";
authors = [
"Microsoft"
];
@ -5173,7 +5238,7 @@ rec {
{
name = "windows_aarch64_gnullvm";
packageId = "windows_aarch64_gnullvm 0.52.4";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "aarch64-pc-windows-gnullvm");
target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "aarch64-pc-windows-gnullvm");
}
{
name = "windows_aarch64_msvc";
@ -5198,7 +5263,7 @@ rec {
{
name = "windows_x86_64_gnullvm";
packageId = "windows_x86_64_gnullvm 0.52.4";
target = { target, features }: (pkgs.rust.lib.toRustTarget stdenv.hostPlatform == "x86_64-pc-windows-gnullvm");
target = { target, features }: (stdenv.hostPlatform.rust.rustcTarget == "x86_64-pc-windows-gnullvm");
}
{
name = "windows_x86_64_msvc";
@ -5376,6 +5441,7 @@ rec {
version = "0.4.5";
edition = "2018";
sha256 = "118wbqrr4n6wgk5rjjnlrdlahawlxc1bdsx146mwk8f79in97han";
libName = "yaml_rust";
authors = [
"Yuheng Chen <yuhengchen@sensetime.com>"
];
@ -5402,14 +5468,11 @@ rec {
fuchsia = true;
test = false;
/* We are choosing an arbitrary rust version to grab `lib` from,
which is unfortunate, but `lib` has been version-agnostic the
whole time so this is good enough for now.
*/
os = pkgs.rust.lib.toTargetOs platform;
arch = pkgs.rust.lib.toTargetArch platform;
family = pkgs.rust.lib.toTargetFamily platform;
vendor = pkgs.rust.lib.toTargetVendor platform;
inherit (platform.rust.platform)
arch
os
vendor;
family = platform.rust.platform.target-family;
env = "gnu";
endian =
if platform.parsed.cpu.significantByte.name == "littleEndian"
@ -5486,6 +5549,7 @@ rec {
(
_: {
buildTests = true;
release = false;
}
);
# If the user hasn't set any pre/post commands, we don't want to
@ -5498,41 +5562,41 @@ rec {
testPostRun
]);
in
pkgs.runCommand "run-tests-${testCrate.name}"
{
inherit testCrateFlags;
buildInputs = testInputs;
} ''
set -e
pkgs.stdenvNoCC.mkDerivation {
name = "run-tests-${testCrate.name}";
export RUST_BACKTRACE=1
inherit (crate) src;
# recreate a file hierarchy as when running tests with cargo
inherit testCrateFlags;
# the source for test data
${pkgs.buildPackages.xorg.lndir}/bin/lndir ${crate.src}
buildInputs = testInputs;
# build outputs
testRoot=target/debug
mkdir -p $testRoot
buildPhase = ''
set -e
export RUST_BACKTRACE=1
# executables of the crate
# we copy to prevent std::env::current_exe() to resolve to a store location
for i in ${crate}/bin/*; do
cp "$i" "$testRoot"
done
chmod +w -R .
# build outputs
testRoot=target/debug
mkdir -p $testRoot
# test harness executables are suffixed with a hash, like cargo does
# this allows to prevent name collision with the main
# executables of the crate
hash=$(basename $out)
for file in ${drv}/tests/*; do
f=$testRoot/$(basename $file)-$hash
cp $file $f
${testCommand}
done
'';
# executables of the crate
# we copy to prevent std::env::current_exe() to resolve to a store location
for i in ${crate}/bin/*; do
cp "$i" "$testRoot"
done
chmod +w -R .
# test harness executables are suffixed with a hash, like cargo does
# this allows to prevent name collision with the main
# executables of the crate
hash=$(basename $out)
for file in ${drv}/tests/*; do
f=$testRoot/$(basename $file)-$hash
cp $file $f
${testCommand}
done
'';
};
in
pkgs.runCommand "${crate.name}-linked"
{
@ -5641,7 +5705,7 @@ rec {
let
self = {
crates = lib.mapAttrs (packageId: value: buildByPackageIdForPkgsImpl self pkgs packageId) crateConfigs;
target = makeTarget pkgs.stdenv.hostPlatform;
target = makeTarget stdenv.hostPlatform;
build = mkBuiltByPackageIdByPkgs pkgs.buildPackages;
};
in
@ -5716,8 +5780,6 @@ rec {
buildRustCrateForPkgsFunc pkgs
(
crateConfig // {
# https://github.com/NixOS/nixpkgs/issues/218712
dontStrip = stdenv.hostPlatform.isDarwin;
src = crateConfig.src or (
pkgs.fetchurl rec {
name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz";

View file

@ -1,6 +1,7 @@
{ makeSetupHook }:
makeSetupHook {
makeSetupHook
{
name = "rules_java_bazel_hook";
substitutions = {
local_java = ./local_java;

View file

@ -37,7 +37,9 @@ let
cp -R . $out
'';
};
in makeSetupHook {
in
makeSetupHook
{
name = "bazelbuild-rules_nodejs-5-hook";
propagatedBuildInputs = [
nodejs

View file

@ -16,12 +16,16 @@
let
cleanAttrs = lib.flip removeAttrs [
"bazelTargets" "depsHash" "extraCacheInstall" "extraBuildSetup" "extraBuildInstall"
"bazelTargets"
"depsHash"
"extraCacheInstall"
"extraBuildSetup"
"extraBuildInstall"
];
attrs = cleanAttrs baseAttrs;
base = stdenv.mkDerivation (attrs // {
nativeBuildInputs = (attrs.nativeBuildInputs or []) ++ [
nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ [
bazel
];
@ -69,7 +73,7 @@ let
inherit cache;
nativeBuildInputs = (base.nativeBuildInputs or []) ++ [
nativeBuildInputs = (base.nativeBuildInputs or [ ]) ++ [
coreutils
];
@ -102,4 +106,5 @@ let
runHook postInstall
'';
});
in build
in
build

View file

@ -1 +0,0 @@
sterni

View file

@ -99,11 +99,7 @@ rec {
#
# See //nix/dependency-analyzer for documentation on the structure of `targetDepMap`.
getTargetPipelineDeps = targetDepMap: drvPath:
# Sanity check: We should only call this function on targets explicitly
# passed to mkPipeline. Thus it should have been passed as a “known” drv to
# dependency-analyzer.
assert targetDepMap.${drvPath}.known;
builtins.map keyForDrv targetDepMap.${drvPath}.knownDeps;
builtins.map keyForDrv (targetDepMap.${drvPath}.knownDeps or [ ]);
# Create a pipeline step from a single target.
mkStep = { headBranch, parentTargetMap, targetDepMap, target, cancelOnBuildFailing }:
@ -231,7 +227,19 @@ rec {
buildEnabled = elem "build" enabledPhases;
# Dependency relations between the `drvTargets`. See also //nix/dependency-analyzer.
targetDepMap = dependency-analyzer (dependency-analyzer.drvsToPaths drvTargets);
targetDepMap =
let
# Only calculate dependencies between drvTargets that were not part of
# the previous pipeline (per parentTargetMap). Unchanged targets will
# be skipped (assumed already built), so it's useless to emit deps
# on their steps.
changedDrvTargets = builtins.filter
(target:
parentTargetMap.${mkLabel target}.drvPath or null != target.drvPath
)
drvTargets;
in
dependency-analyzer (dependency-analyzer.drvsToPaths changedDrvTargets);
# Convert a target into all of its steps, separated by build
# phase (as phases end up in different chunks).

View file

@ -259,12 +259,12 @@ in
, args
, filter ? (_parts: x: x)
, scopedArgs ? { }
, rootDir ? true
}:
readTree {
inherit args scopedArgs;
inherit args scopedArgs rootDir;
argsFilter = filter;
initPath = path;
rootDir = true;
parts = [ ];
};

View file

@ -17,7 +17,7 @@ let
+ pipe tree [
(mapAttrsToList (k: v:
if isPathLike v then
"cp -R --reflink=auto ${v} \"$out/\"${esc path}/${esc k}"
"cp -R --reflink=auto ${esc "${v}"} \"$out/\"${esc path}/${esc k}"
else if lib.isAttrs v then
writeTreeAtPath (path + "/" + k) v
else

View file

@ -23,7 +23,6 @@ let
{ name
, dependencies ? [ ]
, doCheck ? true
,
}: src:
(if doCheck then testRustSimple else pkgs.lib.id)
(pkgs.buildRustCrate ({

View file

@ -1,5 +1,5 @@
# This program is used as a Gerrit hook to trigger builds on
# Buildkite, Sourcegraph reindexing and other maintenance tasks.
# Buildkite and perform other maintenance tasks.
{ depot, ... }:
depot.nix.buildGo.program {

View file

@ -8,7 +8,6 @@
//
// Gerrit (ref-updated) hook:
// - Trigger Buildkite CI builds
// - Trigger SourceGraph repository index updates
//
// Buildkite (post-command) hook:
// - Submit CL verification status back to Gerrit
@ -55,10 +54,6 @@ type config struct {
BuildkiteProject string `json:"buildkiteProject"`
BuildkiteToken string `json:"buildkiteToken"`
GerritChangeName string `json:"gerritChangeName"`
// Optional configuration for Sourcegraph trigger updates.
SourcegraphUrl string `json:"sourcegraphUrl"`
SourcegraphToken string `json:"sourcegraphToken"`
}
// buildTrigger represents the information passed to besadii when it
@ -154,11 +149,6 @@ func loadConfig() (*config, error) {
return nil, fmt.Errorf("invalid 'gerritChangeName': %s", cfg.GerritChangeName)
}
// Rudimentary config validation logic
if cfg.SourcegraphUrl != "" && cfg.SourcegraphToken == "" {
return nil, fmt.Errorf("'SourcegraphToken' must be set if 'SourcegraphUrl' is set")
}
if cfg.Repository == "" || cfg.Branch == "" {
return nil, fmt.Errorf("missing repository configuration (required: repository, branch)")
}
@ -299,26 +289,6 @@ func triggerBuild(cfg *config, log *syslog.Writer, trigger *buildTrigger) error
return nil
}
// Trigger a Sourcegraph repository index update.
//
// https://docs.sourcegraph.com/admin/repo/webhooks
func triggerIndexUpdate(cfg *config, log *syslog.Writer) error {
req, err := http.NewRequest("POST", cfg.SourcegraphUrl, nil)
if err != nil {
return err
}
req.Header.Add("Authorization", "token "+cfg.SourcegraphToken)
_, err = http.DefaultClient.Do(req)
if err != nil {
return fmt.Errorf("failed to trigger Sourcegraph index update: %w", err)
}
log.Info("triggered sourcegraph index update")
return nil
}
// Gerrit passes more flags than we want, but Rob Pike decided[0] in
// 2013 that the Go art project will not allow users to ignore flags
// because he "doesn't like it". This function allows users to ignore
@ -458,13 +428,6 @@ func gerritHookMain(cfg *config, log *syslog.Writer, trigger *buildTrigger) {
if err != nil {
log.Err(fmt.Sprintf("failed to trigger Buildkite build: %s", err))
}
if cfg.SourcegraphUrl != "" && trigger.ref == cfg.Branch {
err = triggerIndexUpdate(cfg, log)
if err != nil {
log.Err(fmt.Sprintf("failed to trigger sourcegraph index update: %s", err))
}
}
}
func postCommandMain(cfg *config) {

View file

@ -8,7 +8,9 @@ terraform {
}
backend "s3" {
endpoint = "https://objects.dc-sto1.glesys.net"
endpoints = {
s3 = "https://objects.dc-sto1.glesys.net"
}
bucket = "tvl-state"
key = "terraform/tvl-buildkite"
region = "glesys"
@ -16,6 +18,8 @@ terraform {
skip_credentials_validation = true
skip_region_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_s3_checksum = true
}
}

View file

@ -4,18 +4,18 @@ version = 3
[[package]]
name = "aho-corasick"
version = "1.1.2"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
[[package]]
name = "anyhow"
version = "1.0.75"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "base64"
@ -25,9 +25,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
[[package]]
name = "bitflags"
version = "2.4.1"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07"
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
[[package]]
name = "build-env"
@ -37,11 +37,11 @@ checksum = "e068f31938f954b695423ecaf756179597627d0828c0d3e48c0a722a8b23cf9e"
[[package]]
name = "cc"
version = "1.0.84"
version = "1.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f8e7c90afad890484a21653d08b6e209ae34770fb5ee298f9c699fcc1e5c856"
checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6"
dependencies = [
"libc",
"shlex",
]
[[package]]
@ -73,9 +73,9 @@ dependencies = [
[[package]]
name = "curl"
version = "0.4.44"
version = "0.4.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22"
checksum = "1e2161dd6eba090ff1594084e95fd67aeccf04382ffea77999ea94ed42ec67b6"
dependencies = [
"curl-sys",
"libc",
@ -83,14 +83,14 @@ dependencies = [
"openssl-sys",
"schannel",
"socket2",
"winapi",
"windows-sys 0.52.0",
]
[[package]]
name = "curl-sys"
version = "0.4.68+curl-8.4.0"
version = "0.4.74+curl-8.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4a0d18d88360e374b16b2273c832b5e57258ffc1d4aa4f96b108e0738d5752f"
checksum = "8af10b986114528fcdc4b63b6f5f021b7057618411046a4de2ba0f0149a097bf"
dependencies = [
"cc",
"libc",
@ -98,14 +98,14 @@ dependencies = [
"openssl-sys",
"pkg-config",
"vcpkg",
"windows-sys",
"windows-sys 0.52.0",
]
[[package]]
name = "deranged"
version = "0.3.9"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3"
checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
dependencies = [
"powerfmt",
"serde",
@ -113,9 +113,9 @@ dependencies = [
[[package]]
name = "env_logger"
version = "0.10.1"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece"
checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580"
dependencies = [
"humantime",
"is-terminal",
@ -124,16 +124,6 @@ dependencies = [
"termcolor",
]
[[package]]
name = "errno"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c18ee0ed65a5f1f81cac6b1d213b69c35fa47d4252ad41f1486dbd8226fe36e"
dependencies = [
"libc",
"windows-sys",
]
[[package]]
name = "foreign-types"
version = "0.3.2"
@ -178,9 +168,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
[[package]]
name = "hermit-abi"
version = "0.3.3"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7"
checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
[[package]]
name = "humantime"
@ -190,20 +180,20 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "is-terminal"
version = "0.4.9"
version = "0.4.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b"
dependencies = [
"hermit-abi",
"rustix",
"windows-sys",
"libc",
"windows-sys 0.52.0",
]
[[package]]
name = "itoa"
version = "1.0.9"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "journaldriver"
@ -224,15 +214,15 @@ dependencies = [
[[package]]
name = "lazy_static"
version = "1.4.0"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.150"
version = "0.2.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"
checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439"
[[package]]
name = "libsystemd-sys"
@ -247,9 +237,9 @@ dependencies = [
[[package]]
name = "libz-sys"
version = "1.1.12"
version = "1.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b"
checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472"
dependencies = [
"cc",
"libc",
@ -257,17 +247,11 @@ dependencies = [
"vcpkg",
]
[[package]]
name = "linux-raw-sys"
version = "0.4.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829"
[[package]]
name = "log"
version = "0.4.20"
version = "0.4.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
[[package]]
name = "medallion"
@ -285,21 +269,27 @@ dependencies = [
[[package]]
name = "memchr"
version = "2.6.4"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167"
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "num-conv"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
[[package]]
name = "once_cell"
version = "1.18.0"
version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
[[package]]
name = "openssl"
version = "0.10.59"
version = "0.10.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33"
checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1"
dependencies = [
"bitflags",
"cfg-if",
@ -329,9 +319,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "openssl-sys"
version = "0.9.95"
version = "0.9.103"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9"
checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6"
dependencies = [
"cc",
"libc",
@ -341,9 +331,9 @@ dependencies = [
[[package]]
name = "pkg-config"
version = "0.3.27"
version = "0.3.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
[[package]]
name = "powerfmt"
@ -353,27 +343,27 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
[[package]]
name = "proc-macro2"
version = "1.0.69"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.33"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
[[package]]
name = "regex"
version = "1.10.2"
version = "1.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343"
checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619"
dependencies = [
"aho-corasick",
"memchr",
@ -383,9 +373,9 @@ dependencies = [
[[package]]
name = "regex-automata"
version = "0.4.3"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f"
checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
dependencies = [
"aho-corasick",
"memchr",
@ -394,52 +384,39 @@ dependencies = [
[[package]]
name = "regex-syntax"
version = "0.8.2"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "rustix"
version = "0.38.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3"
dependencies = [
"bitflags",
"errno",
"libc",
"linux-raw-sys",
"windows-sys",
]
checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
[[package]]
name = "ryu"
version = "1.0.15"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]]
name = "schannel"
version = "0.1.22"
version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88"
checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"
dependencies = [
"windows-sys",
"windows-sys 0.52.0",
]
[[package]]
name = "serde"
version = "1.0.192"
version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001"
checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.192"
version = "1.0.209"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1"
checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170"
dependencies = [
"proc-macro2",
"quote",
@ -448,30 +425,37 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.108"
version = "1.0.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"
checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad"
dependencies = [
"itoa",
"memchr",
"ryu",
"serde",
]
[[package]]
name = "socket2"
version = "0.4.10"
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "socket2"
version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
dependencies = [
"libc",
"winapi",
"windows-sys 0.52.0",
]
[[package]]
name = "syn"
version = "2.0.39"
version = "2.0.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
dependencies = [
"proc-macro2",
"quote",
@ -494,21 +478,22 @@ dependencies = [
[[package]]
name = "termcolor"
version = "1.3.0"
version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64"
checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
dependencies = [
"winapi-util",
]
[[package]]
name = "time"
version = "0.3.30"
version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5"
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"itoa",
"num-conv",
"powerfmt",
"serde",
"time-core",
@ -523,10 +508,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
[[package]]
name = "time-macros"
version = "0.2.15"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20"
checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
"num-conv",
"time-core",
]
@ -548,55 +534,43 @@ version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
"winapi-i686-pc-windows-gnu",
"winapi-x86_64-pc-windows-gnu",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
[[package]]
name = "winapi-util"
version = "0.1.6"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
dependencies = [
"winapi",
"windows-sys 0.59.0",
]
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows-sys"
version = "0.48.0"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.48.5"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
@ -605,42 +579,48 @@ dependencies = [
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.5"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.5"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.48.5"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.48.5"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.5"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.5"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.5"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"

View file

@ -10,20 +10,29 @@ terraform {
}
backend "s3" {
endpoint = "https://objects.dc-sto1.glesys.net"
bucket = "tvl-state"
key = "terraform/tvl-keycloak"
region = "glesys"
endpoints = {
s3 = "https://objects.dc-sto1.glesys.net"
}
bucket = "tvl-state"
key = "terraform/tvl-keycloak"
region = "glesys"
skip_credentials_validation = true
skip_region_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
skip_s3_checksum = true
}
}
provider "keycloak" {
client_id = "terraform"
url = "https://auth.tvl.fyi"
# NOTE: Docs mention this applies to "users of the legacy distribution of keycloak".
# However, we get a "failed to perform initial login to Keycloak: error
# sending POST request to https://auth.tvl.fyi/realms/master/protocol/openid-connect/token: 404 Not Found"
# if we don't set this.
base_path = "/auth"
}
resource "keycloak_realm" "tvl" {

View file

@ -22,6 +22,13 @@ resource "keycloak_ldap_user_federation" "tvl_ldap" {
"inetOrgPerson",
"organizationalPerson",
]
lifecycle {
# Without this, terraform wants to recreate the resource.
ignore_changes = [
delete_default_mappers
]
}
}
# keycloak_oidc_identity_provider.github will be destroyed
@ -29,7 +36,7 @@ resource "keycloak_ldap_user_federation" "tvl_ldap" {
resource "keycloak_oidc_identity_provider" "github" {
alias = "github"
provider_id = "github"
client_id = "6d7f8bb2e82bb6739556"
client_id = "Iv23liXfGNIr7InMg5Uo"
client_secret = var.github_client_secret
realm = keycloak_realm.tvl.id
backchannel_supported = false

View file

@ -29,13 +29,29 @@ func Merge(in1 *map[string]interface{}, in2 *map[string]interface{}) *map[string
return in1
}
// The maps are map[string]interface{} with unknown depth.
// Loop over both maps into every level and merge them.
new := make(map[string]interface{})
for k, v := range *in1 {
new[k] = v
}
for k, v := range *in2 {
new[k] = v
if existing, ok := new[k]; ok {
// If both values are maps, merge them recursively
if existingMap, ok := existing.(map[string]interface{}); ok {
if newMap, ok := v.(map[string]interface{}); ok {
new[k] = *Merge(&existingMap, &newMap)
} else {
new[k] = v
}
} else {
new[k] = v
}
} else {
new[k] = v
}
}
return &new

View file

@ -47,6 +47,9 @@ func TestMergeWithNilMap(t *testing.T) {
func TestMergeMaps(t *testing.T) {
map1 := map[string]interface{}{
"foo": "bar",
"baz": map[string]interface{}{
"qux": "quux",
},
}
map2 := map[string]interface{}{
@ -56,6 +59,9 @@ func TestMergeMaps(t *testing.T) {
result := Merge(&map1, &map2)
expected := map[string]interface{}{
"foo": "bar",
"baz": map[string]interface{}{
"qux": "quux",
},
"bar": "baz",
}

View file

@ -3,6 +3,7 @@
(with depot.ops.machines; [
sanduny
whitby
nixery-01
]) ++
(with depot.users.tazjin.nixos; [

View file

@ -11,8 +11,10 @@ in
imports = [
(mod "atward.nix")
(mod "cgit.nix")
(mod "cheddar.nix")
(mod "clbot.nix")
(mod "gerrit-autosubmit.nix")
(mod "harmonia.nix")
(mod "irccat.nix")
(mod "josh.nix")
(mod "journaldriver.nix")
@ -24,7 +26,6 @@ in
(mod "paroxysm.nix")
(mod "restic.nix")
(mod "smtprelay.nix")
(mod "sourcegraph.nix")
(mod "teleirc.nix")
(mod "tvl-buildkite.nix")
(mod "tvl-slapd/default.nix")
@ -229,12 +230,17 @@ in
grafana.file = secretFile "grafana";
irccat.file = secretFile "irccat";
keycloak-db.file = secretFile "keycloak-db";
nix-cache-priv.file = secretFile "nix-cache-priv";
owothia.file = secretFile "owothia";
panettone.file = secretFile "panettone";
smtprelay.file = secretFile "smtprelay";
teleirc.file = secretFile "teleirc";
nix-cache-priv = {
file = secretFile "nix-cache-priv";
mode = "0440";
group = "harmonia";
};
buildkite-agent-token = {
file = secretFile "buildkite-agent-token";
mode = "0440";
@ -306,6 +312,9 @@ in
agentCount = 32;
};
# Run Markdown/code renderer
services.depot.cheddar.enable = true;
# Start a local SMTP relay to Gmail (used by gerrit)
services.depot.smtprelay = {
enable = true;
@ -374,9 +383,6 @@ in
};
services.depot = {
# Run a SourceGraph code search instance
sourcegraph.enable = true;
# Run a livegrep code search instance
livegrep.enable = true;
@ -477,11 +483,14 @@ in
];
};
services.nix-serve = {
# Run a Harmonia binary cache.
#
# TODO(tazjin): switch to upstream module after fix for Nix 2.3
services.depot.harmonia = {
enable = true;
port = 6443;
secretKeyFile = config.age.secretsDir + "/nix-cache-priv";
bindAddress = "localhost";
signKeyPaths = [ (config.age.secretsDir + "/nix-cache-priv") ];
settings.bind = "127.0.0.1:6443";
settings.priority = 50;
};
services.fail2ban.enable = true;
@ -617,7 +626,8 @@ in
http-port = 5925; # kycl
hostname = "auth.tvl.fyi";
http-relative-path = "/auth";
proxy = "edge";
proxy-headers = "xforwarded";
http-enabled = true;
};
database = {

29
ops/modules/cheddar.nix Normal file
View file

@ -0,0 +1,29 @@
{ depot, config, pkgs, lib, ... }:
let
cfg = config.services.depot.cheddar;
description = "cheddar - markdown/highlighting server";
in
{
options.services.depot.cheddar = with lib; {
enable = mkEnableOption description;
port = mkOption {
description = "Port on which cheddar should listen";
type = types.int;
default = 4238;
};
};
config = lib.mkIf cfg.enable {
systemd.services.cheddar-server = {
inherit description;
wantedBy = [ "multi-user.target" ];
script = "${depot.tools.cheddar}/bin/cheddar --listen 0.0.0.0:${toString cfg.port} --sourcegraph-server";
serviceConfig = {
DynamicUser = true;
Restart = "always";
};
};
};
}

110
ops/modules/harmonia.nix Normal file
View file

@ -0,0 +1,110 @@
# This is a fork of the nixpkgs module for Harmonia, which adds compatibility
# with Nix 2.3.
#
# We will upstream this eventually.
{ config, pkgs, lib, ... }:
let
cfg = config.services.depot.harmonia;
format = pkgs.formats.toml { };
credentials = lib.imap0
(i: signKeyPath: {
id = "sign-key-${builtins.toString i}";
path = signKeyPath;
})
cfg.signKeyPaths;
in
{
options = {
services.depot.harmonia = {
enable = lib.mkEnableOption "Harmonia: Nix binary cache written in Rust";
signKeyPaths = lib.mkOption {
type = lib.types.listOf lib.types.path;
default = [ ];
description = "Paths to the signing keys to use for signing the cache";
};
package = lib.mkPackageOption pkgs "harmonia" { };
settings = lib.mkOption {
inherit (format) type;
default = { };
description = ''
Settings to merge with the default configuration.
For the list of the default configuration, see <https://github.com/nix-community/harmonia/tree/master#configuration>.
'';
};
};
};
config = lib.mkIf cfg.enable {
users.users.harmonia = {
isSystemUser = true;
group = "harmonia";
};
users.groups.harmonia = { };
systemd.services.harmonia = {
description = "harmonia binary cache service";
requires = [ "nix-daemon.socket" ];
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
environment = {
CONFIG_FILE = format.generate "harmonia.toml" cfg.settings;
SIGN_KEY_PATHS = lib.strings.concatMapStringsSep " "
(
credential: "%d/${credential.id}"
)
credentials;
# Note: it's important to set this for nix-store, because it wants to use
# $HOME in order to use a temporary cache dir. bizarre failures will occur
# otherwise
HOME = "/run/harmonia";
};
serviceConfig = {
ExecStart = lib.getExe cfg.package;
User = "harmonia";
Group = "harmonia";
Restart = "on-failure";
PrivateUsers = true;
DeviceAllow = [ "" ];
UMask = "0066";
RuntimeDirectory = "harmonia";
LoadCredential = builtins.map (credential: "${credential.id}:${credential.path}") credentials;
SystemCallFilter = [
"@system-service"
"~@privileged"
"~@resources"
];
CapabilityBoundingSet = "";
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectControlGroups = true;
ProtectKernelLogs = true;
ProtectHostname = true;
ProtectClock = true;
RestrictRealtime = true;
MemoryDenyWriteExecute = true;
ProcSubset = "pid";
ProtectProc = "invisible";
RestrictNamespaces = true;
SystemCallArchitectures = "native";
PrivateNetwork = false;
PrivateTmp = true;
PrivateDevices = true;
PrivateMounts = true;
NoNewPrivileges = true;
ProtectSystem = "strict";
ProtectHome = true;
LockPersonality = true;
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6";
LimitNOFILE = 65536;
};
};
};
}

View file

@ -48,6 +48,8 @@ in
systemd.services.irccat = {
inherit description;
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = {
ExecStart = "${mergeAndLaunch}";

View file

@ -97,6 +97,12 @@ in
link = "https://cl.tvl.fyi/$1";
};
# Auto-link links to monotonically increasing revisions/commits
commentlink.revision = {
match = "r/(\\d+)";
link = "https://code.tvl.fyi/commit/?h=refs/r/$1";
};
# Configures integration with Keycloak, which then integrates with a
# variety of backends.
auth.type = "OAUTH";

View file

@ -1,60 +0,0 @@
# Run sourcegraph, including its entire machinery, in a container.
# Running it outside of a container is a futile endeavour for now.
{ depot, config, pkgs, lib, ... }:
let
cfg = config.services.depot.sourcegraph;
in
{
options.services.depot.sourcegraph = with lib; {
enable = mkEnableOption "SourceGraph code search engine";
port = mkOption {
description = "Port on which SourceGraph should listen";
type = types.int;
default = 3463;
};
cheddarPort = mkOption {
description = "Port on which cheddar should listen";
type = types.int;
default = 4238;
};
};
config = lib.mkIf cfg.enable {
# Run a cheddar syntax highlighting server
systemd.services.cheddar-server = {
wantedBy = [ "multi-user.target" ];
script = "${depot.tools.cheddar}/bin/cheddar --listen 0.0.0.0:${toString cfg.cheddarPort} --sourcegraph-server";
serviceConfig = {
DynamicUser = true;
Restart = "always";
};
};
virtualisation.oci-containers.containers.sourcegraph = {
image = "sourcegraph/server:3.40.0";
ports = [
"127.0.0.1:${toString cfg.port}:7080"
];
volumes = [
"/var/lib/sourcegraph/etc:/etc/sourcegraph"
"/var/lib/sourcegraph/data:/var/opt/sourcegraph"
];
# TODO(tazjin): Figure out what changed in the protocol.
# environment.SRC_SYNTECT_SERVER = "http://172.17.0.1:${toString cfg.cheddarPort}";
# Sourcegraph needs a higher nofile limit, it logs warnings
# otherwise (unclear whether it actually affects the service).
extraOptions = [
"--ulimit"
"nofile=10000:10000"
];
};
};
}

View file

@ -22,11 +22,7 @@
settings = {
server_url = "https://net.tvl.fyi";
dns_config.nameservers = [
"8.8.8.8"
"1.1.1.1"
"77.88.8.8"
];
dns.magic_dns = false;
# TLS is handled by nginx
tls_cert_path = null;

View file

@ -17,13 +17,8 @@
alias /run/agenix/nix-cache-pub;
}
location = /nix-cache-info {
add_header Content-Type text/plain;
return 200 "StoreDir: /nix/store\nWantMassQuery: 1\nPriority: 50\n";
}
location / {
proxy_pass http://localhost:${toString config.services.nix-serve.port};
proxy_pass http://${config.services.depot.harmonia.settings.bind};
}
'';
};

View file

@ -1,3 +1,5 @@
# This configuration redirects from the previous Sourcegraph instance to
# livegrep/cgit where appropriate.
{ config, ... }:
{
@ -13,17 +15,50 @@
forceSSL = true;
extraConfig = ''
location = / {
return 301 https://cs.tvl.fyi/depot;
set $lineno "";
# depot root
location = /depot {
return 301 https://code.tvl.fyi/tree/;
}
# folder/file on canon
location ~ ^/depot/-/(blob|tree)/([^\s]*)$ {
set $path $2;
if ($args ~ ^L(\d+)(-\d+)?$) {
set $lineno "#n$1";
}
return 302 https://code.tvl.fyi/tree/$path$lineno;
}
# folder/file on specific commit
location ~ ^/depot@([a-f0-9]+)/-/(blob|tree)/([^\s]*)$ {
set $commit $1;
set $path $3;
if ($args ~ ^L(\d+)(-\d+)?$) {
set $lineno "#n$1";
}
return 302 https://code.tvl.fyi/tree/$path?id=$commit$lineno;
}
# commit info
location ~ ^/depot/-/commit/([a-f0-9]+)$ {
set $commit $1;
return 302 https://code.tvl.fyi/commit/?id=$commit;
}
# search handler
# This only redirects to the new search, it doesn't try to parse and
# rewrite the query.
location /search {
return 302 https://grep.tvl.fyi/search;
}
location / {
proxy_set_header X-Sg-Auth "Anonymous";
proxy_pass http://localhost:${toString config.services.depot.sourcegraph.port};
}
location /users/Anonymous/settings {
return 301 https://cs.tvl.fyi;
return 404 "TVL code search has moved to grep.tvl.fyi and we could not figure out how to rewrite your query. Sorry!";
}
'';
};

View file

@ -1,54 +0,0 @@
# serve tazjin's website & blog
{ depot, config, lib, pkgs, ... }:
{
imports = [
./base.nix
];
config = {
services.nginx.virtualHosts."tazj.in" = {
enableACME = true;
forceSSL = true;
root = depot.users.tazjin.homepage;
serverAliases = [ "www.tazj.in" ];
extraConfig = ''
location = /en/rss.xml {
return 301 https://tazj.in/feed.atom;
}
${depot.users.tazjin.blog.oldRedirects}
location /blog/ {
alias ${depot.users.tazjin.blog.rendered}/;
if ($request_uri ~ ^/(.*)\.html$) {
return 302 /$1;
}
try_files $uri $uri.html $uri/ =404;
}
location = /predlozhnik {
return 302 https://predlozhnik.ru;
}
# redirect for easier entry on a TV
location = /tv {
return 302 https://tazj.in/blobs/play.html;
}
# Temporary place for serving static files.
location /blobs/ {
alias /var/lib/tazjins-blobs/;
}
'';
};
services.nginx.virtualHosts."git.tazj.in" = {
enableACME = true;
forceSSL = true;
extraConfig = "return 301 https://code.tvl.fyi$request_uri;";
};
};
}

View file

@ -50,7 +50,7 @@ steps:
- label: ":llama:"
key: "pipeline-gen"
concurrency_group: 'depot-nix-eval'
concurrency: 5 # much more than this and whitby will OOM
concurrency: 3 # much more than this and whitby will OOM
command: |
set -ue
@ -88,10 +88,12 @@ steps:
continue_on_failure: true
# Exit with success or failure depending on whether any other steps
# failed.
# failed (but not retried).
#
# This information is checked by querying the Buildkite GraphQL API
# and fetching the count of failed steps.
# and fetching all failed steps, then filtering out the ones that were
# retried (retried jobs create new jobs, which would also show up in the
# query).
#
# This step must be :duck: (yes, really!) because the post-command
# hook will inspect this name.
@ -109,8 +111,8 @@ steps:
readonly FAILED_JOBS=$(curl 'https://graphql.buildkite.com/v1' \
--silent \
-H "Authorization: Bearer $(cat ${BUILDKITE_TOKEN_PATH})" \
-d "{\"query\": \"query BuildStatusQuery { build(uuid: \\\"$BUILDKITE_BUILD_ID\\\") { jobs(passed: false) { count } } }\"}" | \
jq -r '.data.build.jobs.count')
-d "{\"query\": \"query BuildStatusQuery { build(uuid: \\\"$BUILDKITE_BUILD_ID\\\") { jobs(passed: false, first: 500 ) { edges { node { ... on JobTypeCommand { retried } } } } } }\"}" | \
jq -r '.data.build.jobs.edges | map(select(.node.retried == false)) | length')
echo "$$FAILED_JOBS build jobs failed."

Binary file not shown.

View file

@ -21,6 +21,11 @@
email = "root@gws.fyi";
password = "{ARGON2}$argon2id$v=19$m=65536,t=2,p=1$5NEYPJ19nDITK5sGr4bzhQ$Xzpzth6y4w+HGvioHiYgzqFiwMDx0B7HAh+PVbkRuuk";
}
{
username = "azahi";
email = "azat@bahawi.net";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$BVRzgfs8YIorOTq62B00CQ$5UXHyG/Ivn5TqB7UNgfjYJMxTjun3NDvAStWFom4oas";
}
{
username = "chickadee";
email = "matthewktromp@gmail.com";
@ -36,11 +41,21 @@
email = "me@cynthia.re";
password = "{ARGON2}$argon2id$v=19$m=65536,t=4,p=1$TxjbMGenhEmkyYLrg5uGhbr60THB86YeRZg5bPdiTJo$k9gbRlAPjmxwdUwzbavvsAVkckgQZ0jS2oTtvZBPysk";
}
{
username = "domenkozar";
email = "domen@cachix.org";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$c9WgMrTqPJZenOr5+wlnnQ$XOpRZRTkduzP2+NJBxkg2jhffurg7PDla4/RoAyclwI";
}
{
username = "edef";
email = "edef@edef.eu";
password = "{ARGON2}$argon2id$v=19$m=65536,t=2,p=1$OORx4ERbkgvTmuYCJA8cIw$i5qaBzHkRVw7Tl+wZsTFTDqJwF0vuZqhW3VpknMYMc0";
}
{
username = "elle";
email = "lnajt4@gmail.com";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$b5Bfq6u+fEKbtpixOl+yPw$nCyTLbSDYsw30ZiSxhJ6N99IIPQAnS2XRNlpEx9os+0";
}
{
username = "ericvolp12";
email = "ericvolp12@gmail.com";
@ -111,6 +126,16 @@
email = "lukegb@tvl.fyi";
password = "{SSHA}7a85VNhpFElFw+N5xcjgGmt4HnBsaGp4";
}
{
username = "marijan";
email = "marijan.petricevic94@gmail.com";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$KG+6Kx+qi5FA4JmBgIOBDA$bQm9u/9A5VbpVmNuMDqJa+iDCU0JCyboevQ3eEzlMdE";
}
{
username = "mrflos";
email = "mrflos@yeswiki.pro";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$/D1y+6n3+0GigG9mCMqK8A$9PseWm3+QATxN/M3Wu4JM+CnIppLD/LbQaVEKLItv9o";
}
{
username = "noteed";
email = "noteed@gmail.com";
@ -153,6 +178,16 @@
email = "tazjin@tvl.su";
password = "{ARGON2}$argon2id$v=19$m=65536,t=2,p=1$wOPEl9D3kSke//oLtbvqrg$j0npwwXgaXQ/emefKUwL59tH8hdmtzbgH2rQzWSmE2Y";
}
{
username = "thk";
email = "thomas@koch.ro";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$WFP0HGCiY5IV6OOWEqM0zA$BkmBq2rLv59YyulsY25hlt9LYTpI7zLrJjGHiBN5MIc";
}
{
username = "yl3dy";
email = "aleksandr.kiselyov@gmail.com";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$vPvOa0/7RzDLuD/icQuIzQ$IVMSI7hh/frihuL11sNRj6Jz8TTn1wZZHjZZGszz3pI";
}
{
username = "implr";
email = "implr@hackerspace.pl";
@ -254,4 +289,29 @@
email = "toastal@posteo.net";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$txwVjPn9kKPUgsZnPtpyaA$pE0ISDGScCE4JCKcmbnzC+GZZ4PP6MqKJKmR/sxo6TY";
}
{
username = "sinavir";
email = "tvix@sinavir.fr";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$5GXvoN/enVljV97yE/Zasg$OrgY9/ge2LoxNm9OOqxh/kKLxoAvU54MbQa9WWiT0jY";
}
{
username = "emery";
email = "emery@dmz.rs";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$b2k5UpTJafqM7yjHfVRjBg$zFGy/ZeI9Hb71TUfJwFp7qDKyUl8tdyFDUK1uNBYfUI";
}
{
username = "aziz";
email = "abd.aziz89@gmail.com";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$xTvdtTF+gavMfF8556CiiQ$IshnauhlEr80skpv5s6ueJLkQxlynzBt6oCp3cQrNCY";
}
{
username = "nikiv";
email = "nikita@nikiv.dev";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$79mMAD2XYa5dg7D9ueWMpw$Edf5WODrFpkNDyWaMdLKcgcErFLx4khmPIk8wzmYGUE";
}
{
username = "ein-shved";
email = "mestofel13@gmail.com";
password = "{ARGON2}$argon2id$v=19$m=19456,t=2,p=1$D4wzfJoyFye48QNdrC66VA$aBJ/ZaL+rTgXoQa/nFdpHap3G/Oju8WlHaWTii95X8E";
}
]

47
third_party/chicago95/default.nix vendored Normal file
View file

@ -0,0 +1,47 @@
# A rendition of everyone's favourite computer theme.
{ pkgs, ... }:
let
# Chicago95 has no GTK-4 theme (because GTK-4 removed important features that
# it needs), but there is a project with an approximation.
#
# This is a bit of a hack, but I inject that project's GTK-4 theme as if it
# was a part of Chicago95.
#
# This other project is GPL-3.0, under which Chicago95 is also distributed.
gtk4ProjectSrc = pkgs.fetchFromGitHub {
owner = "B00merang-Project";
repo = "Windows-95";
rev = "055abd7a3608afdcb2ef021732e07020f2b416b2";
hash = "sha256:1li6wzyn3y09d188xki1h96pmn4xcx2lklfc4rkiq2y2r22wx7kz";
};
in
pkgs.stdenvNoCC.mkDerivation {
pname = "Chicago95";
version = "master";
src = pkgs.fetchFromGitHub {
owner = "grassmunk";
repo = "Chicago95";
rev = "bdf5cf36a16102aaac297f3de887c601c2b1146f";
hash = "sha256:11fsy3bam1rhp1292zflvzmf1432z1p0ncwy3601wl2f8rnvfdfm";
};
# The project has a Makefile, but it's broken in all sorts of ways, so we just
# copy the important stuff manually.
dontBuild = true;
installPhase = ''
mkdir -p $out/share/{icons,fonts,themes,sounds,qt5ct/colors}
cp -r Theme/Chicago95 $out/share/themes
cp -r Icons/* $out/share/icons
cp -r Cursors/* $out/share/icons
cp -r Fonts/* $out/share/fonts
cp Extras/Chicago95_qt.conf $out/share/qt5ct/colors
cp -r ${gtk4ProjectSrc}/gtk-4.0 $out/share/themes/Chicago95
'';
meta.license = pkgs.lib.licenses.gpl3;
}

View file

@ -1,12 +0,0 @@
# Users of this package & module should replace it with something like
# inadyn, after https://github.com/NixOS/nixpkgs/issues/242330 is
# landed.
#
# TODO(aspen): replace ddclient with inadyn or something else.
{ pkgs, ... }:
(pkgs.callPackage ./pkg.nix { }).overrideAttrs (old: {
passthru = old.passthru // {
module = ./module.nix;
};
})

View file

@ -1,230 +0,0 @@
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: Copyright (c) 2003-2023 The Nixpkgs/NixOS contributors
{ config, pkgs, lib, ... }:
let
cfg = config.services.deprecated-ddclient;
boolToStr = bool: if bool then "yes" else "no";
dataDir = "/var/lib/ddclient";
StateDirectory = builtins.baseNameOf dataDir;
RuntimeDirectory = StateDirectory;
configFile' = pkgs.writeText "ddclient.conf" ''
# This file can be used as a template for configFile or is automatically generated by Nix options.
cache=${dataDir}/ddclient.cache
foreground=YES
use=${cfg.use}
login=${cfg.username}
password=${if cfg.protocol == "nsupdate" then "/run/${RuntimeDirectory}/ddclient.key" else "@password_placeholder@"}
protocol=${cfg.protocol}
${lib.optionalString (cfg.script != "") "script=${cfg.script}"}
${lib.optionalString (cfg.server != "") "server=${cfg.server}"}
${lib.optionalString (cfg.zone != "") "zone=${cfg.zone}"}
ssl=${boolToStr cfg.ssl}
wildcard=YES
quiet=${boolToStr cfg.quiet}
verbose=${boolToStr cfg.verbose}
${cfg.extraConfig}
${lib.concatStringsSep "," cfg.domains}
'';
configFile = if (cfg.configFile != null) then cfg.configFile else configFile';
preStart = ''
install --mode=600 --owner=$USER ${configFile} /run/${RuntimeDirectory}/ddclient.conf
${lib.optionalString (cfg.configFile == null) (if (cfg.protocol == "nsupdate") then ''
install --mode=600 --owner=$USER ${cfg.passwordFile} /run/${RuntimeDirectory}/ddclient.key
'' else if (cfg.passwordFile != null) then ''
"${pkgs.replace-secret}/bin/replace-secret" "@password_placeholder@" "${cfg.passwordFile}" "/run/${RuntimeDirectory}/ddclient.conf"
'' else ''
sed -i '/^password=@password_placeholder@$/d' /run/${RuntimeDirectory}/ddclient.conf
'')}
'';
in
with lib;
{
###### interface
options = {
services.deprecated-ddclient = with lib.types; {
enable = mkOption {
default = false;
type = bool;
description = lib.mdDoc ''
Whether to synchronise your machine's IP address with a dynamic DNS provider (e.g. dyndns.org).
'';
};
package = mkOption {
type = package;
default = pkgs.ddclient;
defaultText = lib.literalExpression "pkgs.ddclient";
description = lib.mdDoc ''
The ddclient executable package run by the service.
'';
};
domains = mkOption {
default = [ "" ];
type = listOf str;
description = lib.mdDoc ''
Domain name(s) to synchronize.
'';
};
username = mkOption {
# For `nsupdate` username contains the path to the nsupdate executable
default = lib.optionalString (cfg.protocol == "nsupdate") "${pkgs.bind.dnsutils}/bin/nsupdate";
defaultText = "";
type = str;
description = lib.mdDoc ''
User name.
'';
};
passwordFile = mkOption {
default = null;
type = nullOr str;
description = lib.mdDoc ''
A file containing the password or a TSIG key in named format when using the nsupdate protocol.
'';
};
interval = mkOption {
default = "10min";
type = str;
description = lib.mdDoc ''
The interval at which to run the check and update.
See {command}`man 7 systemd.time` for the format.
'';
};
configFile = mkOption {
default = null;
type = nullOr path;
description = lib.mdDoc ''
Path to configuration file.
When set this overrides the generated configuration from module options.
'';
example = "/root/nixos/secrets/ddclient.conf";
};
protocol = mkOption {
default = "dyndns2";
type = str;
description = lib.mdDoc ''
Protocol to use with dynamic DNS provider (see https://sourceforge.net/p/ddclient/wiki/protocols).
'';
};
server = mkOption {
default = "";
type = str;
description = lib.mdDoc ''
Server address.
'';
};
ssl = mkOption {
default = true;
type = bool;
description = lib.mdDoc ''
Whether to use SSL/TLS to connect to dynamic DNS provider.
'';
};
quiet = mkOption {
default = false;
type = bool;
description = lib.mdDoc ''
Print no messages for unnecessary updates.
'';
};
script = mkOption {
default = "";
type = str;
description = lib.mdDoc ''
script as required by some providers.
'';
};
use = mkOption {
default = "web, web=checkip.dyndns.com/, web-skip='Current IP Address: '";
type = str;
description = lib.mdDoc ''
Method to determine the IP address to send to the dynamic DNS provider.
'';
};
verbose = mkOption {
default = false;
type = bool;
description = lib.mdDoc ''
Print verbose information.
'';
};
zone = mkOption {
default = "";
type = str;
description = lib.mdDoc ''
zone as required by some providers.
'';
};
extraConfig = mkOption {
default = "";
type = lines;
description = lib.mdDoc ''
Extra configuration. Contents will be added verbatim to the configuration file.
::: {.note}
`daemon` should not be added here because it does not work great with the systemd-timer approach the service uses.
:::
'';
};
};
};
###### implementation
config = mkMerge [
(mkIf cfg.enable {
systemd.services.ddclient = {
description = "Dynamic DNS Client";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
restartTriggers = optional (cfg.configFile != null) cfg.configFile;
path = lib.optional (lib.hasPrefix "if," cfg.use) pkgs.iproute2;
serviceConfig = {
DynamicUser = true;
RuntimeDirectoryMode = "0700";
inherit RuntimeDirectory;
inherit StateDirectory;
Type = "oneshot";
ExecStartPre = "!${pkgs.writeShellScript "ddclient-prestart" preStart}";
ExecStart = "${lib.getBin cfg.package}/bin/ddclient -file /run/${RuntimeDirectory}/ddclient.conf";
};
};
systemd.timers.ddclient = {
description = "Run ddclient";
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = cfg.interval;
OnUnitInactiveSec = cfg.interval;
};
};
})
{
ids.uids.ddclient = 30;
ids.gids.ddclient = 30;
}
];
}

View file

@ -1,45 +0,0 @@
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: Copyright (c) 2003-2023 The Nixpkgs/NixOS contributors
{ lib, fetchFromGitHub, perlPackages, autoreconfHook, iproute2, perl }:
perlPackages.buildPerlPackage rec {
pname = "ddclient";
version = "3.10.0";
outputs = [ "out" ];
src = fetchFromGitHub {
owner = "ddclient";
repo = "ddclient";
rev = "v${version}";
sha256 = "sha256-wWUkjXwVNZRJR1rXPn3IkDRi9is9vsRuNC/zq8RpB1E=";
};
postPatch = ''
touch Makefile.PL
'';
nativeBuildInputs = [ autoreconfHook ];
buildInputs = with perlPackages; [ IOSocketINET6 IOSocketSSL JSONPP ];
installPhase = ''
runHook preInstall
# patch sheebang ddclient script which only exists after buildPhase
preConfigure
install -Dm755 ddclient $out/bin/ddclient
install -Dm644 -t $out/share/doc/ddclient COP* README.* ChangeLog.md
runHook postInstall
'';
# TODO: run upstream tests
doCheck = false;
meta = with lib; {
description = "Client for updating dynamic DNS service entries";
homepage = "https://ddclient.net/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View file

@ -27,7 +27,7 @@ pkgs.lib.makeOverridable depot.nix.buildBazelPackageNG rec {
find "$dir" -name .git -print0 | xargs -0 rm -rf
'';
});
depsHash = "sha256-OS2kLXjtuWf+XRyQO2qGvEaAOvxqu20+gXR+fsCvpMc=";
depsHash = "sha256:114k8ck7056c415qncqmykwqrgprmxnaw3pdv50758mrgw7zdkpm";
patches = [
./0001-Syntax-highlight-nix.patch

View file

@ -4,7 +4,7 @@
{ name
, version
, src
, depsHash ? null
, depsHash ? null
, overlayPluginCmd ? ''
cp -R "${src}" "$out/plugins/${name}"
echo "STABLE_BUILD_${lib.toUpper name}_LABEL v${version}-nix${if patches != [] then "-dirty" else ""}" >> $out/.version

View file

@ -11,7 +11,7 @@ buildGerritBazelPlugin rec {
rev = "98231604d60788bb43490f1a301d792817ac8008";
hash = "sha256-AuVO1Yys8BYqGHZI/adszCUg0JM2v4Td4fe26LdOPLM=";
};
depsHash = "sha256-7SC4NXm4zGeJrYBqtEvcrLmsZmXEX8P21J0kwHBDBZ4=";
depsHash = "sha256:10py3vq9sfq5j4gjrlxff01vp346jbcygry06x4zc26xgnf4pa9r";
postOverlayPlugin = ''
cp "${src}/external_plugin_deps.bzl" "$out/plugins/external_plugin_deps.bzl"
'';

View file

@ -1,15 +1,7 @@
{ pkgs, ... }:
{ depot, lib, ... }:
let
gitignoreNix = import
(pkgs.fetchFromGitHub {
owner = "hercules-ci";
repo = "gitignore";
rev = "f9e996052b5af4032fe6150bba4a6fe4f7b9d698";
sha256 = "0jrh5ghisaqdd0vldbywags20m2cxpkbbk5jjjmwaw0gr8nhsafv";
})
{ inherit (pkgs) lib; };
gitignoreNix = import depot.third_party.sources."gitignore.nix" { inherit lib; };
in
{
__functor = _: gitignoreNix.gitignoreSource;

View file

@ -33,4 +33,9 @@ depot.nix.buildLisp.library {
depot.third_party.lisp.trivial-gray-streams
depot.third_party.lisp.babel #+rune-is-character
];
brokenOn = [
# TODO(sterni): fails when loading because it tries to access package.lisp at runtime
"ecl"
];
}

View file

@ -9,7 +9,7 @@ let
# delete unexported and unused double defun in sgml-dtd.lisp
# which reference undefined CL-USER:*HTML-DTD* (!) which
# unlike CLOSURE-HTML:*HTML-DTD* is not involved in the
# packages operation.
# package's operation.
./no-double-defun.patch
# Patches html-parser.lisp to look for the distributed
# dtd files and catalog in this source derivations out
@ -62,4 +62,8 @@ depot.nix.buildLisp.library {
depot.third_party.lisp.flexi-streams
depot.third_party.lisp.closure-common
];
brokenOn = [
"ecl" # see closure-common
];
}

View file

@ -1 +0,0 @@
prevent readTree from creating entries for subdirs that don't contain an .nix files

View file

@ -9,13 +9,17 @@ website](http://wcp.sdf-eu.org/software/#mime4cl) can still be accessed.
The depot version has since diverged from upstream. Main aims were to improve
performance and reduce code size by relying on third party libraries like
flexi-streams. It is planned to improve encoding handling in the long term.
Currently, the library is being worked on intermittently and not very well
tested—**it may not work as expected**.
Work towards this happens intermittently.
WARNING:
mime4cl currently doesn't have a _comprehensive_ test suite
and decidedly lacks performance.
## Differences from the original version
* `//nix/buildLisp` is used as the build system. ASDF is currently untested and
may be broken.
* `//nix/buildLisp` is used as the build system. ASDF has been removed
since it was untested (it should be reintroduced once mime4cl is
“ready”).
* The dependency on [sclf](http://wcp.sdf-eu.org/software/#sclf) has been
eliminated by inlining the relevant parts.

View file

@ -0,0 +1,30 @@
(defpackage :mime4cl-bench
(:use :common-lisp :mime4cl)
(:export :main))
(in-package :mime4cl-bench)
;; Write to /dev/null so that I/O is less (?) of a factor
(defparameter *output-path* (pathname "/dev/null"))
(defun parse-message (path)
(let ((msg (mime-message path)))
;; to prove we are doing something, print the subject
(format t "Subject: ~A~%" (car (mime-message-header-values "Subject" msg :decode t)))
msg))
(defun main ()
(destructuring-bind (bench-name message-path) (uiop:command-line-arguments)
(let ((action (intern (string-upcase bench-name) :mime4cl-bench))
(message-path (pathname message-path)))
(ccase action
((parse) (parse-message message-path))
((extract) (do-parts (part (parse-message message-path))
(format t "Content-Type: ~A~%" (mime-type-string part))
(let ((in (mime-body-stream part)))
(with-open-file (output-stream (pathname *output-path*)
:direction :output
:if-does-not-exist :create
:element-type (stream-element-type in)
:if-exists :overwrite)
(redirect-stream in output-stream)))))))))

View file

@ -0,0 +1,69 @@
{ depot, pkgs, lib, ... }:
let
# Example email that's going to push the parser due to its big attachment
# of almost 200MB. We are using a GHC bindist since it's quite big and a
# fixed output derivation that's already part of nixpkgs, so whitby only
# needs to download it once (and it won't change).
message = pkgs.runCommand "huge.mime"
{
nativeBuildInputs = [ pkgs.buildPackages.mblaze ];
}
''
mmime > $out <<EOF
Subject: Test message with a big attachment
Henlo world!
#application/x-xz#base64 ${pkgs.haskell.compiler.ghc963Binary.src}
EOF
'';
inherit (depot.nix) buildLisp getBins;
benchmark-program = buildLisp.program {
name = "mime4cl-benchmark-program";
deps = [
{
sbcl = buildLisp.bundled "uiop";
default = buildLisp.bundled "asdf";
}
depot.third_party.lisp.mime4cl
];
srcs = [
./bench.lisp
];
main = "mime4cl-bench:main";
};
commands = bench: {
mime4cl-message-parsing = "${bench} parse ${message}";
mime4cl-attachment-extraction = "${bench} extract ${message}";
};
# TODO(sterni): expose this information from //nix/buildLisp and generate automatically
lispImplementations = [ "sbcl" /* "ccl" "ecl" */ ];
in
(pkgs.writeShellScriptBin "mime4cl-benchmark" ''
exec ${pkgs.hyperfine}/bin/hyperfine \
${
lib.escapeShellArgs (
lib.concatMap (impl:
lib.concatLists (
lib.mapAttrsToList (name: cmd:
[ "-n" "${impl}-${name}" cmd ]
) (commands (let b = benchmark-program.${impl}; in "${b}/bin/${b.name}"))
)
) lispImplementations
)
} \
"$@"
'').overrideAttrs (oldAttrs: {
passthru = oldAttrs.passthru or { } // {
inherit benchmark-program;
};
})

View file

@ -42,10 +42,4 @@ depot.nix.buildLisp.library {
expression = "(rtest:do-tests)";
};
# limited by sclf
brokenOn = [
"ccl"
"ecl"
];
}

View file

@ -656,6 +656,7 @@ sequence, a charset string indicating the original coding."
(cons (flexi-streams:octets-to-string
(car part)
:external-format (flexi-streams:make-external-format
;; TODO(sterni): sanitize charset before interning
(intern (string-upcase (cdr part)) 'keyword))))
(string part))))
(apply #'concatenate

View file

@ -32,7 +32,6 @@
(defpackage :mime4cl-ex-sclf
(:use :common-lisp)
(:import-from :sb-posix :stat :stat-size)
(:export
#:aif
@ -64,8 +63,6 @@
#:save-file-excursion
#:read-file
#:file-size
#:promise
#:make-promise
#:lazy
@ -268,20 +265,6 @@ ELEMENT-TYPE."
seq)
default)))
;; FILES
(defun native-namestring (pathname)
#+sbcl (sb-ext:native-namestring pathname)
#-sbcl (let (#+cmu (lisp::*ignore-wildcards* t))
(namestring pathname)))
;; FILE-LENGTH is a bit idiosyncratic in this respect. Besides, Unix
;; allows to get to know the file size without being able to open a
;; file; just ask politely.
(defun file-size (pathname)
#+sbcl (stat-size (unix-stat pathname))
#-sbcl (error "nyi"))
;; LAZY
(defstruct promise

View file

@ -67,6 +67,15 @@
(:documentation
"Abstract base class for all types of MIME parts."))
(defparameter +redundant-headers+ '(:mime-version
:content-type
:content-id
:content-description
:content-disposition
:content-transfer-encoding)
"Headers that don't need to be preserved in the HEADERS slot of MIME-MESSAGE
because they are stored in dedicated slots in MIME-PART.")
(defclass mime-bodily-part (mime-part)
((body
:initarg :body
@ -131,11 +140,20 @@
;; Allow a list of mime parts to be specified as body of a
;; mime-message. In that case we implicitly create a mime-multipart
;; and assign to the body slot.
(with-slots (real-message) part
(with-slots (real-message headers) part
(when (and (slot-boundp part 'real-message)
(consp real-message))
(setf real-message
(make-instance 'mime-multipart :parts real-message)))))
(make-instance 'mime-multipart :parts real-message)))
;; Remove headers that are parsed and stored in MIME-PART (i.e.
;; REAL-MESSAGE). This prevents redundant storage and rendering of these
;; headers as well as MIME= depending on the specific rendering of these
;; headers which may diverge between mime4cl and other software. We do this
;; here since construction of REAL-MESSAGE may access the HEADERS slot.
(setf headers
(delete-if (lambda (h)
(member (car h) +redundant-headers+ :test #'string-equal))
headers))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -183,26 +201,25 @@
:test #'string=)
(mime= (mime-body part1) (mime-body part2))))
(defun mime-body-stream (mime-part)
(make-input-adapter (mime-body mime-part)))
(defgeneric mime-body-stream (mime-part)
(:documentation
"Returns stream that allows reading the decoded body of the given part.
STREAM-ELEMENT-TYPE depends on part type."))
(defun mime-body-length (mime-part)
(let ((body (mime-body mime-part)))
;; here the stream type is missing on purpose, because we may not
;; be able to size the length of a stream
(etypecase body
(string
(length body))
(vector
(length body))
(pathname
(file-size body))
(file-portion
(with-open-stream (in (open-decoded-file-portion body))
(loop
for byte = (read-byte in nil)
while byte
count byte))))))
;; TODO(sterni): Allow accessing underlying binary stream?
;; Would need matching behavior with :7bit
(defmethod mime-body-stream ((part mime-text))
(let ((underlying-stream (call-next-method)))
(if (eq (stream-element-type underlying-stream) 'character)
underlying-stream
(make-flexi-stream underlying-stream
:external-format
;; TODO(sterni): sanitize charset before interning
(intern (string-upcase (mime-text-charset part))
'keyword)))))
(defmethod mime-body-stream ((part mime-part))
(make-input-adapter (mime-body part)))
(defmacro with-input-from-mime-body-stream ((stream part) &body forms)
`(with-open-stream (,stream (mime-body-stream ,part))
@ -368,10 +385,6 @@ that may change this.")
(:multipart mime-multipart)
(:message mime-message)))
(defgeneric mime-part-size (part)
(:documentation
"Return the size in bytes of the body of a MIME part."))
(defgeneric print-mime-part (part stream)
(:documentation
"Output to STREAM one of the possible human-readable representation
@ -471,18 +484,18 @@ separated by PART-BOUNDARY."
(encode-mime-body part stream))
(defmethod encode-mime-part ((part mime-message) stream)
;; tricky: we have to mix the MIME headers with the message headers
;; tricky: we have to mix the MIME headers with the message headers, i.e.
;; ENCODE-MIME-PART will output additional headers
(dolist (h (mime-message-headers part))
(unless (stringp (car h))
(setf (car h)
(string-capitalize (car h))))
(unless (or (string-starts-with "content-" (car h) #'string-equal)
(string-equal "mime-version" (car h)))
(format stream "~A: ~A~%"
(car h) (cdr h))))
(format stream "~A: ~A~%"
(car h) (cdr h)))
(encode-mime-part (mime-body part) stream))
(defmethod encode-mime-part ((part mime-multipart) stream)
(declare (ignore stream)) ; call-next-method
;; choose a boundary if not already set
(let* ((original-boundary (get-mime-type-parameter part :boundary))
(boundary (choose-boundary (mime-parts part) original-boundary)))
@ -677,9 +690,10 @@ body."
(defun keywordify-encoding (string)
"Return a keyword for a content transfer encoding string.
Return STRING itself if STRING is an unkown encoding."
(aif (member string +known-encodings+ :test #'string-equal)
(car it)
string))
(when string
(aif (member string +known-encodings+ :test #'string-equal)
(car it)
string)))
(defun header (name headers)
(let ((elt (assoc name headers :test #'string-equal)))
@ -714,8 +728,9 @@ guessed from the headers, use the *DEFAULT-TYPE*."
:disposition (car disp)
:disposition-parameters (cdr disp)
:mime-version (hdr :mime-version)
:encoding (keywordify-encoding
(hdr :content-transfer-encoding))
:encoding (or (keywordify-encoding
(hdr :content-transfer-encoding))
:7bit) ; default per RFC2045
:description (hdr :content-description)
:id (hdr :content-id)
:allow-other-keys t)))
@ -761,12 +776,12 @@ returns a MIME-MESSAGE object."
(with-open-file (in msg :element-type '(unsigned-byte 8))
(mime-message in)))
(defmethod mime-message ((msg stream))
(mime-message (make-flexi-stream msg)))
(defmethod mime-message ((msg flexi-stream))
(read-mime-message msg))
(defmethod mime-message ((msg stream))
(read-mime-message (make-flexi-stream msg)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defgeneric mime-part (object)
@ -827,31 +842,6 @@ returns a MIME-MESSAGE object."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; fall back method
(defmethod mime-part-size ((part mime-part))
(let ((body (mime-body part)))
(typecase body
(pathname
(file-size body))
(string
(length body))
(vector
(length body))
(t nil))))
(defmethod mime-part-size ((part mime-multipart))
(loop
for p in (mime-parts part)
for size = (mime-part-size p)
unless size
return nil
sum size))
(defmethod mime-part-size ((part mime-message))
(mime-part-size (mime-body part)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmethod print-mime-part ((part mime-multipart) (out stream))
(case (mime-subtype part)
(:alternative
@ -878,12 +868,11 @@ returns a MIME-MESSAGE object."
(loop
for byte across body
do (write-char (code-char byte) out)))
(file-portion
(redirect-stream (open-decoded-file-portion body) out))
(pathname
(with-open-file (in body)
(loop
for c = (read-char in nil)
while c
do (write-char c out)))))))
(redirect-stream in out))))))
(defmethod print-mime-part ((part mime-message) (out stream))
(flet ((hdr (name)
@ -897,8 +886,8 @@ returns a MIME-MESSAGE object."
(print-mime-part (mime-body part) out)))
(defmethod print-mime-part ((part mime-part) (out stream))
(format out "~&[ ~A subtype=~A ~@[description=~S ~]~@[size=~A~] ]~%"
(type-of part) (mime-subtype part) (mime-description part) (mime-part-size part)))
(format out "~&[ ~A subtype=~A ~@[description=~S ~]]~%"
(type-of part) (mime-subtype part) (mime-description part)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -980,9 +969,6 @@ is a string."))
(:documentation
"Return the string describing the MIME part."))
(defmethod mime-type-string ((part mime-unknown-part))
(mime-type part))
(defmethod mime-type-string ((part mime-text))
(format nil "text/~A" (mime-subtype part)))

View file

@ -1,55 +0,0 @@
;;; mime4cl-tests.asd --- system description for the regression tests
;;; Copyright (C) 2006, 2007, 2010 by Walter C. Pelissero
;;; Copyright (C) 2022 by The TVL Authors
;;; Author: Walter C. Pelissero <walter@pelissero.de>
;;; Project: mime4cl
;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public License
;;; as published by the Free Software Foundation; either version 2.1
;;; of the License, or (at your option) any later version.
;;; This library is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;; Lesser General Public License for more details.
;;; You should have received a copy of the GNU Lesser General Public
;;; License along with this library; if not, write to the Free
;;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
;;; 02111-1307 USA
#-(or sbcl)
(warn "This code hasn't been tested on your Lisp system.")
(defpackage :mime4cl-tests-system
(:use :common-lisp :asdf #+asdfa :asdfa)
(:export #:*base-directory*
#:*compilation-epoch*))
(in-package :mime4cl-tests-system)
(defsystem mime4cl-tests
:name "MIME4CL-tests"
:author "Walter C. Pelissero <walter@pelissero.de>"
:maintainer "Walter C. Pelissero <walter@pelissero.de>"
:description "Test suite for the MIME4CL library"
:long-description
"These regression tests require rt.lisp from MIT. It is included."
:licence "LGPL"
:depends-on (:mime4cl)
:components
((:module test
:components
((:file "rt")
(:file "package" :depends-on ("rt"))
(:file "endec" :depends-on ("rt" "package"))
(:file "address" :depends-on ("rt" "package"))
(:file "mime" :depends-on ("rt" "package"))))))
;; when loading this form the regression-test, the package is yet to
;; be loaded so we cannot use rt:do-tests directly or we would get a
;; reader error (unknown package)
(defmethod perform ((o test-op) (c (eql (find-system :mime4cl-tests))))
(or (funcall (intern "DO-TESTS" "REGRESSION-TEST"))
(error "test-op failed")))

View file

@ -1,49 +0,0 @@
;;; mime4cl.asd --- system definition
;;; Copyright (C) 2005-2007, 2010 by Walter C. Pelissero
;;; Copyright (C) 2022 by The TVL Authors
;;; Author: Walter C. Pelissero <walter@pelissero.de>
;;; Project: mime4cl
;;; This program is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License as
;;; published by the Free Software Foundation; either version 2, or (at
;;; your option) any later version.
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;;; General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with this program; see the file COPYING. If not, write to
;;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;;; Boston, MA 02111-1307, USA.
(in-package :cl-user)
(defpackage :mime4cl-system
(:use :common-lisp :asdf))
(in-package :mime4cl-system)
(defsystem mime4cl
:name "MIME4CL"
:author "Walter C. Pelissero <walter@pelissero.de>"
:maintainer "Walter C. Pelissero <walter@pelissero.de>"
;; :version "0.0"
:description "MIME primitives for Common Lisp"
:long-description
"A collection of Common Lisp primitives to forge and handle
MIME mail contents."
:licence "LGPL"
:depends-on (:npg :sclf :trivial-gray-streams)
:components
((:file "package")
(:file "mime" :depends-on ("package" "endec" "streams"))
(:file "endec" :depends-on ("package"))
(:file "streams" :depends-on ("package" "endec"))
(:file "address" :depends-on ("package"))))
(defmethod perform ((o test-op) (c (eql (find-system 'mime4cl))))
(oos 'load-op 'mime4cl-tests)
(oos 'test-op 'mime4cl-tests :force t))

View file

@ -44,11 +44,9 @@
#:mime-application
#:mime-video
#:mime-description
#:mime-part-size
#:mime-subtype
#:mime-body
#:mime-body-stream
#:mime-body-length
#:mime-parts
#:mime-part-p
#:mime-type

View file

@ -0,0 +1 @@
parent exposes tests

View file

@ -0,0 +1,206 @@
Received: by 2002:a05:6838:9619:0:0:0:0 with SMTP id y25csp3021959nkj;
Sun, 27 Sep 2020 16:35:15 -0700 (PDT)
X-Received: by 2002:a05:6402:396:: with SMTP id o22mr12644027edv.316.1601249714826;
Sun, 27 Sep 2020 16:35:14 -0700 (PDT)
ARC-Seal: i=3; a=rsa-sha256; t=1601249714; cv=pass;
d=google.com; s=arc-20160816;
b=JZF8xwEI+NfpPypYuVsDwKKN4In4Gxk3qcvm260gDbKPo04eS7Dn3CcoeQkbB3Ryck
FUtB8PfISQOsDboMeEXqGbhbCSbH2HoXWySM6XucTVzfeL2hXF9sPjFUCx6LLuvSDSxL
7E146B7H3dNvB1ndqkWyefiVeSgeES7KzVvYbkoMJJlKozR6FUsKMCVMdrRq0ja6iGbf
7TlLWvlci49+8LZQKtDQ2ovU/DSQmu2f7eWcbozsIP3ArBxQ+814bQprLWQYsI5Z4fZz
0kPEC6dbZpajPDNpTx5ark/+EV/ICGVE6kODmNjFTi18eMjMU1PXULE8FImkw+duFdzP
DF4g==
ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:subject:to:from:date:message-id
:mime-version:user-agent:sender:dkim-signature;
bh=2VC221ICpWr3atnjvjQBr2VGuwcTNaQLBA5EJvQxzNE=;
b=oI1vj3HEqVB2vRTlg44B8ik+G5jSMm7YHiPOdg+oWwiZSeK1DlKf3S0C9brs8iLBDU
paovJkxdJu++lY1zzBorw34bMDPHsfnBf6ztDZfAhpDSQM3VZEW+jAvAc9vFh6eL5ilE
qdZR9blzrqoi5GoPmVx7j/Z30zFidppWNbZLzuC7pAcS86WzKd8Ta56EDxxHE48RFRyO
TYhIonS2QEBp+Yn2Pm5SGez/5HHI2s3vu1kXTZ0JKETvWSkZUtBsX7u7KTfcy3EAjvc8
3s2dxQpMCYXZvyvJ0g2k0dsecEDRBWa2gv9Wr3iip7v5NaRcKuz1nuN/AiazKZPTDION
f/tg==
ARC-Authentication-Results: i=3; mx.google.com;
dkim=pass header.i=@tazj.in header.s=google header.b=dVeQt6cm;
arc=pass (i=2 dkim=pass dkdomain=firefly.nu dkim=pass dkdomain=messagingengine.com);
spf=pass (google.com: domain of depot+bncbdhlpx4g2ierbmwdyt5qkgqexgc7sqy@tazj.in designates 209.85.220.69 as permitted sender) smtp.mailfrom=depot+bncBDHLPX4G2IERBMWDYT5QKGQEXGC7SQY@tazj.in
Return-Path: <depot+bncBDHLPX4G2IERBMWDYT5QKGQEXGC7SQY@tazj.in>
Received: from mail-sor-f69.google.com (mail-sor-f69.google.com. [209.85.220.69])
by mx.google.com with SMTPS id li22sor4242657ejb.49.2020.09.27.16.35.14
for <mail@tazj.in>
(Google Transport Security);
Sun, 27 Sep 2020 16:35:14 -0700 (PDT)
Received-SPF: pass (google.com: domain of depot+bncbdhlpx4g2ierbmwdyt5qkgqexgc7sqy@tazj.in designates 209.85.220.69 as permitted sender) client-ip=209.85.220.69;
Authentication-Results: mx.google.com;
dkim=pass header.i=@tazj.in header.s=google header.b=dVeQt6cm;
arc=pass (i=2 dkim=pass dkdomain=firefly.nu dkim=pass dkdomain=messagingengine.com);
spf=pass (google.com: domain of depot+bncbdhlpx4g2ierbmwdyt5qkgqexgc7sqy@tazj.in designates 209.85.220.69 as permitted sender) smtp.mailfrom=depot+bncBDHLPX4G2IERBMWDYT5QKGQEXGC7SQY@tazj.in
ARC-Seal: i=2; a=rsa-sha256; t=1601249714; cv=pass;
d=google.com; s=arc-20160816;
b=e/oahP75xCAPQvP5D7B1dG2SDAEC5XNRI40cafqhXEI32hdW9TQNSs1krZ7tQHOht2
/ZGbOLY/BNxS3VoDM+Mcif7BCx7bjeOpmVkVzEhM0KZoBHorf91SOBM05PvewA9nQtLb
1pXB8bdivzOkYUuSX56rX1sOjNjMrWWUPF8Ven5zy3r2MIqJ561O8pPN/6Uz0tajiK7Y
klavaIk/Pxo91kuVbOKDJTH2mmggFTthqYkkCQuelgeKx4zBdDjS32vx3kPLRhMnfuGu
+CHC9L2Gv0ww0PyfRhkYeNLRrAqVHWDyCrw26f2QxFBEoTv/OnzH380uqO9n+SdmILBI
fNzw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:subject:to:from:date:message-id
:mime-version:user-agent:sender:dkim-signature;
bh=2VC221ICpWr3atnjvjQBr2VGuwcTNaQLBA5EJvQxzNE=;
b=BONPbsQkjSVRgH8pu89B9aXx6IAuchsgfp2pedA7kEz7Gw3/M9nQoPxTbjcAXKFWoi
SDqYH/Ch6TrYFy6WmgKyw5NB0WuB6WIC9jhRbeiGsXlxbnm1cP1thD7uRFJTaAhcaRBO
cbRA5Ue7pTphAtNVWkHeC37swSOrLtl9WFj+vXwo2l8ndO+5uP6jBi3ApaZDXyx7NODT
i3Jo1kehj7rnA+PINKR8tjlZ1COJYmxWz7upypJY4rZxLdJYzXPS19Rdhq4zmumyqRxt
NsnIIPsPRnYopcLd15rwgSOaHYi4CWwalkpfsBL1IaKXuk0K/XwmLsWdGrNRAN4aUEoR
7KEw==
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@firefly.nu header.s=fm2 header.b=P5Ezbo3T;
dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=pHVhf6X0;
spf=neutral (google.com: 64.147.123.21 is neither permitted nor denied by best guess record for domain of firefly@firefly.nu) smtp.mailfrom=firefly@firefly.nu
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=tazj.in; s=google;
h=sender:user-agent:mime-version:message-id:date:from:to:subject
:x-original-sender:x-original-authentication-results:precedence
:mailing-list:list-id:list-post:list-help:list-archive
:list-subscribe:list-unsubscribe;
bh=2VC221ICpWr3atnjvjQBr2VGuwcTNaQLBA5EJvQxzNE=;
b=dVeQt6cmfZBkKqjl826gk0BnxKVtl6OsjaldzCuNQxqxhrecw9GbSofGqS3WxrxWWP
S8cg2AoRtIFC8nuTiRCAEgREb+4paYH5BtDbLtL/Y56jOA0djb6APwYx8MYOVwQxflrx
yyGWSXI04MYjkX/+0gFyvzi0VfZM4UK4pjfPN6WhHBe4xy6bF8VBds11PPAaKZdSdAvR
z8j+CpWBNzKNfbM3bUdLbEuPmt3+Qeem/4HAnRhY6jIYyBJb2a2vXT/edBasnTE/gNSd
Cf4SppE7H3EpRwveBAF367MeeX3stQrXN//t2aXljnuxymM90yPkIq2Xn0zBfp1O47WR
aOBg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=sender:x-gm-message-state:user-agent:mime-version:message-id:date
:from:to:subject:x-original-sender:x-original-authentication-results
:precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
:list-help:list-archive:list-subscribe:list-unsubscribe;
bh=2VC221ICpWr3atnjvjQBr2VGuwcTNaQLBA5EJvQxzNE=;
b=qScRnwtHSE4Boeu7UpmdBjsVhesvMMFHVmdPjW3sNCgR1SxUIOLjFpJNPXy/l+dlOh
sApL/oDMQ25yHodkQF8G2mRCV+SBDVAsrIo0w+LILPP3h+Y0y2yTLiLwKE4WLqoaPi1l
jugZUthJC3KEHq8fhtQHRTtBc5V7UQJIecH2kIU43DUNKpzkzOdf7km6Q0cY9CdXs23x
PSuSg4PzbHOo6cGdBVKvbsjh+sOn6WFuxoXOTtNmFJfE9fTfUlz7LJumTZU3J7DKc5Ho
aYzHFmRwdZUyoX/FQwT//Tf2RQbnVGD3o5a+6lhzt8MFecmLHvRImbKCL/L8K+WTYYFY
ou0g==
Sender: depot@tazj.in
X-Gm-Message-State: AOAM530ZJ8ZcOIvD5lsuI9DM+tccfbSnX8Qgkk03neyoDAKpidBSMC/W
yt/uGXfgEMSbcEOWEu/zxLqwyI0F
X-Google-Smtp-Source: ABdhPJySQZLzFZhvk2VQDhHrXOWbCQqFMNYvDodhQIOIvOgRkT6bOuvTGVrWIiY58v2NVvIzUZCfKw==
X-Received: by 2002:a17:906:d78c:: with SMTP id pj12mr12868809ejb.36.1601249714531;
Sun, 27 Sep 2020 16:35:14 -0700 (PDT)
X-BeenThere: depot@tazj.in
Received: by 2002:a17:906:547:: with SMTP id k7ls3670922eja.7.gmail; Sun, 27
Sep 2020 16:35:13 -0700 (PDT)
X-Received: by 2002:a17:906:2cd2:: with SMTP id r18mr13573990ejr.371.1601249713549;
Sun, 27 Sep 2020 16:35:13 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1601249713; cv=none;
d=google.com; s=arc-20160816;
b=oi0sYnQxS35/hNyKRgiTTgLNV0zvOtiE8Irv6bfmQCOADDql9vaDvs430N+tsEzON3
wd8frXphZvgkZjVvPer5CgLyr84ixyrrHhEDwqs89AYR9wHibQ6QtinQfr5xoDkQW9Tb
MMlgl55c2AHzXXqe+eY4gEHww/y8ys1aCDAWEhGxe1M09FiUVBn3+F2ZOV5IW4q+p9TW
EMPNZyByXAZnqkYZCX+KHJ+3nyuQ0PsRVuIVbQA/a0GvVwl+yEhyJno7l2AUR8cfl8at
MeevKmvuYTCuc03cLceleXov097xsF0WvO8H68OPkZj1Kf9wrE3qg6avyZF285ixaXrS
Kc6A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
h=subject:to:from:date:message-id:mime-version:user-agent
:dkim-signature:dkim-signature;
bh=RahJwSWaN3jErVsNLXnMXbf7yUdzKHDGCF4swc44ayM=;
b=qzsApa+4gOUyfT8CcBmrz26QKrvOy54oZgzrHdDe7oNkLANtUyxqKD3KhDAKGUMLYQ
jbXSNrQnhNR4GUNAYmpT/TM0RnbEgdO9rr9LcA3pGA9/LuJo3jBkV87a9H7cC5mp8Zwc
sL4WScovJaK7m0m83VBDqq9Zhp0hexHCKCnH/LrNtpTrWiQvYz6BuDM04BuOEXN4mq1c
tXXcDsrcoj4hTLtGplWU5qGhYnem00cKPXsQ09ivGKFib1TbNgiVGsnHrICktmmionRw
SioEgIoc0ZUlHQOvoV0UlbkCAEEPS9GBR3NeTbm+Dth08zejgs+Il9QiFV2kLnJ0QMpn
oB8A==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@firefly.nu header.s=fm2 header.b=P5Ezbo3T;
dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=pHVhf6X0;
spf=neutral (google.com: 64.147.123.21 is neither permitted nor denied by best guess record for domain of firefly@firefly.nu) smtp.mailfrom=firefly@firefly.nu
Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com. [64.147.123.21])
by mx.google.com with ESMTPS id m23si6276235ejo.333.2020.09.27.16.35.13
for <depot@tazj.in>
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Sun, 27 Sep 2020 16:35:13 -0700 (PDT)
Received-SPF: neutral (google.com: 64.147.123.21 is neither permitted nor denied by best guess record for domain of firefly@firefly.nu) client-ip=64.147.123.21;
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
by mailout.west.internal (Postfix) with ESMTP id AF9D4858
for <depot@tazj.in>; Sun, 27 Sep 2020 19:35:11 -0400 (EDT)
Received: from imap6 ([10.202.2.56])
by compute1.internal (MEProxy); Sun, 27 Sep 2020 19:35:11 -0400
X-ME-Sender: <xms:riFxX4VnnifQ9w1KFMktbNIetMCUOiNsY4QMYMYNlcgQgeqXmCbxGg>
<xme:riFxX8mtBTwZaJ30GiNT2TYs0ejG-tC5fKpxry_tax2FN1_w3MP63qO7Ffo4aMcuK
eqmL1zZSYwS6hK6BvU>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdehgddvfecutefuodetggdotefrodftvf
curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesmhdtreerre
ertdenucfhrhhomhephfhirhgvhfhlhicuoehfihhrvghflhihsehfihhrvghflhihrdhn
uheqnecuggftrfgrthhtvghrnhepgfejjeeivdduheehhffgiedvvdeivefhfeekhfejvd
fgleekffdtvefgtdeuheefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm
rghilhhfrhhomhepfhhirhgvfhhlhiesfhhirhgvfhhlhidrnhhu
X-ME-Proxy: <xmx:riFxX8bsOSPgAJy1KyePkpmeGpo8_4ECkIYua3cdRGhJD45-GomP8Q>
<xmx:riFxX3Ugz0lVIhmd_81eDzJj-2szxZvctDBqkrSaqBZ_TDOMs1VupQ>
<xmx:riFxXym0eSIOSeILjv9B21LhstreNAqMkiGciBVaC2LtNcaTVGm6wg>
<xmx:ryFxX4k9Fcb8iNBf12VTr02XeILIeJsjVJ3N-5Zb8vvkAOQ9acbwRQ>
Received: by mailuser.nyi.internal (Postfix, from userid 501)
id AEA2C1400D7; Sun, 27 Sep 2020 19:35:10 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-355-g3ece53b-fm-20200922.004-g3ece53b9
Mime-Version: 1.0
Message-Id: <4f4614f5-23dc-4263-b506-c557588232b2@www.fastmail.com>
Date: Mon, 28 Sep 2020 01:34:48 +0200
From: FireFly <firefly@firefly.nu>
To: depot@tazj.in
Subject: [PATCH] feat(tvl-slapd): add firefly
Content-Type: multipart/mixed;
boundary=07c9605219da4b40b95ea5a855089bfa
X-Original-Sender: firefly@firefly.nu
X-Original-Authentication-Results: mx.google.com; dkim=pass
header.i=@firefly.nu header.s=fm2 header.b=P5Ezbo3T; dkim=pass
header.i=@messagingengine.com header.s=fm3 header.b=pHVhf6X0;
spf=neutral (google.com: 64.147.123.21 is neither permitted nor denied
by best guess record for domain of firefly@firefly.nu) smtp.mailfrom=firefly@firefly.nu
Precedence: list
Mailing-list: list depot@tazj.in; contact depot+owners@tazj.in
List-ID: <depot.tazj.in>
X-Spam-Checked-In-Group: depot@tazj.in
X-Google-Group-Id: 728837484537
List-Post: <https://groups.google.com/a/tazj.in/group/depot/post>, <mailto:depot@tazj.in>
List-Help: <https://support.google.com/a/tazj.in/bin/topic.py?topic=25838>, <mailto:depot+help@tazj.in>
List-Archive: <https://groups.google.com/a/tazj.in/group/depot/>
List-Subscribe: <https://groups.google.com/a/tazj.in/group/depot/subscribe>, <mailto:depot+subscribe@tazj.in>
List-Unsubscribe: <mailto:googlegroups-manage+728837484537+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/tazj.in/group/depot/subscribe>
--07c9605219da4b40b95ea5a855089bfa
Content-Type: text/plain; charset="UTF-8"
Adding an account for myself
--07c9605219da4b40b95ea5a855089bfa
Content-Disposition: attachment;filename="0001-feat-tvl-slapd-add-firefly.patch"
Content-Type: application/octet-stream; name="0001-feat-tvl-slapd-add-firefly.patch"
Content-Transfer-Encoding: BASE64
RnJvbSA4ZDNiNmI5NWQ0Y2RlMDNmM2I2MjQzZmYyYWJhYmQ0YTEzNDhjZmUzIE1vbiBTZXAg
MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/Sm9uYXM9MjBIPUMzPUI2Z2x1bmQ/
PSA8ZmlyZWZseUBmaXJlZmx5Lm51PgpEYXRlOiBNb24sIDI4IFNlcCAyMDIwIDAxOjI4OjI5
ICswMjAwClN1YmplY3Q6IFtQQVRDSF0gZmVhdCh0dmwtc2xhcGQpOiBhZGQgZmlyZWZseQoK
LS0tCiBvcHMvbml4b3MvdHZsLXNsYXBkL2RlZmF1bHQubml4IHwgNSArKysrKwogMSBmaWxl
IGNoYW5nZWQsIDUgaW5zZXJ0aW9ucygrKQoKZGlmZiAtLWdpdCBhL29wcy9uaXhvcy90dmwt
c2xhcGQvZGVmYXVsdC5uaXggYi9vcHMvbml4b3MvdHZsLXNsYXBkL2RlZmF1bHQubml4Cmlu
ZGV4IDQyMGU4ZTE5Ni4uMzk3N2ZjNzkyIDEwMDY0NAotLS0gYS9vcHMvbml4b3MvdHZsLXNs
YXBkL2RlZmF1bHQubml4CisrKyBiL29wcy9uaXhvcy90dmwtc2xhcGQvZGVmYXVsdC5uaXgK
QEAgLTYwLDYgKzYwLDExIEBAIGxldAogICAgICAgZW1haWwgPSAiZXRhQHRoZXRhLmV1Lm9y
ZyI7CiAgICAgICBwYXNzd29yZCA9ICJ7U1NIQX1zT1I1eHppN0xmdjM3NlhHUUE4SGY2anlo
VHZvMFhZYyI7CiAgICAgfQorICAgIHsKKyAgICAgIHVzZXJuYW1lID0gImZpcmVmbHkiOwor
ICAgICAgZW1haWwgPSAiZmlyZWZseUBmaXJlZmx5Lm51IjsKKyAgICAgIHBhc3N3b3JkID0g
IntBUkdPTjJ9JGFyZ29uMmlkJHY9MTkkbT02NTUzNix0PTIscD0xJFJZVlZrRm9pM0ExeVlr
SThKMnpVd2ckR1VFUnZnSHZVOFNHalFtaWxESkdadTUwaFlSQUh3K2VqdHVMK1NreWdzOCI7
CisgICAgfQogICAgIHsKICAgICAgIHVzZXJuYW1lID0gImdsaXR0ZXJzaGFyayI7CiAgICAg
ICBlbWFpbCA9ICJncmZuQGd3cy5meWkiOwotLSAKMi4yNS4xCgo=
--07c9605219da4b40b95ea5a855089bfa--

View file

@ -0,0 +1,13 @@
From: <sterni>
Date: Wed, 25 Dec 2024 23:54:39 +0100
X-Universally-Unique-Identifier: d2ccdc74-830c-41ee-9d64-2221f1c35449
X-Uniform-Type-Identifier: com.apple.mail-note
X-Mailer: notemap
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Subject: =?utf-8?Q?test.txt?=
X-TUID: clxSN23/djqG
gr=C3=BC=C3=9Fe from notemap

View file

@ -0,0 +1,338 @@
Content-Type: multipart/related;
type="text/html";
boundary=Apple-Mail-89556518-7D3B-49E6-BE3B-A3267CB0D688
Content-Transfer-Encoding: 7bit
From: sternenseemann <sternenseemann@systemli.org>
X-Uniform-Type-Identifier: com.apple.mail-note
Mime-Version: 1.0 (iOS/17.6.1 \(21G93\) dataaccessd/1.0)
Date: Fri, 22 Nov 2024 12:49:56 +0100
X-Mail-Created-Date: Fri, 22 Nov 2024 12:49:52 +0100
Subject: example note
X-Universally-Unique-Identifier: D81CB91D-C210-46B1-835A-6A7C34DB666B
Message-Id: <2CF676DC-A86B-433A-8DB5-53D547D415F3@systemli.org>
X-TUID: GhgIofLgzNSd
--Apple-Mail-89556518-7D3B-49E6-BE3B-A3267CB0D688
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><head></head><body style=3D"overflow-wrap: break-word; -webkit-nbsp-mo=
de: space; line-break: after-white-space;"><div><u>example note</u></div><di=
v><br></div><div><b>bold&nbsp;</b><i>italic</i>&nbsp;<i><b>bold &amp; italic=
</b></i>&nbsp;<strike>strikethrough</strike></div><div><strike><br></strike>=
</div><div><strike><object type=3D"application/x-apple-msg-attachment" data=3D=
"cid:C457B697-405B-4A9D-9419-AC33C4A20638@mobilenotes.apple.com"></object></=
strike></div><div><strike><br></strike></div><div>It is technically possible=
to create arbitrary (?) HTML markup via copy &amp; paste from e.g. a browse=
r. Let=E2=80=99s not test that for now.</div></body></html>=
--Apple-Mail-89556518-7D3B-49E6-BE3B-A3267CB0D688
Content-Type: image/jpeg;
name=IMG_1637.JPG;
x-apple-part-url="C457B697-405B-4A9D-9419-AC33C4A20638@mobilenotes.apple.com"
Content-Disposition: inline;
filename=IMG_1637.JPG
Content-Transfer-Encoding: base64
Content-Id: <C457B697-405B-4A9D-9419-AC33C4A20638@mobilenotes.apple.com>
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
uP/Z
--Apple-Mail-89556518-7D3B-49E6-BE3B-A3267CB0D688--

View file

@ -56,8 +56,14 @@ let
# newer trunk fails somewhere within reqwest, trying to read a mystery file
trunk = stableNixpkgs.trunk;
# the big lis package change breaks everything in //3p/lisp, undo it for now.
# the big lisp package change breaks everything in //3p/lisp, undo it for now.
lispPackages = stableNixpkgs.lispPackages;
# mypaint is broken on stable (2024-09-05)
mypaint = stableNixpkgs.mypaint;
# gdmap is broken on unstable (2024-12-31)
gdmap = stableNixpkgs.gdmap;
};
# Overlay to expose the nixpkgs commits we are using to other Nix code.

View file

@ -1,140 +0,0 @@
commit 1397e10225d8c6fd079a86fccd58fb5d0f4200bc
Author: Florian Klink <flokli@flokli.de>
Date: Fri Mar 29 10:06:34 2024 +0100
feat(bigtable/emulator): allow listening on Unix Domain Sockets
cbtemulator listening on unix domain sockets is much easier than trying
to allocate free TCP ports, especially if many cbtemulators are run at
the same time in integration tests.
This adds an additional flag, address, which has priority if it's set,
rather than host:port.
`NewServer` already takes a `laddr string`, so we simply check for it to
contain slashes, and if so, listen on unix, rather than TCP.
diff --git a/bigtable/bttest/inmem.go b/bigtable/bttest/inmem.go
index 556abc2a85..33e4bf2667 100644
--- a/bttest/inmem.go
+++ b/bttest/inmem.go
@@ -40,6 +40,7 @@ import (
"math"
"math/rand"
"net"
+ "os"
"regexp"
"sort"
"strings"
@@ -106,7 +107,15 @@ type server struct {
// The Server will be listening for gRPC connections, without TLS,
// on the provided address. The resolved address is named by the Addr field.
func NewServer(laddr string, opt ...grpc.ServerOption) (*Server, error) {
- l, err := net.Listen("tcp", laddr)
+ var l net.Listener
+ var err error
+
+ // If the address contains slashes, listen on a unix domain socket instead.
+ if strings.Contains(laddr, "/") {
+ l, err = net.Listen("unix", laddr)
+ } else {
+ l, err = net.Listen("tcp", laddr)
+ }
if err != nil {
return nil, err
}
diff --git a/bigtable/cmd/emulator/cbtemulator.go b/bigtable/cmd/emulator/cbtemulator.go
index 144c09ffb1..deaf69b717 100644
--- a/cmd/emulator/cbtemulator.go
+++ b/cmd/emulator/cbtemulator.go
@@ -27,8 +27,9 @@ import (
)
var (
- host = flag.String("host", "localhost", "the address to bind to on the local machine")
- port = flag.Int("port", 9000, "the port number to bind to on the local machine")
+ host = flag.String("host", "localhost", "the address to bind to on the local machine")
+ port = flag.Int("port", 9000, "the port number to bind to on the local machine")
+ address = flag.String("address", "", "address:port number or unix socket path to listen on. Has priority over host/port")
)
const (
@@ -42,7 +43,15 @@ func main() {
grpc.MaxRecvMsgSize(maxMsgSize),
grpc.MaxSendMsgSize(maxMsgSize),
}
- srv, err := bttest.NewServer(fmt.Sprintf("%s:%d", *host, *port), opts...)
+
+ var laddr string
+ if *address != "" {
+ laddr = *address
+ } else {
+ laddr = fmt.Sprintf("%s:%d", *host, *port)
+ }
+
+ srv, err := bttest.NewServer(laddr, opts...)
if err != nil {
log.Fatalf("failed to start emulator: %v", err)
}
commit ce16f843d6c93159d86b3807c6d9ff66e43aac67
Author: Florian Klink <flokli@flokli.de>
Date: Fri Mar 29 11:53:15 2024 +0100
feat(bigtable): clean up unix socket on close
Call srv.Close when receiving an interrupt, and delete the unix domain
socket in that function.
diff --git a/bigtable/bttest/inmem.go b/bigtable/bttest/inmem.go
index 33e4bf2667..0dc96024b1 100644
--- a/bttest/inmem.go
+++ b/bttest/inmem.go
@@ -148,6 +148,11 @@ func (s *Server) Close() {
s.srv.Stop()
s.l.Close()
+
+ // clean up unix socket
+ if strings.Contains(s.Addr, "/") {
+ _ = os.Remove(s.Addr)
+ }
}
func (s *server) CreateTable(ctx context.Context, req *btapb.CreateTableRequest) (*btapb.Table, error) {
diff --git a/bigtable/cmd/emulator/cbtemulator.go b/bigtable/cmd/emulator/cbtemulator.go
index deaf69b717..5a9e8f7a8c 100644
--- a/cmd/emulator/cbtemulator.go
+++ b/cmd/emulator/cbtemulator.go
@@ -18,9 +18,12 @@ cbtemulator launches the in-memory Cloud Bigtable server on the given address.
package main
import (
+ "context"
"flag"
"fmt"
"log"
+ "os"
+ "os/signal"
"cloud.google.com/go/bigtable/bttest"
"google.golang.org/grpc"
@@ -51,11 +54,18 @@ func main() {
laddr = fmt.Sprintf("%s:%d", *host, *port)
}
+ ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
+ defer stop()
+
srv, err := bttest.NewServer(laddr, opts...)
if err != nil {
log.Fatalf("failed to start emulator: %v", err)
}
fmt.Printf("Cloud Bigtable emulator running on %s\n", srv.Addr)
- select {}
+ select {
+ case <-ctx.Done():
+ srv.Close()
+ stop()
+ }
}

View file

@ -0,0 +1,109 @@
From 96f66ec32e003c6c215aa2a644281289a71dae7d Mon Sep 17 00:00:00 2001
From: Ilan Joselevich <personal@ilanjoselevich.com>
Date: Sun, 4 Aug 2024 02:35:27 +0300
Subject: [PATCH] Fix: Use mkDerivation with src instead of runCommand for test
derivation
The problem with using runCommand and recreating the src directory with
lndir is that it changes the file types of individual files, they will
now be a symlink instead of a regular file. If you have a crate that tests
that a file is of regular type then it will fail inside the crate2nix derivation.
---
templates/nix/crate2nix/default.nix | 81 ++++++++-----------
1 file changed, 35 insertions(+), 46 deletions(-)
diff --git a/templates/nix/crate2nix/default.nix b/templates/nix/crate2nix/default.nix
index c53925e..90e10c6 100644
--- a/templates/nix/crate2nix/default.nix
+++ b/templates/nix/crate2nix/default.nix
@@ -120,52 +120,41 @@ rec {
testPostRun
]);
in
- pkgs.runCommand "run-tests-${testCrate.name}"
- {
- inherit testCrateFlags;
- buildInputs = testInputs;
- } ''
- set -e
-
- export RUST_BACKTRACE=1
-
- # recreate a file hierarchy as when running tests with cargo
-
- # the source for test data
- # It's necessary to locate the source in $NIX_BUILD_TOP/source/
- # instead of $NIX_BUILD_TOP/
- # because we compiled those test binaries in the former and not the latter.
- # So all paths will expect source tree to be there and not in the build top directly.
- # For example: $NIX_BUILD_TOP := /build in general, if you ask yourself.
- # NOTE: There could be edge cases if `crate.sourceRoot` does exist but
- # it's very hard to reason about them.
- # Open a bug if you run into this!
- mkdir -p source/
- cd source/
-
- ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${crate.src}
-
- # build outputs
- testRoot=target/debug
- mkdir -p $testRoot
-
- # executables of the crate
- # we copy to prevent std::env::current_exe() to resolve to a store location
- for i in ${crate}/bin/*; do
- cp "$i" "$testRoot"
- done
- chmod +w -R .
-
- # test harness executables are suffixed with a hash, like cargo does
- # this allows to prevent name collision with the main
- # executables of the crate
- hash=$(basename $out)
- for file in ${drv}/tests/*; do
- f=$testRoot/$(basename $file)-$hash
- cp $file $f
- ${testCommand}
- done
- '';
+ pkgs.stdenvNoCC.mkDerivation {
+ name = "run-tests-${testCrate.name}";
+
+ inherit (crate) src;
+
+ inherit testCrateFlags;
+
+ buildInputs = testInputs;
+
+ buildPhase = ''
+ set -e
+ export RUST_BACKTRACE=1
+
+ # build outputs
+ testRoot=target/debug
+ mkdir -p $testRoot
+
+ # executables of the crate
+ # we copy to prevent std::env::current_exe() to resolve to a store location
+ for i in ${crate}/bin/*; do
+ cp "$i" "$testRoot"
+ done
+ chmod +w -R .
+
+ # test harness executables are suffixed with a hash, like cargo does
+ # this allows to prevent name collision with the main
+ # executables of the crate
+ hash=$(basename $out)
+ for file in ${drv}/tests/*; do
+ f=$testRoot/$(basename $file)-$hash
+ cp $file $f
+ ${testCommand}
+ done
+ '';
+ };
in
pkgs.runCommand "${crate.name}-linked"
{
--
2.44.0

View file

@ -16,11 +16,17 @@ depot.nix.readTree.drvTargets {
};
};
};
nix_latest = super.nix.override ({
nix_latest_stable = super.nix.override ({
# flaky tests, long painful build, see https://github.com/NixOS/nixpkgs/pull/266443
withAWS = false;
});
# No longer builds with Nix 2.3 after
# https://github.com/nixos/nixpkgs/commit/5f9d2d95721cdf20ace744f2db75ad70a7aedd3a
nixos-option = super.nixos-option.override {
nix = self.nix_latest_stable;
};
home-manager = super.home-manager.overrideAttrs (_: {
src = depot.third_party.sources.home-manager;
version = "git-"
@ -79,10 +85,6 @@ depot.nix.readTree.drvTargets {
};
});
# nix-serve does not work with nix 2.4
# https://github.com/edolstra/nix-serve/issues/28
nix-serve = super.nix-serve.override { nix = self.nix_2_3; };
# Avoid builds of mkShell derivations in CI.
mkShell = super.lib.makeOverridable (args: (super.mkShell args).overrideAttrs (_: {
passthru = {
@ -90,15 +92,10 @@ depot.nix.readTree.drvTargets {
};
}));
# https://github.com/googleapis/google-cloud-go/pull/9665
cbtemulator = super.cbtemulator.overrideAttrs (old: {
patches = old.patches or [ ] ++ [
./patches/cbtemulator-uds.patch
];
});
crate2nix = super.crate2nix.overrideAttrs (old: {
patches = old.patches or [ ] ++ [
# TODO(Kranzes): Remove in next release.
./patches/crate2nix-0001-Fix-Use-mkDerivation-with-src-instead-of-runCommand.patch
# https://github.com/nix-community/crate2nix/pull/301
./patches/crate2nix-tests-debug.patch
];
@ -112,6 +109,33 @@ depot.nix.readTree.drvTargets {
];
});
# https://gcc.gnu.org/gcc-14/porting_to.html#warnings-as-errors
thttpd = super.thttpd.overrideAttrs (oldAttrs: {
NIX_CFLAGS_COMPILE = oldAttrs.NIX_CFLAGS_COMPILE or [ ] ++ [
"-Wno-error=implicit-int"
"-Wno-error=implicit-function-declaration"
];
});
# https://github.com/NixOS/nixpkgs/pull/329415/files
grpc-health-check = super.rustPlatform.buildRustPackage {
pname = "grpc-health-check";
version = "unstable-2022-08-19";
src = super.fetchFromGitHub {
owner = "paypizza";
repo = "grpc-health-check";
rev = "f61bb5e10beadc5ed53144cc540d66e19fc510bd";
hash = "sha256-nKut9c1HHIacdRcmvlXe0GrtkgCWN6sxJ4ImO0CIDdo=";
};
cargoHash = "sha256-lz+815iE+oXBQ3PfqBO0QBpZY6x1SNR7OU7BjkRszzI=";
nativeBuildInputs = [ super.protobuf ];
# tests fail
doCheck = false;
};
# Imports a patch that fixes usage of this package on versions
# >=1.9. The patch has been proposed upstream, but so far with no
# reactions from the maintainer:
@ -121,6 +145,11 @@ depot.nix.readTree.drvTargets {
patches = (old.patches or [ ]) ++ [ ./patches/tpm2-pkcs11-190-dbupgrade.patch ];
});
# Dependency isn't supported by Python 3.12
html5validator = super.html5validator.override {
python3 = self.python311;
};
# macFUSE bump containing fix for https://github.com/osxfuse/osxfuse/issues/974
# https://github.com/NixOS/nixpkgs/pull/320197
fuse =
@ -134,8 +163,9 @@ depot.nix.readTree.drvTargets {
};
}) else super.fuse;
treefmt = super.treefmt.overrideAttrs (old: {
# https://github.com/numtide/treefmt/pull/328
patches = old.patches or [ ] ++ [ ./patches/treefmt-fix-no-cache.patch ];
});
# somebody renamed 'utillinux' upstream, but didn't rename all use-cases,
# leading to some packages being broken.
#
# temporarily restore the old name to make things work again.
utillinux = self.util-linux;
}

View file

@ -0,0 +1,78 @@
From cc4718cbea1bd70de21a2be515a944802246ffc7 Mon Sep 17 00:00:00 2001
From: Vincent Ambo <mail@tazj.in>
Date: Sun, 15 Sep 2024 03:08:28 +0300
Subject: [PATCH] remove dependency on plausible
We don't need spyware, thanks.
---
package-lock.json | 9 ---------
package.json | 1 -
src/App.svelte | 8 --------
3 files changed, 18 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index d52de6c0..d96e342f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -29,7 +29,6 @@
"marked-katex-extension": "^5.1.1",
"marked-linkify-it": "^3.1.11",
"md5": "^2.3.0",
- "plausible-tracker": "^0.3.9",
"svelte": "^4.2.19",
"twemoji": "^14.0.2",
"zod": "^3.23.8"
@@ -3697,14 +3696,6 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
- "node_modules/plausible-tracker": {
- "version": "0.3.9",
- "resolved": "https://registry.npmjs.org/plausible-tracker/-/plausible-tracker-0.3.9.tgz",
- "integrity": "sha512-hMhneYm3GCPyQon88SZrVJx+LlqhM1kZFQbuAgXPoh/Az2YvO1B6bitT9qlhpiTdJlsT5lsr3gPmzoVjb5CDXA==",
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/playwright": {
"version": "1.46.1",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.46.1.tgz",
diff --git a/package.json b/package.json
index 6d569ad9..61e8d892 100644
--- a/package.json
+++ b/package.json
@@ -73,7 +73,6 @@
"marked-katex-extension": "^5.1.1",
"marked-linkify-it": "^3.1.11",
"md5": "^2.3.0",
- "plausible-tracker": "^0.3.9",
"svelte": "^4.2.19",
"twemoji": "^14.0.2",
"zod": "^3.23.8"
diff --git a/src/App.svelte b/src/App.svelte
index 8161c390..4281ba61 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -1,6 +1,4 @@
<script lang="ts">
- import Plausible from "plausible-tracker";
-
import * as router from "@app/lib/router";
import { unreachable } from "@app/lib/utils";
@@ -28,12 +26,6 @@
void router.loadFromLocation();
- if (import.meta.env.PROD) {
- const plausible = Plausible({ domain: "app.radicle.xyz" });
-
- plausible.enableAutoPageviews();
- }
-
$: document.documentElement.setAttribute("data-codefont", $codeFont);
$: document.documentElement.setAttribute("data-theme", $theme);
</script>
--
2.46.0

View file

@ -0,0 +1,66 @@
# radicle-explorer is the web UI for Radicle.
#
# They have an upstream Nix derivation, but it only works with experimental
# features Nix and is quite messy, so this is a copy of the relevant parts.
{ lib, pkgs, ... }:
let
twemoji-assets = pkgs.fetchFromGitHub {
owner = "twitter";
repo = "twemoji";
rev = "v14.0.2";
hash = "sha256-YoOnZ5uVukzi/6bLi22Y8U5TpplPzB7ji42l+/ys5xI=";
};
httpdSrc = pkgs.radicle-httpd.src;
in
lib.fix (self: pkgs.buildNpmPackage rec {
pname = "radicle-explorer";
version = (builtins.fromJSON (builtins.readFile "${src}/package.json")).version;
# source should be synced with the httpd, which is already in nixpkgs
src = pkgs.fetchgit {
inherit (httpdSrc) url rev;
hash = "sha256:09m13238h6j7g02r6332ihgyyzbjx90pgz14rz29pgv7936h6il8";
};
# This might change during nixpkgs bumps and will need updating. Need to fix
# upstream so that there is a normal, callable derivation.
npmDepsHash = "sha256:1hbrzfjkfc0q8qk03yi6qb9zqm57h7hnkn7fl0yxkrzbrljaljaz";
patches = [
./0001-remove-dependency-on-plausible.patch
];
postPatch = ''
patchShebangs --build ./scripts
mkdir -p "public/twemoji"
cp -t public/twemoji -r -- ${twemoji-assets}/assets/svg/*
: >scripts/install-twemoji-assets
'';
dontConfigure = true;
doCheck = false;
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -r -t "$out" build/*
runHook postInstall
'';
# Override the build-time configuration with other preferred seeds which are
# displayed on the landing page.
passthru.withPreferredSeeds = seeds:
let
originalConfig = builtins.fromJSON (builtins.readFile "${src}/config/default.json");
config = originalConfig // {
preferredSeeds = seeds;
};
newConfig = pkgs.writeText "local.json" (builtins.toJSON config);
in
self.overrideAttrs (_: {
preBuild = ''
cp ${newConfig} config/local.json
'';
});
})

View file

@ -292,130 +292,4 @@ depot.nix.readTree.drvTargets rec{
sha256 = "1kd047p8jv6mhmfzddjvfa2nwkfrb3l1wml6lfm51n1cr06cc9lz";
};
libz-sys = buildRustCrate {
pname = "libz-sys";
version = "1.1.2";
sha256 = "1y7v6bkwr4b6yaf951p1ns7mx47b29ziwdd5wziaic14gs1gwq30";
buildDependencies = [
cc
pkg-config
];
};
libgit2-sys = buildRustCrate {
pname = "libgit2-sys";
version = "0.16.2+1.7.2";
sha256 = "0bs446idbmg8s13jvb0ck6qmrskcdn2mp3d4mn9ggxbmiw4ryd3g";
dependencies = [
libc
libz-sys
];
libPath = "lib.rs";
libName = "libgit2_sys";
# TODO: this should be available via `pkgs.defaultCrateOverrides`,
# I thought that was included by default?
nativeBuildInputs = [ pkg-config ];
buildInputs = [ pkgs.zlib pkgs.libgit2 ];
buildDependencies = [
cc
pkg-config
];
env.LIBGIT2_NO_VENDOR = "1";
};
matches = buildRustCrate {
pname = "matches";
version = "0.1.8";
sha256 = "03hl636fg6xggy0a26200xs74amk3k9n0908rga2szn68agyz3cv";
libPath = "lib.rs";
};
percent-encoding = buildRustCrate {
pname = "percent-encoding";
version = "2.1.0";
sha256 = "0i838f2nr81585ckmfymf8l1x1vdmx6n8xqvli0lgcy60yl2axy3";
libPath = "lib.rs";
};
form_urlencoded = buildRustCrate {
pname = "form_urlencoded";
version = "1.0.1";
sha256 = "0rhv2hfrzk2smdh27walkm66zlvccnnwrbd47fmf8jh6m420dhj8";
dependencies = [
matches
percent-encoding
];
};
tinyvec_macros = buildRustCrate {
pname = "tinyvec_macros";
version = "0.1.0";
sha256 = "0aim73hyq5g8b2hs9gjq2sv0xm4xzfbwp5fdyg1frljqzkapq682";
};
tinyvec = buildRustCrate {
pname = "tinyvec";
version = "1.2.0";
sha256 = "1c95nma20kiyrjwfsk7hzd5ir6yy4bm63fmfbfb4dm9ahnlvdp3y";
features = [ "alloc" ];
dependencies = [
tinyvec_macros
];
};
unicode-normalization = buildRustCrate {
pname = "unicode-normalization";
version = "0.1.17";
sha256 = "0w4s0avzlf7pzcclhhih93aap613398sshm6jrxcwq0f9lhis11c";
dependencies = [
tinyvec
];
};
unicode-bidi = buildRustCrate {
pname = "unicode-bidi";
version = "0.3.5";
sha256 = "193jzlxj1dfcms2381lyd45zh4ywlicj9lzcfpid1zbkmfarymkz";
dependencies = [
matches
];
};
idna = buildRustCrate {
pname = "idna";
version = "0.2.3";
sha256 = "0hwypd0fpym9lmd4bbqpwyr5lhrlvmvzhi1vy9asc5wxwkzrh299";
dependencies = [
matches
unicode-normalization
unicode-bidi
];
};
url = buildRustCrate {
pname = "url";
version = "2.2.1";
sha256 = "1ci1djafh83qhpzbmxnr9w5gcrjs3ghf8rrxdy4vklqyji6fvn5v";
dependencies = [
form_urlencoded
idna
matches
percent-encoding
];
};
git2 = buildRustCrate {
pname = "git2";
edition = "2018";
version = "0.18.1";
sha256 = "1d1wm8cn37svyxgvzfapwilkkc9d2x7fcrgciwn8b2pv9aqz102k";
dependencies = [
bitflags
libc
libgit2-sys
log
url
];
};
}

View file

@ -5,10 +5,22 @@
"homepage": "https://matrix.to/#/#agenix:nixos.org",
"owner": "ryantm",
"repo": "agenix",
"rev": "c2fc0762bbe8feb06a2e59a364fa81b3a57671c9",
"sha256": "1lpkwinlax40b7xgzspbkm9rsi4a1x48hxhixnni4irxxwnav0ah",
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
"sha256": "1x8nd8hvsq6mvzig122vprwigsr3z2skanig65haqswn7z7amsvg",
"type": "tarball",
"url": "https://github.com/ryantm/agenix/archive/c2fc0762bbe8feb06a2e59a364fa81b3a57671c9.tar.gz",
"url": "https://github.com/ryantm/agenix/archive/f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"gitignore.nix": {
"branch": "master",
"description": "Nix functions for filtering local git sources",
"homepage": "",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"sha256": "02wxkdpbhlm3yk5mhkhsp3kwakc16xpmsf2baw57nz1dg459qv8w",
"type": "tarball",
"url": "https://github.com/hercules-ci/gitignore.nix/archive/637db329424fd7e46cf4185293b9cc8c88c95394.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"home-manager": {
@ -17,10 +29,10 @@
"homepage": "https://nix-community.github.io/home-manager/",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a7117efb3725e6197dd95424136f79147aa35e5b",
"sha256": "02q3ck1hjs8xzdhfikqxrnsfs9vh4p7rmdha3vbp6nkkdbdvhgg7",
"rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2",
"sha256": "1vklmr0vzhplcjcqg19v66c1swg3xcgw96ry90dyd4hl2cb9j80b",
"type": "tarball",
"url": "https://github.com/nix-community/home-manager/archive/a7117efb3725e6197dd95424136f79147aa35e5b.tar.gz",
"url": "https://github.com/nix-community/home-manager/archive/10e99c43cdf4a0713b4e81d90691d22c6a58bdf2.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"impermanence": {
@ -29,10 +41,10 @@
"homepage": "",
"owner": "nix-community",
"repo": "impermanence",
"rev": "a33ef102a02ce77d3e39c25197664b7a636f9c30",
"sha256": "1mig6ns8l5iynsm6pfbnx2b9hmr592s1kqbw6gq1n25czdlcniam",
"rev": "d000479f4f41390ff7cf9204979660ad5dd16176",
"sha256": "1xj0kw8w1xv4g1k64k9mak6j8c044rrrkz7ik22z3qsayaqiylm2",
"type": "tarball",
"url": "https://github.com/nix-community/impermanence/archive/a33ef102a02ce77d3e39c25197664b7a636f9c30.tar.gz",
"url": "https://github.com/nix-community/impermanence/archive/d000479f4f41390ff7cf9204979660ad5dd16176.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"naersk": {
@ -41,10 +53,10 @@
"homepage": "",
"owner": "nmattia",
"repo": "naersk",
"rev": "fa19d8c135e776dc97f4dcca08656a0eeb28d5c0",
"sha256": "1mif058gcbw5d5yixsmzalqlr0h9m9mmbsgv8v4r2mmsbw83k2x0",
"rev": "378614f37a6bee5a3f2ef4f825a73d948d3ae921",
"sha256": "088pbn3jcckbhzg7kr9bhii9vgrnr6y2mrqnw30bk4jhbjkrk1bb",
"type": "tarball",
"url": "https://github.com/nmattia/naersk/archive/fa19d8c135e776dc97f4dcca08656a0eeb28d5c0.tar.gz",
"url": "https://github.com/nmattia/naersk/archive/378614f37a6bee5a3f2ef4f825a73d948d3ae921.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"napalm": {
@ -53,10 +65,10 @@
"homepage": "",
"owner": "nix-community",
"repo": "napalm",
"rev": "edcb26c266ca37c9521f6a97f33234633cbec186",
"sha256": "0ai1ax380nnpz0mbgbc5vdzafyjilcmdj7kgv087x2vagpprb4yy",
"rev": "e1babff744cd278b56abe8478008b4a9e23036cf",
"sha256": "04h62p4hxw7fhclki7hcn739hhig3rh9q4njp24j7bm0dk2kj8h6",
"type": "tarball",
"url": "https://github.com/nix-community/napalm/archive/edcb26c266ca37c9521f6a97f33234633cbec186.tar.gz",
"url": "https://github.com/nix-community/napalm/archive/e1babff744cd278b56abe8478008b4a9e23036cf.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
@ -65,10 +77,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7f993cdf26ccef564eabf31fdb40d140821e12bc",
"sha256": "0dypbvibfdmv14rqlamf451625fw2fyk11prw9bbywi0q2i313d5",
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
"sha256": "1fs25csg0lq3v34jdzxr2qdvnyvylimmfh0qxlf39h4j1hclvbyj",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/7f993cdf26ccef564eabf31fdb40d140821e12bc.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/88195a94f390381c6afcdaa933c2f6ff93959cb4.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-stable": {
@ -77,10 +89,10 @@
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a2e1d0414259a144ebdc048408a807e69e0565af",
"sha256": "1jv90bz3s7j294fhpb29k735fg3xfs9z848szicqarpbz7wfg03g",
"rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5",
"sha256": "1f5d2g1p6nfwycpmrnnmc2xmcszp804adp16knjvdkj8nz36y1fg",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/a2e1d0414259a144ebdc048408a807e69e0565af.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/205fd4226592cc83fd4c0885a3e4c9c400efabb5.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"rust-overlay": {
@ -89,10 +101,10 @@
"homepage": "",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465",
"sha256": "0vqgkzbfdj920lbm1dy8kylrv2gk4ard38lb3i20xvp2mp1d39n2",
"rev": "d199142e84bfaae476ffb4e09a70879d7918784d",
"sha256": "1bhapkiiii984m86cp1xkr8jh0i86vmbl5z3b9nzylfg0y7fij5f",
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/6dc3e45fe4aee36efeed24d64fc68b1f989d5465.tar.gz",
"url": "https://github.com/oxalica/rust-overlay/archive/d199142e84bfaae476ffb4e09a70879d7918784d.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"rustsec-advisory-db": {
@ -101,10 +113,10 @@
"homepage": "https://rustsec.org",
"owner": "RustSec",
"repo": "advisory-db",
"rev": "af76d4423761499f954411bb3071dcc72e6b0450",
"sha256": "167qxr66j638km3z7zk2drjdr4bgqz77hr35vkwdp0lbafmd6y1c",
"rev": "3c6d3186ab06737d1defd2b5ae556d0ecd161603",
"sha256": "05cg2fhjqv4xly1g5a8dm0bc08yzzqn2is5s7c7kczib3j4gpiq5",
"type": "tarball",
"url": "https://github.com/RustSec/advisory-db/archive/af76d4423761499f954411bb3071dcc72e6b0450.tar.gz",
"url": "https://github.com/RustSec/advisory-db/archive/3c6d3186ab06737d1defd2b5ae556d0ecd161603.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

602
tools/cheddar/Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -8,6 +8,7 @@ depot.nix.lazy-deps {
depotfmt.attr = "tools.depotfmt";
fetch-depot-inbox.attr = "tools.fetch-depot-inbox";
git-r.attr = "tools.git-r";
git-review.attr = "third_party.nixpkgs.git-review";
gerrit-update.attr = "tools.gerrit-update";
gerrit.attr = "tools.gerrit-cli";
hash-password.attr = "tools.hash-password";

View file

@ -1,24 +1,14 @@
# Builds treefmt for depot, with a hardcoded configuration that
# includes the right paths to formatters.
{ depot, pkgs, ... }:
{ pkgs, ... }:
let
# terraform fmt can't handle multiple paths at once, but treefmt
# expects this
terraformat = pkgs.writeShellScript "terraformat" ''
echo "$@" | xargs -n1 ${pkgs.terraform}/bin/terraform fmt
'';
config = pkgs.writeText "depot-treefmt-config" ''
[formatter.go]
command = "${depot.nix.buildGo.go}/bin/gofmt"
command = "${pkgs.go}/bin/gofmt"
options = [ "-w" ]
includes = ["*.go"]
[formatter.tf]
command = "${terraformat}"
includes = [ "*.tf" ]
[formatter.nix]
command = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"
includes = [ "*.nix" ]
@ -28,8 +18,10 @@ let
[formatter.rust]
command = "${pkgs.rustfmt}/bin/rustfmt"
options = ["--edition", "2021"]
includes = [ "*.rs" ]
excludes = [
"users/emery/*",
"users/tazjin/*",
]
'';
@ -53,10 +45,12 @@ let
'';
in
depotfmt.overrideAttrs (_: {
passthru.config = config;
passthru.meta.ci.extraSteps.check = {
label = "depot formatting check";
command = check;
alwaysRun = true;
passthru = {
inherit config check;
meta.ci.extraSteps.check = {
label = "depot formatting check";
command = check;
alwaysRun = true;
};
};
})

View file

@ -0,0 +1,23 @@
{ depot, pkgs, ... }:
let
em = depot.tools.eaglemode;
in
em.mkCommand {
name = "9 B";
hotkey = "Ctrl+E";
icon = "${./plan9.tga}";
description = ''
Plumb target to Sam or Acme
'';
code = ''
ErrorIfNotSingleTarget();
my @tgt=GetTgt();
my $dir=$tgt[0];
ExecOrError('${pkgs.plan9port}/bin/9', 'B', $dir);
'';
}

View file

@ -0,0 +1,26 @@
{ depot, pkgs, ... }:
let
em = depot.tools.eaglemode;
icon = em.mkTGA "emacs" "${pkgs.emacs}/share/icons/hicolor/128x128/apps/emacs.png";
in
em.mkCommand {
name = "Emacsclient";
hotkey = "Ctrl+E";
icon = "${icon}";
description = ''
Open target in Emacsclient.
Emacs server must be running already for this to have any effect.
'';
code = ''
ErrorIfNotSingleTarget();
my @tgt=GetTgt();
my $dir=$tgt[0];
ExecOrError('${pkgs.emacs}/bin/emacsclient', '-n', $dir);
'';
}

Binary file not shown.

146
tools/eaglemode/default.nix Normal file
View file

@ -0,0 +1,146 @@
# Helper functions for extending Eagle Mode with useful stuff.
#
# Eagle Mode's customisation usually expects people to copy the entire
# configuration into their user folder, which we can automate fairly easily
# using Nix, letting users choose whether to keep upstream config or not.
{ depot, lib, pkgs, ... }:
let
mkDesc = d: lib.concatMapStringsSep "\n"
(x: "# Descr =${x}")
(builtins.filter (s: s != "") (lib.splitString "\n" d));
configWrapper = pkgs.runCommand "eaglemode-config-wrapper" { } ''
cp ${./wrapper.go} wrapper.go
export HOME=$PWD
${pkgs.go}/bin/go build wrapper.go
install -Dm755 wrapper $out/bin/wrapper
'';
in
rec {
# mkCommand creates an Eagle Mode command for the file browser.
#
# Commands are basically little Perl scripts with a command standard library
# available. They receive the user's selected target from Eagle Mode.
mkCommand = lib.makeOverridable (
{
# Name of the command.
name
, # User-facing description, displayed in Eagle Mode UI. Can be multi-line.
description
, # Verbatim Perl code of the command. Command library is already available.
code
, # Caption for the UI button (defaults to name).
caption ? name
, icon ? "terminal.tga"
, # TODO: what's a good default?
hotkey ? ""
, order ? 1.0
}: pkgs.writeTextDir "emFileMan/Commands/${name}.pl" (''
#!${pkgs.perl}/bin/perl
#[[BEGIN PROPERTIES]]
# Type = Command
# Interpreter = perl
# DefaultFor = directory
# Caption = ${caption}
# Order = ${toString order}
# Icon = ${icon}
''
+ (lib.optionalString (description != "") "${mkDesc description}\n")
+ (lib.optionalString (hotkey != "") "# Hotkey = ${hotkey}\n")
+ ''
#[[END PROPERTIES]]
use strict;
use warnings;
BEGIN { require "$ENV{'EM_DIR'}/res/emFileMan/scripts/cmd-util.pl"; }
${if builtins.isString code
then code
else (if builtins.isPath code
then builtins.readFile code
else throw "code must be a string (literal code) or path to file")}
'')
);
# mkTGA converts the given image to a TGA image.
mkTGA = name: path: pkgs.runCommand "${name}.tga" { } ''
${pkgs.imagemagick}/bin/convert ${path} $out
'';
buildPlugin = lib.makeOverridable (
{ name
, src
, version
, eaglemode ? pkgs.eaglemode
, target ? name
, extraNativeBuildInputs ? [ ]
, extraBuildInputs ? [ ]
}:
pkgs.stdenv.mkDerivation {
pname = "eaglemode-plugin-${name}";
inherit src version;
# inherit (eaglemode.drvAttrs) dontPatchELF;
nativeBuildInputs = eaglemode.drvAttrs.nativeBuildInputs ++ extraNativeBuildInputs;
buildInputs = eaglemode.drvAttrs.buildInputs ++ extraBuildInputs ++ [ eaglemode ];
buildPhase = ''
runHook preBuild
# merge eaglemode & plugin folders
cp -r ${pkgs.srcOnly eaglemode} merged-src && chmod -R u+rw merged-src
cp -r $src/* merged-src && chmod -R u+rw merged-src
cd merged-src
export NIX_LDFLAGS="$NIX_LDFLAGS -lXxf86vm -lXext -lXinerama"
perl make.pl build projects=${target} continue=no
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cp -r lib/lib${target}.so $out/lib
if [ -d "$src/etc" ]; then
cp -r $src/etc/* $out
fi
runHook postInstall
'';
}
);
# etcDir creates a directory layout suitable for use in the EM_USER_CONFIG_DIR
# environment variable.
#
# Note that Eagle Mode requires the value of that variable to be mutable at
# runtime (it is the same place where it persists all of its user-controlled
# state), so the results of this function can not be used directly.
etcDir =
{ eaglemode ? pkgs.eaglemode
, extraPaths ? [ ]
}: pkgs.runCommand "eaglemode-config" { } ''
mkdir $out
${
lib.concatMapStringsSep "\n" (s: "cp -rT ${s} $out/\nchmod -R u+rw $out/\n") ([ "${eaglemode}/etc"] ++ extraPaths)
}
'';
# withConfig creates an Eagle Mode wrapper that runs it with the given
# configuration.
withConfig = { eaglemode ? pkgs.eaglemode, config }: pkgs.writeShellScriptBin "eaglemode" ''
${configWrapper}/bin/wrapper --em-config "${config}"
if [ -d "${config}/lib" ]; then
export LD_LIBRARY_PATH="${config}/lib:$LD_LIBRARY_PATH"
exec ${eaglemode}/bin/eaglemode "$@"
fi
exec ${eaglemode}/bin/eaglemode "$@"
'';
}

View file

@ -0,0 +1,10 @@
{ depot, pkgs, ... }:
depot.tools.eaglemode.buildPlugin {
name = "avif";
version = "canon";
src = ./.;
target = "PlAvif";
extraBuildInputs = [ pkgs.libavif ];
extraNativeBuildInputs = [ pkgs.pkg-config ];
}

View file

@ -0,0 +1,6 @@
#%rec:emFpPlugin%#
FileTypes = { ".avif" }
Priority = 1.0
Library = "PlAvif"
Function = "PlAvifFpPluginFunc"

View file

@ -0,0 +1,64 @@
package PlAvif;
use strict;
use warnings;
sub GetDependencies
{
return ('emCore');
}
sub IsEssential
{
return 0;
}
sub GetFileHandlingrules
{
return ();
}
sub GetExtraBuildOptions
{
return ();
}
sub Build
{
shift;
my %options=@_;
my @libAvifFlags=();
if ($options{'avif-inc-dir'} eq '' && $options{'avif-lib-dir'} eq '') {
@libAvifFlags=split("\n",readpipe(
"perl \"".$options{'utils'}."/PkgConfig.pl\" libavif"
));
}
if (!@libAvifFlags) {
if ($options{'avif-inc-dir'} ne '') {
push(@libAvifFlags, "--inc-search-dir", $options{'avif-inc-dir'});
}
if ($options{'avif-lib-dir'} ne '') {
push(@libAvifFlags, "--lib-search-dir", $options{'avif-lib-dir'});
}
push(@libAvifFlags, "--link", "avif");
}
system(
@{$options{'unicc_call'}},
"--math",
"--rtti",
"--exceptions",
"--bin-dir" , "bin",
"--lib-dir" , "lib",
"--obj-dir" , "obj",
"--inc-search-dir", "include",
@libAvifFlags,
"--link" , "emCore",
"--type" , "dynlib",
"--name" , "PlAvif",
"src/PlAvif.cpp"
)==0 or return 0;
return 1;
}

View file

@ -0,0 +1,190 @@
#include <emCore/emFpPlugin.h>
#include <emCore/emImageFile.h>
#include "avif/avif.h"
class PlAvifImageFileModel : public emImageFileModel
{
public:
static emRef<PlAvifImageFileModel> Acquire(
emContext & context, const emString & name, bool common=true
);
protected:
PlAvifImageFileModel(emContext & context, const emString & name);
virtual ~PlAvifImageFileModel();
virtual void TryStartLoading();
virtual bool TryContinueLoading();
virtual void QuitLoading();
virtual void TryStartSaving();
virtual bool TryContinueSaving();
virtual void QuitSaving();
virtual emUInt64 CalcMemoryNeed();
virtual double CalcFileProgress();
private:
struct LoadingState;
LoadingState * L = NULL;
};
struct PlAvifImageFileModel::LoadingState {
avifRGBImage rgb;
avifDecoder * decoder;
};
emRef<PlAvifImageFileModel> PlAvifImageFileModel::Acquire(
emContext & context, const emString & name, bool common
)
{
EM_IMPL_ACQUIRE(PlAvifImageFileModel, context, name, common)
}
PlAvifImageFileModel::PlAvifImageFileModel(
emContext & context, const emString & name
)
: emImageFileModel(context, name)
{
}
PlAvifImageFileModel::~PlAvifImageFileModel()
{
PlAvifImageFileModel::QuitLoading();
PlAvifImageFileModel::QuitSaving();
}
void PlAvifImageFileModel::TryStartLoading()
{
avifResult result;
L = new LoadingState;
memset(L, 0, sizeof(LoadingState));
L->decoder = avifDecoderCreate();
if (L->decoder == NULL) {
throw emException("failed to create AVIF decoder");
}
result = avifDecoderSetIOFile(L->decoder, GetFilePath());
if (result != AVIF_RESULT_OK) {
throw emException("%s", avifResultToString(result));
}
result = avifDecoderParse(L->decoder);
if (result != AVIF_RESULT_OK) {
throw emException("%s", avifResultToString(result));
}
FileFormatInfo = emString::Format(
"AVIF %s %ubpc",
avifPixelFormatToString(L->decoder->image->yuvFormat),
L->decoder->image->depth
);
Signal(ChangeSignal);
}
bool PlAvifImageFileModel::TryContinueLoading()
{
avifResult result;
if (!Image.GetHeight()) {
Image.Setup(
L->decoder->image->width,
L->decoder->image->height,
L->decoder->alphaPresent ? 4 : 3
);
}
result = avifDecoderNextImage(L->decoder);
if (result != AVIF_RESULT_OK) {
throw emException("%s", avifResultToString(result));
}
avifRGBImageSetDefaults(&L->rgb, L->decoder->image);
L->rgb.format = L->decoder->alphaPresent ?
AVIF_RGB_FORMAT_RGBA : AVIF_RGB_FORMAT_RGB;
L->rgb.pixels = Image.GetWritableMap();
L->rgb.width = Image.GetWidth();
L->rgb.height = Image.GetHeight();
L->rgb.depth = 8;
L->rgb.rowBytes = Image.GetWidth() * Image.GetChannelCount();
result = avifImageYUVToRGB(L->decoder->image, &L->rgb);
if (result != AVIF_RESULT_OK) {
throw emException("%s", avifResultToString(result));
}
Signal(ChangeSignal);
return true;
}
void PlAvifImageFileModel::QuitLoading()
{
if (L) {
if (L->decoder) avifDecoderDestroy(L->decoder);
delete L;
L = NULL;
}
}
void PlAvifImageFileModel::TryStartSaving()
{
throw emException("PlAvifImageFileModel: Saving not implemented.");
}
bool PlAvifImageFileModel::TryContinueSaving()
{
return false;
}
void PlAvifImageFileModel::QuitSaving()
{
}
emUInt64 PlAvifImageFileModel::CalcMemoryNeed()
{
return
(emUInt64)
L->decoder->image->width *
L->decoder->image->height *
(L->decoder->alphaPresent ? 4 : 3);
}
double PlAvifImageFileModel::CalcFileProgress()
{
return 0.0;
}
extern "C" {
emPanel * PlAvifFpPluginFunc(
emPanel::ParentArg parent, const emString & name,
const emString & path, emFpPlugin * plugin,
emString * errorBuf
)
{
if (plugin->Properties.GetCount()) {
*errorBuf="PlAvifFpPlugin: No properties allowed.";
return NULL;
}
return new emImageFilePanel(
parent, name,
PlAvifImageFileModel::Acquire(
parent.GetRootContext(), path
)
);
}
}

View file

@ -0,0 +1,17 @@
{ depot, pkgs, ... }:
let
em = depot.tools.eaglemode;
emSrc = with pkgs; srcOnly eaglemode;
in
em.buildPlugin {
name = "example";
version = "canon";
src = pkgs.runCommand "em-plugin-example-src" { } ''
set -ux
cp -r ${emSrc}/doc/examples/CppApiExamples/PluginExample $out
'';
target = "PlEx";
}

View file

@ -0,0 +1,12 @@
{ depot, pkgs, ... }:
let
em = depot.tools.eaglemode;
emSrc = pkgs.srcOnly pkgs.em;
in
em.buildPlugin {
name = "qoi";
version = "canon";
src = ./.;
target = "PlQoi";
}

View file

@ -0,0 +1,6 @@
#%rec:emFpPlugin%#
FileTypes = { ".qoi" }
Priority = 1.0
Library = "PlQoi"
Function = "PlQoiFpPluginFunc"

View file

@ -0,0 +1,47 @@
package PlQoi;
use strict;
use warnings;
sub GetDependencies
{
return ('emCore');
}
sub IsEssential
{
return 0;
}
sub GetFileHandlingrules
{
return ();
}
sub GetExtraBuildOptions
{
return ();
}
sub Build
{
shift;
my %options=@_;
system(
@{$options{'unicc_call'}},
"--math",
"--rtti",
"--exceptions",
"--bin-dir" , "bin",
"--lib-dir" , "lib",
"--obj-dir" , "obj",
"--inc-search-dir", "include",
"--link" , "emCore",
"--type" , "dynlib",
"--name" , "PlQoi",
"src/PlQoi.cpp"
)==0 or return 0;
return 1;
}

View file

@ -0,0 +1,273 @@
#include <emCore/emFpPlugin.h>
#include <emCore/emImageFile.h>
/*
QOI Utilities
Copyright (c) 2021, Dominic Szablewski - https://phoboslab.org
SPDX-License-Identifier: MIT
*/
#define QOI_OP_INDEX 0x00 /* 00xxxxxx */
#define QOI_OP_DIFF 0x40 /* 01xxxxxx */
#define QOI_OP_LUMA 0x80 /* 10xxxxxx */
#define QOI_OP_RUN 0xc0 /* 11xxxxxx */
#define QOI_OP_RGB 0xfe /* 11111110 */
#define QOI_OP_RGBA 0xff /* 11111111 */
#define QOI_MASK_2 0xc0 /* 11000000 */
#define QOI_COLOR_HASH(C) (C.GetRed()*3 + C.GetGreen()*5 + C.GetBlue()*7 + C.GetAlpha()*11)
#define QOI_MAGIC \
(((unsigned int)'q') << 24 | ((unsigned int)'o') << 16 | \
((unsigned int)'i') << 8 | ((unsigned int)'f'))
#define QOI_HEADER_SIZE 14
static unsigned int qoi_read_32(const unsigned char *bytes, int *p) {
unsigned int a = bytes[(*p)++];
unsigned int b = bytes[(*p)++];
unsigned int c = bytes[(*p)++];
unsigned int d = bytes[(*p)++];
return a << 24 | b << 16 | c << 8 | d;
}
class PlQoiImageFileModel : public emImageFileModel
{
public:
static emRef<PlQoiImageFileModel> Acquire(
emContext & context, const emString & name, bool common=true
);
protected:
PlQoiImageFileModel(emContext & context, const emString & name);
virtual ~PlQoiImageFileModel();
virtual void TryStartLoading();
virtual bool TryContinueLoading();
virtual void QuitLoading();
virtual void TryStartSaving();
virtual bool TryContinueSaving();
virtual void QuitSaving();
virtual emUInt64 CalcMemoryNeed();
virtual double CalcFileProgress();
private:
struct LoadingState;
LoadingState * L = NULL;
};
struct PlQoiImageFileModel::LoadingState {
FILE * file;
unsigned int width, height, channels;
size_t file_len;
};
emRef<PlQoiImageFileModel> PlQoiImageFileModel::Acquire(
emContext & context, const emString & name, bool common
)
{
EM_IMPL_ACQUIRE(PlQoiImageFileModel, context, name, common)
}
PlQoiImageFileModel::PlQoiImageFileModel(
emContext & context, const emString & name
)
: emImageFileModel(context, name)
{
}
PlQoiImageFileModel::~PlQoiImageFileModel()
{
PlQoiImageFileModel::QuitLoading();
PlQoiImageFileModel::QuitSaving();
}
void PlQoiImageFileModel::TryStartLoading()
{
unsigned char header[QOI_HEADER_SIZE];
unsigned int header_magic, colorspace;
int pos = 0;
L = new LoadingState;
memset(L, 0, sizeof(LoadingState));
L->file = fopen(GetFilePath(),"rb");
if (!L->file) throw emException("%s",emGetErrorText(errno).Get());
if (fread(header, 1, sizeof(header), L->file) != sizeof(header)) {
if (ferror(L->file)) {
throw emException("%s",emGetErrorText(errno).Get());
}
else {
throw emException("QOI header not found");
}
}
header_magic = qoi_read_32(header, &pos);
L->width = qoi_read_32(header, &pos);
L->height = qoi_read_32(header, &pos);
L->channels = header[pos++];
colorspace = header[pos++];
if (
L->width == 0 || L->height == 0 ||
L->channels < 3 || L->channels > 4 ||
colorspace > 1 ||
header_magic != QOI_MAGIC
) {
throw emException("QOI header not valid");
}
fseek(L->file, 0, SEEK_END);
L->file_len = ftell(L->file);
if (L->file_len <= QOI_HEADER_SIZE || fseek(L->file, 0, SEEK_SET) != 0) {
throw emException("QOI data incomplete");
}
FileFormatInfo = "QOI ";
FileFormatInfo += (
colorspace ? "all channels linear" : "sRGB with linear alpha"
);
Signal(ChangeSignal);
}
bool PlQoiImageFileModel::TryContinueLoading()
{
emArray<unsigned char> data;
emColor index[64];
emColor px { 0, 0, 0, 255 };
int pos = QOI_HEADER_SIZE;
int run = 0;
if (!Image.GetHeight()) {
Image.Setup(L->width, L->height, L->channels);
}
data.SetCount(L->file_len);
if (fread(data.GetWritable(), 1, L->file_len, L->file) < L->file_len) {
if (ferror(L->file)) {
throw emException("%s",emGetErrorText(errno).Get());
}
else {
throw emException("QOI data incomplete");
}
}
memset(index, 0, sizeof(index));
for (int px_y = 0; px_y < L->height; px_y++) {
for (int px_x = 0; px_x < L->width; px_x++) {
if (run > 0) {
run--;
} else if (pos < data.GetCount()) {
int b1 = data.Get(pos++);
if (b1 == QOI_OP_RGB) {
px.SetRed( data.Get(pos++));
px.SetGreen( data.Get(pos++));
px.SetBlue( data.Get(pos++));
} else if (b1 == QOI_OP_RGBA) {
px.SetRed( data.Get(pos++));
px.SetGreen( data.Get(pos++));
px.SetBlue( data.Get(pos++));
px.SetAlpha( data.Get(pos++));
} else if ((b1 & QOI_MASK_2) == QOI_OP_INDEX) {
px = index[b1];
} else if ((b1 & QOI_MASK_2) == QOI_OP_DIFF) {
px.SetRed(
px.GetRed() + ((b1 >> 4) & 0x03) - 2);
px.SetGreen(
px.GetGreen() + ((b1 >> 2) & 0x03) - 2);
px.SetBlue(
px.GetBlue() + ( b1 & 0x03) - 2);
} else if ((b1 & QOI_MASK_2) == QOI_OP_LUMA) {
int b2 = data.Get(pos++);
int vg = (b1 & 0x3f) - 32;
px.SetRed(
px.GetRed() + vg - 8 + ((b2 >> 4) & 0x0f));
px.SetGreen(
px.GetGreen() + vg);
px.SetBlue(
px.GetBlue() + vg - 8 + (b2 & 0x0f));
} else if ((b1 & QOI_MASK_2) == QOI_OP_RUN) {
run = (b1 & 0x3f);
}
index[QOI_COLOR_HASH(px) % 64] = px;
}
Image.SetPixel(px_x, px_y, px);
}
}
Signal(ChangeSignal);
return true;
}
void PlQoiImageFileModel::QuitLoading()
{
if (L) {
if (L->file) fclose(L->file);
delete L;
L = NULL;
}
}
void PlQoiImageFileModel::TryStartSaving()
{
throw emException("PlQoiImageFileModel: Saving not implemented.");
}
bool PlQoiImageFileModel::TryContinueSaving()
{
return false;
}
void PlQoiImageFileModel::QuitSaving()
{
}
emUInt64 PlQoiImageFileModel::CalcMemoryNeed()
{
return
(emUInt64)L->width * L->height * L->channels + L->file_len;
}
double PlQoiImageFileModel::CalcFileProgress()
{
return 0.0;
}
extern "C" {
emPanel * PlQoiFpPluginFunc(
emPanel::ParentArg parent, const emString & name,
const emString & path, emFpPlugin * plugin,
emString * errorBuf
)
{
if (plugin->Properties.GetCount()) {
*errorBuf="PlQoiFpPlugin: No properties allowed.";
return NULL;
}
return new emImageFilePanel(
parent, name,
PlQoiImageFileModel::Acquire(
parent.GetRootContext(), path
)
);
}
}

View file

@ -0,0 +1,18 @@
{ depot, pkgs, ... }:
let
em = depot.tools.eaglemode;
emSrc = with pkgs; srcOnly eaglemode;
in
(em.buildPlugin {
name = "yatracker";
version = "canon";
src = ./.;
target = "PlYaTracker";
}).overrideAttrs (_: {
postInstall = ''
mkdir -p $out/icons
${pkgs.imagemagick}/bin/convert $src/logo.webp $out/icons/yandex-tracker.tga
'';
})

View file

@ -0,0 +1,6 @@
#%rec:emFpPlugin%#
FileTypes = { ".YaTracker" }
Priority = 1.0
Library = "PlYaTracker"
Function = "PlYaTrackerPluginFunc"

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,47 @@
package PlYaTracker;
use strict;
use warnings;
sub GetDependencies
{
return ('emCore');
}
sub IsEssential
{
return 0;
}
sub GetFileHandlingRules
{
return ();
}
sub GetExtraBuildOptions
{
return ();
}
sub Build
{
shift;
my %options=@_;
system(
@{$options{'unicc_call'}},
"--math",
"--rtti",
"--exceptions",
"--bin-dir" , "bin",
"--lib-dir" , "lib",
"--obj-dir" , "obj",
"--inc-search-dir", "include",
"--link" , "emCore",
"--type" , "dynlib",
"--name" , "PlYaTracker",
"src/PlYaTracker/PlYaTracker.cpp"
)==0 or return 0;
return 1;
}

View file

@ -0,0 +1,58 @@
#include <emCore/emFilePanel.h>
#include <emCore/emFpPlugin.h>
#include <emCore/emRecFileModel.h>
#include <emCore/emToolkit.h>
class PlYaTrackerConfig final : public emRecFileModel, public emStructRec {
public:
static emRef<PlYaTrackerConfig> Acquire(emContext& context,
const emString& name,
bool common = true);
virtual const char* GetFormatName() const;
emStringRec URL;
emStringRec Token;
protected:
PlYaTrackerConfig(emContext& context, const emString& name);
};
emRef<PlYaTrackerConfig> PlYaTrackerConfig::Acquire(emContext& context,
const emString& name,
bool common) {
EM_IMPL_ACQUIRE(PlYaTrackerConfig, context, name, common)
}
const char* PlYaTrackerConfig::GetFormatName() const { return "PlYaTracker"; }
PlYaTrackerConfig::PlYaTrackerConfig(emContext& context, const emString& name)
: emRecFileModel(context, name),
emStructRec(),
URL(this, "URL"),
Token(this, "Token") {
PostConstruct(*this);
}
class PlYaTrackerFilePanel : public emFilePanel {
public:
PlYaTrackerFilePanel(ParentArg parent, const emString& name,
emRef<PlYaTrackerConfig> config);
private:
emRef<PlYaTrackerConfig> Config;
};
PlYaTrackerFilePanel::PlYaTrackerFilePanel(ParentArg parent,
const emString& name,
emRef<PlYaTrackerConfig> config)
: emFilePanel(parent, name, config), Config(config) {}
extern "C" {
emPanel* PlYaTrackerPluginFunc(emPanel::ParentArg parent, const emString& name,
const emString& path, emFpPlugin* plugin,
emString* errorBuf) {
return new PlYaTrackerFilePanel(
parent, name, PlYaTrackerConfig::Acquire(parent.GetRootContext(), path));
}
}

156
tools/eaglemode/wrapper.go Normal file
View file

@ -0,0 +1,156 @@
// Eagle Mode configuration wrapper that recreates the required directory
// structure for Eagle Mode based on the output of depot.tools.eaglemode.etcDir
//
// This will replace *all* symlinks in the Eagle Mode configuration directory,
// but it will not touch actual files. Missing folders will be created.
package main
import (
"flag"
"fmt"
"io/fs"
"log"
"os"
"os/user"
"path"
"path/filepath"
"strings"
)
func configDir() (string, error) {
v := os.Getenv("EM_USER_CONFIG_DIR")
if v != "" {
return v, nil
}
usr, err := user.Current()
if err != nil {
return "", fmt.Errorf("failed to get current user: %w", err)
}
return path.Join(usr.HomeDir, ".eaglemode"), nil
}
// cleanupConfig removes *all* existing symlinks in the configuration which do
// not point into the right Nix store path.
func cleanupConfig(conf string, dir string) (map[string]bool, error) {
// In case of first launch, we might have to create the directory.
_ = os.MkdirAll(dir, 0755)
c := 0
currentFiles := map[string]bool{}
walker := func(p string, d fs.DirEntry, e error) error {
if e != nil {
return fmt.Errorf("could not walk %s in config directory: %w", p, e)
}
if d.Type()&fs.ModeSymlink != 0 {
target, err := os.Readlink(p)
if err != nil {
return fmt.Errorf("could not read link for %s: %w", p, err)
}
if !strings.HasPrefix(target, conf) {
err = os.Remove(p)
c++
if err != nil {
return fmt.Errorf("could not remove stale link %q: %w", p, err)
}
log.Printf("removed stale symlink %q", p)
} else {
currentFiles[p] = false
}
}
if d.Type().IsRegular() {
currentFiles[p] = true
}
return nil
}
err := filepath.WalkDir(dir, walker)
if err != nil {
return nil, err
}
if c > 0 {
log.Printf("removed %v stale symlinks", c)
}
return currentFiles, nil
}
// linkConfig traverses the given Eagle Mode configuration and links everything
// to the expected location in the user's configuration directory.
//
// If the user placed actual files in the configuration directory at paths that
// would be overwritten, they will not be touched.
func linkConfig(conf string, dir string, existing map[string]bool) error {
walker := func(p string, d fs.DirEntry, e error) error {
if e != nil {
return fmt.Errorf("could not walk %s in config directory: %w", p, e)
}
target := path.Join(dir, strings.TrimPrefix(p, conf))
if d.Type().IsDir() {
err := os.MkdirAll(target, 0755)
if err != nil {
return fmt.Errorf("could not create directory %q: %w", target, err)
}
return nil
}
if shadow, exists := existing[target]; exists {
if shadow {
log.Printf("WARN: file %q already exists and shadows a file from configuration", target)
}
return nil
}
err := os.Symlink(p, target)
if err != nil {
return fmt.Errorf("failed to link %q: %w", target, err)
}
return nil
}
return filepath.WalkDir(conf, walker)
}
func main() {
emConfig := flag.String("em-config", "", "path to em-config dir")
flag.Parse()
log.Println("verifying current Eagle Mode configuration")
if *emConfig == "" {
log.Fatalf("Eagle Mode configuration must be given")
}
if !strings.HasPrefix(*emConfig, "/nix/store/") {
log.Fatalf("Eagle Mode configuration must be in Nix store")
}
dir, err := configDir()
if err != nil {
log.Fatalf("could not determine Eagle Mode config dir: %v", err)
}
currentFiles, err := cleanupConfig(*emConfig, dir)
if err != nil {
log.Fatalf("failed to remove stale symlinks: %v", err)
}
err = linkConfig(*emConfig, dir, currentFiles)
if err != nil {
log.Fatalf("failed to link new configuration: %v", err)
}
log.Println("Eagle Mode configuration updated")
}

View file

@ -0,0 +1,7 @@
{ depot, ... }:
depot.tools.emacs-pkgs.buildEmacsPackage rec {
pname = "niri";
version = "1.0";
src = ./niri.el;
}

View file

@ -0,0 +1,181 @@
;;; niri.el --- seamless niri/emacs integration. -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2024 The TVL Contributors
;;
;; Author: Vincent Ambo <tazjin@tvl.su>
;; Version: 1.0
;; Package-Requires: ((emacs "27.1"))
;;
;;; Commentary:
;;
;; After having used EXWM for many years (7 or so?) it's become second nature
;; that there is no difference between windows and Emacs buffers. This means
;; that from any Emacs buffer (or, in the case of EXWM, from any X window) it's
;; possible to switch to any of the others.
;;
;; This implements similar logic for Emacs running in Niri, consisting of two
;; sides of the integration:
;;
;; # In Emacs
;;
;; Inside of Emacs, when switching buffers, populate the buffer-switching menu
;; additionally with all open Niri windows. Selecting a Niri window moves the
;; screen to that window.
;;
;; # Outside of Emacs
;;
;; Provides an interface for the same core functionality that can be used from
;; shell scripts, and bound to selectors like dmenu or rofi.
;;
;; # Switching to Emacs buffers
;;
;; Some special logic exists for handling the case of switching to an Emacs
;; buffer. There are several conditions that we can be in, that each have a
;; predictable result:
;;
;; In a non-Emacs window, selecting an Emacs buffer will either switch to an
;; Emacs frame already displaying this buffer, or launch a new frame for it.
;;
;; Inside of Emacs, if *another* frame is already displaying the buffer, switch
;; to it. Otherwise the behaviour is the same as standard buffer switching.
(require 'seq)
(require 'map)
(defun niri-list-windows ()
"List all currently open Niri windows."
(json-parse-string
(shell-command-to-string "niri msg -j windows")
:false-object nil))
(defun niri--window-is-emacs (window)
(equal (map-elt window "app_id") "emacs"))
(defun niri--list-selectables ()
"Lists all currently selectable things in a format that can work
with completing-read. Selectable means all open Niri
windows (except Emacs windows) and all Emacs buffers.
Emacs windows are returned separately, as they are required for
frame navigation."
(let* (;; all niri windows, with emacs/non-emacs windows split up
(all-windows (niri-list-windows))
(windows (seq-filter (lambda (w) (not (niri--window-is-emacs w)))
all-windows))
(emacs-windows (seq-filter #'niri--window-is-emacs all-windows))
;; all non-hidden buffers
(buffers (seq-filter (lambda (b) (not (string-prefix-p " " (buffer-name b))))
(buffer-list)))
(selectables (make-hash-table :test 'equal :size (+ (length windows)
(length buffers)))))
(seq-do (lambda (window)
(map-put! selectables (map-elt window "title")
(cons :niri window)))
windows)
(seq-do (lambda (buf)
(map-put! selectables (buffer-name buf)
(cons :emacs buf)))
buffers)
(cons selectables emacs-windows)))
(defun niri--focus-window (window)
(shell-command (format "niri msg action focus-window --id %d"
(map-elt window "id"))))
(defun niri--target-action-internal (target)
"Focus the given TARGET (a Niri window or Emacs buffer). This is
used when called from inside of Emacs. It will NOT correctly
switch Niri windows when called from outside of Emacs."
(pcase (car target)
(:emacs (pop-to-buffer (cdr target) '((display-buffer-reuse-window
display-buffer-same-window)
(reusable-frames . 0))))
(:niri (niri--focus-window (cdr target)))))
(defun niri-go-anywhere ()
"Interactively select and switch to an open Niri window, or an
Emacs buffer."
(interactive)
(let* ((selectables (car (niri--list-selectables)))
;; Annotate buffers that display remote files. I frequently
;; want to see it, because I might have identically named
;; files open locally and remotely at the same time, and it
;; helps with differentiating them.
(completion-extra-properties
'(:annotation-function
(lambda (name)
(let ((elt (map-elt selectables name)))
(pcase (car elt)
(:emacs
(if-let* ((file (buffer-file-name (cdr elt)))
(remote (file-remote-p file)))
(format " [%s]" remote)))
(:niri (format " [%s]" (map-elt (cdr elt) "app_id"))))))))
(target-key (completing-read "Switch to: " (map-keys selectables)))
(target (map-elt selectables target-key)))
(if target
(niri--target-action-internal target)
(switch-to-buffer target-key nil t))))
(defun niri--target-action-external (target frames)
"Focus the given TARGET (a Niri window or Emacs buffer). This
always behaves correctly, but does more work than the -internal
variant. It should only be called when invoking the switcher from
outside of Emacs (i.e. through `emacsclient').
FRAMES is the exact list of Emacs frames that existed at the time
the switcher was invoked."
(pcase (car target)
(:niri (niri--focus-window (cdr target)))
;; When switching to an Emacs buffer from outside of Emacs, we run into the
;; additional complication that Wayland does not allow arbitrary
;; applications to change the focused window. Calling e.g.
;; `select-frame-set-input-focus' has no effect on Wayland when not called
;; from within a focused Emacs frame.
;;
;; However, due to concurrency, frames may change between the moment when we
;; start the switcher (and potentially wait for user input), and when the
;; final selection happens.
;;
;; To get around this we try to match the target Emacs frame (if present) to
;; a Niri window, switch to it optimistically, and *then* execute the final
;; buffer switching command.
(:emacs
(if-let ((window (get-buffer-window (cdr target) t))
(frame (window-frame window))
(frame-name (frame-parameter frame 'name))
(niri-window (seq-find (lambda (w)
(equal (map-elt w "title") frame-name))
frames)))
;; Target frame found and could be matched to a Niri window: Go there!
(progn (select-window window) ;; ensure the right window in the frame has focus
(niri--focus-window niri-window)
(message "Switched to existing window for \"%s\"" (buffer-name (cdr target))))
;; Target frame not found; is Emacs the focused program?
(if (seq-find (lambda (w) (map-elt w "is_focused")) frames)
(switch-to-buffer (cdr target))
;; if not, just make a new frame
(display-buffer (cdr target) '(display-buffer-pop-up-frame)))))))
(defun niri-go-anywhere-external ()
"Use a dmenu-compatible launcher like `fuzzel' to achieve the same
effect as `niri-go-anywhere', but from outside of Emacs through
Emacsclient."
(interactive) ;; TODO no?
(let* ((all (niri--list-selectables))
(selectables (car all))
(target (with-temp-buffer
(dolist (key (map-keys selectables))
(insert key "\n"))
(call-process-region nil nil "fuzzel" t t nil "-d")
(string-trim (buffer-string)))))
(when-let ((selectable (map-elt selectables target)))
(niri--target-action-external selectable (cdr all)))))
(provide 'niri)

View file

@ -1,13 +1,19 @@
# Copyright 2022 The TVL Contributors
# Copyright 2022, 2024 The TVL Contributors
# SPDX-License-Identifier: Apache-2.0
{ buildGoPackage }:
{ buildGoModule }:
buildGoPackage {
buildGoModule {
name = "nixery-popcount";
src = ./.;
goPackagePath = "github.com/google/nixery/popcount";
vendorHash = null;
# https://nixos.org/manual/nixpkgs/stable/#buildGoPackage-migration
postPatch = ''
go mod init github.com/google/nixery/popcount
'';
doCheck = true;
}

Some files were not shown because too many files have changed in this diff Show more