Commit graph

2054 commits

Author SHA1 Message Date
Vincent Ambo
9675da8ce5 docs: Update README with more interesting information 2019-12-20 18:58:02 +00:00
Vincent Ambo
c3586aa8ba feat(infra/k8s): Rewrite cgit URLs by routing them through nginx
Configures nginx to rewrite all requests to cgit, except for those
retrieving static files, to `/depot/`.

In combination with the previous commits that apply patches to cgit
itself, this effectively means that the depot is rendered on the site
root.

This is pretty cool: It lets people do stuff like `git clone
https://git.tazj.in` and get the depot!
2019-12-20 18:42:56 +00:00
Vincent Ambo
0dee62cd7b feat(cgit-taz): Enable display of remote branches in listing 2019-12-20 18:39:58 +00:00
Vincent Ambo
26a4dbdbe9 feat(cgit-taz): Enable built-in README rendering & syntax highlights
This is currently using a bunch of Python - once I have time this will
be migrated to something saner.
2019-12-20 18:39:01 +00:00
Vincent Ambo
d5c5662c5a fix(cgit-taz): Display personal email on depot 2019-12-20 18:31:34 +00:00
Vincent Ambo
1c9e3c652d fix(cgit-taz): Patch other bits of cgit that handle URLs
Turns out there were a few more things. About page handling also did
something weird, which I've swiftly removed.
2019-12-20 18:30:50 +00:00
Vincent Ambo
de309848eb feat(cgit-taz): Patch cgit to construct monorepo URLs
Effectively dropping /depot/ from all URLs.
2019-12-20 17:28:35 +00:00
Vincent Ambo
b1be226626 fix(cgit-taz): Drop /cgit.cgi prefix from vhost 2019-12-20 16:24:15 +00:00
Vincent Ambo
fbae58987b feat(cgit-taz): Display README.md for repository 2019-12-20 16:11:53 +00:00
Vincent Ambo
2512ea4256 feat(infra/k8s): Add cgit to Ingress load balancer
Apart from the fact that TLS certificate provisioning is very wonky,
it seems to be working now.

AFAICT the L7 LBs still don't support path rewriting, which means that
this is likely not the final configuration and it will move behind
nginx instead.
2019-12-20 16:07:40 +00:00
Vincent Ambo
9653bdcf69 fix(infra/k8s): Workaround for nginx crash on pidfile write
Newer versions of nginx apparently hard-crash if they can't write a
PID file in the current directory.

To work around this, some writeable scratch space is created for the
nginx daemon to write its PID to.
2019-12-20 16:07:31 +00:00
Vincent Ambo
a349d5e914 chore(third_party): Expose nginx 2019-12-20 15:48:22 +00:00
Vincent Ambo
39a0bdf3c1 chore(infra/dns): Update state of root-tazj-in record sets 2019-12-20 14:52:18 +00:00
Vincent Ambo
b520a62e44 feat(infra/k8s): Deploy sync-gcsr container into cgit pod
This actually works - who would have thought!
2019-12-20 14:40:36 +00:00
Vincent Ambo
15076ed228 fix(sync-gcsr): Fix broken log statement 2019-12-20 14:40:21 +00:00
Vincent Ambo
30586a108d fix(buildGo): Use builder directory as fake $HOME
It turns out that the `go` tool writes a bunch of stuff into $HOME, or
rather, tries to - Nixery doesn't let it.
2019-12-20 14:30:36 +00:00
Vincent Ambo
2782a69a72 fix(cgit-taz): Depot checkout is no longer a bare repository
To be compatible with sync-gcsr, the `.git` folder must be referenced
directly as there is an actual worktree on the filesystem now.
2019-12-20 14:23:14 +00:00
Vincent Ambo
ba7a48af75 fix(sync-gcsr): Use local worktree & pull changes into it
Just fetching the remote of a bare repository does not update local
tracking branches, which means that changes do not become visible in
cgit.
2019-12-20 14:17:06 +00:00
Vincent Ambo
7ff4b59342 chore(cgit-taz): Remove git synchronisation from startup script
This will be moved into a sidecar container using sync-gcsr that
updates the repo periodically.
2019-12-20 14:09:34 +00:00
Vincent Ambo
7078bc7a4a feat(services/sync-gcsr): Add git synchronisation helper
Adds a tiny program that keeps a checkout of a remote git repository
in sync with a folder on the local filesystem.

