Commit graph

306 commits

Author SHA1 Message Date
Vincent Ambo
71b307ffe2 chore(web/converse): Bump dependencies
Change-Id: Id2786ae93d9bc45ce98834fb4c444510b1beb22f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5474
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-04-17 13:16:34 +00:00
Vincent Ambo
70972c8fd9 chore(atward): Bump dependencies
Change-Id: I949d71648e82aaed2f1f571c4c537f0a1c075225
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5473
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-04-17 13:16:34 +00:00
Griffin Smith
6ae0f53a40 fix(web/panettone): Fix shell.nix for new third_party format
Change-Id: I16dfe9295866afdd62802b6c35be66646f3f26c8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5446
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-04-14 14:26:50 +00:00
Griffin Smith
47d075924e fix(web/panettone): Dont double up on borders
Don't render the <ol class="issue-history"> when we have nothing to put
in it, which is the case when there's no issue history and the user is
not logged in. This avoids an awkward-looking double bottom border on
issues with no comments for unauthenticated users.

Change-Id: I1c6aac40e4ba93e9428a0da589c67582b1589c17
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5445
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
2022-04-14 14:26:50 +00:00
Vincent Ambo
4be5aaa001 refactor(atward): Split tests into separate file
Change-Id: I447bc95b60a7dca912ca75e118c075e52f8c8ebe
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5402
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: wpcarro <wpcarro@gmail.com>
2022-04-11 21:45:02 +00:00
Vincent Ambo
cb8f050b9c refactor(ops/modules): Move cgit configuration into a module
The ancient `//web/cgit-taz` path stems from the time I had
code.tazj.in serving my initial version of the depot.

I've been meaning to clean this up for forever, so here we go.

Note that this leaves the git-serving module in a strange state where
it only deals with josh. I'll rename it accordingly.

Change-Id: I47ed1e9d90958299b5440a18a1b9075274754e33
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5294
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-02-16 23:03:06 +00:00
Vincent Ambo
fe290a5ff8 refactor(web/panettone): Use postmodern connection pools
Instead of managing Postgres connections on our own, use the
`with-connection` postmodern function with pooling enabled as a route
decorator.

This should resolve at least some of the issues from b/113 with
leaking connections, and an unreported issue with connections being
reused while transactions are in progress.

Change-Id: I1ed68667a3240900de1ae69df37d2d3018caf204
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5198
Tested-by: BuildkiteCI
Reviewed-by: eta <tvl@eta.st>
Autosubmit: tazjin <tazjin@tvl.su>
2022-02-13 17:20:26 +00:00
Vincent Ambo
3d8ee62087 style(rust): Format all Rust code with rustfmt
Change-Id: Iab7e00cc26a4f9727d3ab98691ef379921a33052
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5240
Tested-by: BuildkiteCI
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: tazjin <tazjin@tvl.su>
2022-02-08 12:06:39 +00:00
Vincent Ambo
67a31e7252 fix(web/panettone): unbind LDAP connections after auth
unbind & close the stream of newly created LDAP connections after
auth, which might prevent some of the resource leaking we've got going
on

i did actually verify in sly that this still works. yay.

Change-Id: I92c8ca20de642585ae4c24aa455d051ee6e44a87
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5193
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2022-02-07 17:13:41 +00:00
sterni
a2ecd53f58 chore: clean up some obsolete TODOs
* //3p/nix: probably not worth investing time into this anymore

* //users/sterni/emacs: The emoji problem disappeared by itself with a
  newer emacs version, however a different one remains…

* //web/panettone: If we ever want to change the behavior, we should
  just decide the behavior statically instead of using conditions and
  restarts, as we only call it in one place, so making different
  decisions depending on call sites is not really a use case we have.

Change-Id: Iff9d439ce356db41ce34d690fb7b6a01822022fa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5223
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: sterni <sternenseemann@systemli.org>
2022-02-04 15:55:19 +00:00
sterni
32da9861d5 refactor: expose cheddar-about script from cheddar
Any other cgit configuration in depot would need this script wrapper as
well.

Change-Id: Ifa04e1c9de9c925eb3f60c5d3854221ae02ef06c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5206
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: sterni <sternenseemann@systemli.org>
2022-02-03 23:41:08 +00:00
Vincent Ambo
aa122cbae7 style: format entire depot with nixpkgs-fmt
This CL can be used to compare the style of nixpkgs-fmt against other
formatters (nixpkgs, alejandra).

Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: wpcarro <wpcarro@gmail.com>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: cynthia <cynthia@tvl.fyi>
Reviewed-by: edef <edef@edef.eu>
Reviewed-by: eta <tvl@eta.st>
Reviewed-by: grfn <grfn@gws.fyi>
2022-01-31 16:11:53 +00:00
sterni
0d24efcdc9 fix(web/panettone): make (who:html-mode) stick
(who:html-mode) needs to be set at macro expansion time to properly take
effect which wasn't the case before, but is ensured now by
:compile-toplevel. :load-toplevel ensures that who inside the repl will
behave the same.

Since the :html5 behavior is now actually used, we need to adjust some
of the test cases to account for the different :html5 escaping mode.

Change-Id: I4dfe1d2db38da6a2486fde86596f7e5f50ed8b9f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4885
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2022-01-13 23:19:31 +00:00
Vincent Ambo
b6496b8e60 docs(web/tvl): Document that channel is now reachable via Matrix
We have a new channel visitor who joined via Matrix and pointed this
out. Apparently hackint reestablished the Matrix bridge.

Change-Id: I25ec7fdc5c1b68a9b0bc92b6c19ffe12ecb93c5f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4864
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-01-12 10:18:25 +00:00
Vincent Ambo
59134253db chore(web/atward): Bump all dependencies
Change-Id: I4a79204e50cf519dce729e5c86bc397b82715008
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4758
Tested-by: BuildkiteCI
Autosubmit: tazjin <mail@tazj.in>
Reviewed-by: sterni <sternenseemann@systemli.org>
2022-01-01 15:30:16 +00:00
zseri
ee62cda9a5 refactor(web/todolist): omit unnecessary intermediate drv
also import yants functions explicitly

Change-Id: Idd16d130a95efc30216cb54051c7193a42978003
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4689
Tested-by: BuildkiteCI
Reviewed-by: zseri <zseri.devel@ytrizja.de>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Autosubmit: zseri <zseri.devel@ytrizja.de>
2021-12-27 01:32:04 +00:00
Vincent Ambo
e6d7710c45 fix(web/static): Publish logo in all colours
Easier to link to for the sock people.

Change-Id: I5ea5c20ca98e3a4eb7eac41fdcf2e81b026786db
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4522
Reviewed-by: tazjin <mail@tazj.in>
Autosubmit: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-12-22 14:20:12 +00:00
Griffin Smith
a8ec166c72 fix(panettone): Fix export of issue status to SQL
Postmodern changed[0] how users customize the way lisp values get exported
to SQL - now, in addition to defining methods of
`cl-postgres:to-sql-string`, we have to pass `:col-export` and
`:col-import` args to the field itself in the dao class.

I'm not *entirely* sure why both are necessary, but without both this
doesn't work.

[0]: https://github.com/marijnh/Postmodern/blob/v1.33.1/CHANGELOG.md#changelog-v-1331

Change-Id: Iae8fb63c34fb6c79b9dfa350129032aab5cd2233
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4383
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: grfn <grfn@gws.fyi>
2021-12-16 18:59:01 +00:00
Vincent Ambo
5b46c6c234 feat(web/tvl/blog): Add a small footnote about Moscow in the post
... the idea being that this might lead to some people from the Moscow
Nix community to reach out, which would be beneficial for me in terms
of having some IRL people to bounce ideas around with.

Change-Id: Ib41f54609e9ec9d7fdafbf7024fb5df7034afd87
2021-12-01 23:28:38 +03:00
Vincent Ambo
236b2bcd74 fix(web/tvl/blog): Fix Tvix post publication date
Change-Id: I6f69507c75436e882f2248430eb894b1310bfca8
2021-12-01 20:57:53 +03:00
Vincent Ambo
1f98cea9b2 feat(web/tvl/blog): Publish introductory Tvix blog post
Change-Id: I16c565ac1194cec44382b77f1c65c5ff569fdcca
2021-12-01 17:38:32 +00:00
Vincent Ambo
8318178b5f feat(web/tvl): List blog posts on homepage
Change-Id: Ic0ee18466fbaca1a374e7489be640f49571eb9c5
2021-12-01 12:37:50 +03:00
Vincent Ambo
79681c9e21 fix(web/tvl/blog): Include only published posts in listings & feed
Change-Id: I76c9c2c5cc82c7d0f59f907b6f1abee92a92cbf7
2021-12-01 12:37:50 +03:00
Vincent Ambo
c725f89d8b refactor(web/tvl/blog): Update Tvix intro blog post
This incorporates feedback from sterni from cl/4052 and chipb on IRC.