This is going to be used to mirror the GCSR repository onto a local
disk for cgit serving.
2019-12-20 13:16:57 +00:00
Vincent Ambo
43ceaa17e3 feat(infra/k8s): Add git cookie secret for repository sync 2019-12-20 13:15:58 +00:00
Vincent Ambo
7158d56499 fix(tools): Correctly resolve kms_pass->pass
The binary name doesn't match the one inside of the derivation, but
this is intentional.
2019-12-20 13:13:06 +00:00
Vincent Ambo
da9dd45ebf fix(emacs.d): Correctly restore default font size in randr-single 2019-12-20 12:37:16 +00:00
Vincent Ambo
e4fe192e57 feat(infra/k8s): Add deployment configuration for cgit
This is not yet done because repository cloning doesn't work at all,
in any way whatsoever.
2019-12-19 17:01:59 +00:00
Vincent Ambo
36fa320e55 feat(third_party): Add Go packages for src-d/go-git
This is going to be used in my git syncing tool for the cgit setup.
2019-12-19 16:25:47 +00:00
Vincent Ambo
3fb29b1843 fix(buildGo): Skip subtree under overrides/buildGo
This subtree is internal to buildGo.nix and can not be imported by
readTree.
2019-12-19 15:39:10 +00:00
Vincent Ambo
124d26210b chore(build): Add package required for buildGo at the top-level
This is required to maintain buildGo compatibility with non-depot
setups.
2019-12-19 15:38:53 +00:00
Vincent Ambo
467a66bac2 feat(readTree): Add support for skipping directory subtrees
Placing a special `.skip-subtree` file in any directory will now
prevent readTree from further traversing that part of the tree.

This makes it possible to have packages with internal Nix files that
are incompatible with the larger depot structure, for example for
projects like buildGo.nix which need to be compatible with the
external nixpkgs model.
2019-12-19 15:33:30 +00:00
Vincent Ambo
e996141d2e merge(buildGo): Integrate buildGo.nix into depot 2019-12-19 15:24:17 +00:00
Vincent Ambo
11865364ac chore(overrides): Remove buildGo.nix to prepare for depot merge 2019-12-19 15:24:00 +00:00
Vincent Ambo
a8fbdc52c2 chore(buildGo): Relayout for depot merge 2019-12-19 15:22:35 +00:00
Vincent Ambo
90ebd154ca feat(emacs.d): Add key binding for opening telega 2019-12-19 15:19:24 +00:00
Vincent Ambo
c1a5d7d62a feat(emacs): Add telega.el support
Packages the telega-server binary and adds the required mode into
Emacs.

Unread message count is displayed in the modeline, which is neat.

Probably need to figure out some key bindings for this.
2019-12-19 14:48:22 +00:00
Vincent Ambo
166aff23bc fix(nix-util): Correctly enable lexical scope in this library 2019-12-19 14:23:14 +00:00
Vincent Ambo
c2f97577f7 feat(emacs-pkgs): Introduce nix-util helper library
Adds an Emacs library with so far a grand total of one helper function
that can prefetch and insert a git repository at point.

This is very useful for the various Go repo imports I am doing at the
moment.
2019-12-19 01:40:27 +00:00
Vincent Ambo
96794d8630 fix(cgit-taz): Force gcloud to use specific CA bundle
It doesn't like reading the bundle from /etc/ssl apparently.
2019-12-18 21:37:48 +00:00
Vincent Ambo
ce55786ffe chore(infra/gcp): Allow k8s nodes to access GCSR 2019-12-18 21:37:31 +00:00
Vincent Ambo
1677a27632 refactor(cgit-taz): Use Google Cloud SDK to authenticate repo access
Fighting SSH's peculiarities around how hard it tries to not be
scriptable is tiresome.
2019-12-18 21:05:48 +00:00
Vincent Ambo
065cb64d0a fix(cgit-taz): Create users required by SSH in the container
This might not actually work because SSH will have issues with key
permissions, presumably.
2019-12-18 20:24:20 +00:00
Vincent Ambo
c551f35b03 fix(cgit-taz): Pin SSH into image via Nix 2019-12-18 20:21:30 +00:00
Vincent Ambo
5894d521b9 fix(cgit-taz): Clone depot via SSH
Keys are provided in a Kubernetes secret.
2019-12-18 20:20:10 +00:00
Vincent Ambo
d6a653d7a3 fix(cgit-taz): Explicitly configure CA certs for git 2019-12-18 20:02:17 +00:00
Vincent Ambo
9448326b9b feat(cgit-taz): Clone depot on container launch
This makes for a pretty static server for now, but we'll get there.
2019-12-18 19:37:41 +00:00
Vincent Ambo
51ad58f8de fix(build): Add missing packages for Nixery images 2019-12-18 19:08:10 +00:00
Vincent Ambo
7b4e893a36 chore(infra/k8s): Bump Nixery popularity URL 2019-12-18 19:01:59 +00:00
Vincent Ambo
0538b1f500 chore(infra/k8s): Point Nixery at the depot on GCSR 2019-12-18 17:54:44 +00:00
Vincent Ambo
3b86979e32 feat(third_party/nixery): Add OpenSSH to Nixery image 2019-12-18 17:54:29 +00:00
Vincent Ambo
1e2766c612 feat(cgit-taz): Apply cgit configuration by patching thttpd
This is just an optimisation because it compiles faster v0v
2019-12-18 17:53:57 +00:00
Vincent Ambo
c776bd383d fix(build): Fix compatibility with Nixery instance 2019-12-18 17:39:00 +00:00
Vincent Ambo
3359ce12cf feat(infra/k8s): Provision certificate for git.tazj.in 2019-12-18 17:27:30 +00:00