Change-Id: I0547d130dcd578746d5183c563be4b1d042cb5f8
2021-12-01 01:50:57 +03:00
Vincent Ambo
f641378948 fix(web/tvl/blog): Fix link to embedded image
Change-Id: I8bec643267785c6d3523380a2a17ab5e9213b51c
2021-11-30 18:52:53 +03:00
Vincent Ambo
8133fed255 feat(web/tvl/blog): Write Tvix introduction blog post
This post is intended to just let people know about the existence of
Tvix, tell them a bit about the background and how to follow along.

Change-Id: Ib5194d3aa385a0e30b4768ba28cb063784f6e0a3
2021-11-30 18:45:44 +03:00
Vincent Ambo
e61b50baf9 chore(web): Correct URLs for assets & feeds on TVL blog
Change-Id: I8720d49f8f3f4010f57a53e763a4f246bf4eb3d8
2021-11-30 12:51:30 +03:00
Vincent Ambo
4f1249e46f refactor(readTree): Move 'drvTargets' into readTree
This function is also generally useful for readTree consumers that
have the concept of subtargets.

Change-Id: Ic7fc03380dec6953fb288763a28e50ab3624d233
2021-11-23 14:42:08 +00:00
sterni
3d4e992c6f feat(web/tvl/template): add title to derivation name
This should help when debugging template generated derivations.

Change-Id: I9958a7e67c8442c5ad97da2a9d3622a0556b6a1a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3861
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-11-13 13:28:06 +00:00
sterni
53ab5716aa fix(web/static): avoid drvHash unnecessarily inflating closures
The string context of drvPath apparently causes a derivation to
_directly_ reference the whole dependency closure of the derivation
drvPath belongs to. This not only is unnecessary in this case (since we
are using drvHash to construct HTTP URLs which are primarily contigent
on the deployed configuration and not the shape of the nix store), but
also creates a very confusing derivation (e. g. web.tvl's index.html
would *directly* reference pandoc).

Change-Id: I6e9900e9e35fbd639061e53322e4ccb3fbb7e7ec
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3862
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-11-13 13:27:59 +00:00
Vincent Ambo
1fbb960acf fix(tvl/logo): Fix rendering of PNG files
The previous format for entering the shape of the 'V' (as exported by
Inkscape) is incompatible with the PDF rendering process, somehow.

This reverts the letter back to the old path definition format with
the offending point manually removed.

Change-Id: I6ff3310afb5a757d657f2f0d8a761f355a8e50c9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3843
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-11-12 15:18:41 +00:00
Vincent Ambo
a3d0beceaf fix(tvl/logo): Fix shape of 'V'
There was an additional point in this letter's path, which led to a
small fragment of the "buttcrack" remaining.

Change-Id: I4aa25190c2f2d5fbae55d85c499939ec72a25add
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3842
Reviewed-by: tazjin <mail@tazj.in>
Tested-by: BuildkiteCI
2021-11-12 08:39:13 +00:00
Vincent Ambo
875ef0a605 fix(web/blog): make base URL configurable for atom feeds
This was previously hardcoded to tazj.in, which is not going to work
of course.

Instead it now takes the blog config which has a new baseUrl
parameter. For ease of use, the configs of my and the TVL blog have
been moved into a location that is accessible in the tree for reuse.

Change-Id: I94e71aaa7859db4380eb7013740a17f6b6a02620
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3777
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-11-08 10:39:04 +00:00
Vincent Ambo
4f71638e49 docs(atward): Document availability of new query types
Change-Id: Ie96eae39722c0bd22f3801cc9e24c28148f0a0cd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3779
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-07 14:08:38 +00:00
Vincent Ambo
674603f6c8 feat(web/tvl): Render blog posts and atom feed for TVL
Includes the blog posts and feed in the $out directory, but without
linking them from the TVL homepage yet.

Change-Id: If9c094b29e43e9a81b0cc3d731261dc4b10557c1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3776
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-11-05 14:24:53 +00:00
Vincent Ambo
4482bc2c82 feat(web/tvl/blog): Add scaffolding for first blog post
No content yet, but I need this in place to chop up the other changes
nicely.

Change-Id: I4302e14ab513d6d4dd23e9e8ab5493223b9a80b4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3774
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-11-05 14:24:53 +00:00
Vincent Ambo
4baf633622 refactor(web/tvl/template): Move footer into a separate target
This makes it possible for the footer to be reused in other places,
e.g. when templating blog posts (which do not go through
//web/tvl/template (yet)).

Change-Id: Ia8ab0e1c6db4f76b4de49239e11a4474038f60ae
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3773
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-05 12:51:36 +00:00
Vincent Ambo
10e279ac13 feat(atward): Support depot revision queries (r/...)
Redirects these to the cgit commit view. Only supports cgit because we
don't have a good way to coax Sourcegraph into fetching these refs.

Change-Id: I8c28ed015ba37c04eb4b7a667bde70ff6a92bf4c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3772
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-05 12:26:44 +00:00
Vincent Ambo
0e5730a26f fix(web/blog): Correctly wrap footer content
Name clash went undetected because I called this variable the same
thing, oops.

Change-Id: Iafa508f26887302b1c256088c50c68cd0ed7eea2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3771
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-05 10:39:14 +00:00
Vincent Ambo
f360bbdcf0 refactor(web/blog): Move atom feed creation logic to //web/blog
This was previously all inside of my personal homepage configuration,
but that's not really where it belongs.

This moves the blog post -> feed entry logic to //web/blog and moves
some other minor logic (like entry order) into the atom feed
implementation itself.

Change-Id: Idde0241c48e979580de73f2b9afd04e6ca7f4c9a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3770
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-04 15:57:56 +00:00
Vincent Ambo
bbf92dcdea refactor(web/blog): Configurable blog name and footer
Required for actually using this generically for the TVL blog.

Change-Id: I92d8d10341f9ab4f92c90f7976be261b3255a0f0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3768
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-11-03 15:43:57 +00:00
Vincent Ambo
08d46ad293 chore(web/blog): Move out of //users/tazjin
This will also be used for the TVL blog, with status updates of
projects like Tvix.

Note that while this commit evaluates, there are still some things
specific to my blog in this code which I'll untangle in a future commit.

Change-Id: If59431161b165d7249cbb856073a4cae84a1bfbf
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3732
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-10-22 09:56:31 +00:00
Smitty
4ea7fc392a feat(web/panettone): support dark mode
When the system is set to dark mode, this is detected through
prefers-color-scheme and the color scheme is adjusted accordingly. This
fixes #18.

The colors are set using CSS variables on the body that are overrridden
based on the current color scheme.

Change-Id: Id2f95dee4d6968e1b62ce37534f623e489fabde4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3722
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-20 19:52:13 +00:00
Vincent Ambo
8301825124 chore(web/atom-feed): Move feed generator out of //users/tazjin
I intend to use this for updates on TVL projects, which will end up on
the homepage, which is outside of //users.

Change-Id: I03542d1bcef3d9fc4599294655caab5ed22ba5d9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3728
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-16 08:47:16 +00:00
sterni
e7c0d6eb12 refactor(web/bubblegum): avoid dumping depot into store
cleanSource needs to import the path into store which is quite slow at
this point. Since we are filtering the path later anyways, using the
original path is probably perfectly fine and speeds up builds (which is
nice when iterating on something).

Change-Id: I0628854d754b5903eb4ae93a3c3e2539b2c1c7e9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3705
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-10-10 10:03:03 +00:00
sterni
2397fd8d56 feat(nix/sparseTree): allow specifying subtrees as relative paths
Passed strings will be treated as a relative path below the given root,
which is quite convenient when using depot.path by eliminating a lot of
repetition.

Change-Id: I3da6058094484f4a6ffbb84f89ad4472b502a00c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3704
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
2021-10-10 10:03:03 +00:00
Vincent Ambo
26f0ba5464 refactor(web): use static.tvl.{fyi|su} for static assets
Replaces all uses of relative static paths in TVL pages with the
static.tvl.fyi domain. Where possible, the drv hash is directly
embedded in the content.

Change-Id: Ia882dd37ceae9d047cd81cf1eb37a856b339643a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3682
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-07 14:21:18 +00:00
Vincent Ambo
348cf5ae73 refactor(web/tvl/template): default staticUrl to static.tvl.{fyi|su}
Change-Id: Ibccb690dc1371499e9800d4414002ce586490a91
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3681
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2021-10-05 13:18:48 +00:00
Vincent Ambo
69ed4984e3 feat(web/static): Add TVL logo to static files
Change-Id: Ie5ee4fe9d137cde9502ded1558fae3ad685b8863
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3661
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-01 15:59:38 +00:00
Vincent Ambo
b1f52b2617 feat(web/static): Expose drvHash attribute on derivation
This can be used for easy cachebusting of static assets, so that we
can serve them all with a really long cache-time easily.

Change-Id: I7c9f6beddec58e1caf02cda33bc587590217a939
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3660
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-10-01 15:33:47 +00:00