Commit graph

308 commits

Author SHA1 Message Date
Vincent Ambo
bf2efeba2d chore(tazblog): Introduce dependency on 'dns' 2019-08-21 11:07:09 +01:00
Vincent Ambo
13b0204c03 chore(tazblog): Introduce dependency on 'cache' 2019-08-20 07:09:16 +01:00
Vincent Ambo
b856648127 feat(tools): Introduce ormolu for formatting Haskell code 2019-08-20 00:26:54 +01:00
Vincent Ambo
11fcf62297 chore(tazblog): Replace BlogDB with stubs for DNS-based storage
Removes acid-state specific code and the former BlogDB module, in its
stead the new BlogStorage module contains stubs for the functions that
will be filled in with DNS-based storage.

This code is unformatted and will not currently serve a working blog.
2019-08-20 00:17:23 +01:00
Vincent Ambo
1d5b53abf8 chore(tools/blog_cli): Shorten metadata key names
Every character counts because I want to keep metadata below 255
bytes.
2019-08-19 19:11:32 +01:00
Vincent Ambo
d5710db900 refactor(tools/blog_cli): More sensible chunk encoding as records
Instead of many rrdatas in one record, make many records!
2019-08-19 17:51:29 +01:00
Vincent Ambo
2a16740445 feat(tools): Add a horrifying tool to write blog posts into DNS 2019-08-19 16:59:55 +01:00
Vincent Ambo
28a9c01d36 feat(infra/k8s): Add in-cluster tazblog deployment via Nixery
First deployment actually using a Nixery image and `gitHEAD`.

This does not actually serve a working blog for various reasons. The
current storage mechanism (acid-state) isn't really appropriate
anymore and I'll need to change that soon.
2019-08-19 03:10:53 +01:00
Vincent Ambo
a4ef595fef chore(infra/k8s): Bump Nixery image to Cachix-enabled one 2019-08-19 02:43:42 +01:00
Vincent Ambo
2e688c18a5 feat(third_party): Add nixery with Cachix configuration 2019-08-19 02:40:14 +01:00
Vincent Ambo
cb810687d5 fix(infra/k8s): Always pull a Nixery image 2019-08-16 19:57:10 +01:00
Vincent Ambo
dd35be7add feat(infra/k8s): Deploy Nixery instance to cluster 2019-08-16 18:20:20 +01:00
Vincent Ambo
ba06317836 feat(infra/gcp): Add Terraform configuration for GKE & friends
Sets up Terraform itself, a GKE cluster, a storage bucket and all the
other little things required to get the basics running.
2019-08-16 16:52:06 +01:00
Vincent Ambo
27036e18f5 feat(tools): Add kontemplate 2019-08-16 16:50:50 +01:00
Vincent Ambo
b652ea2f03 feat(tools): Add Terraform 0.12 to local tools
This is pre-configured with the GCP provider.
2019-08-15 16:28:42 +01:00
Vincent Ambo
38493b83ea chore(tools): Remove bazel & ghc 2019-08-15 16:15:59 +01:00
Vincent Ambo
128875b501 chore: Remove remaining Bazel-related files 2019-08-15 16:11:30 +01:00
Vincent Ambo
a20daf8726 chore(nix): Remove overridden GHC
We're not going down the Bazel route here, so this is not going to be
necessary.
2019-08-15 16:07:28 +01:00
Vincent Ambo
77f0b5021d chore(services/gemma): Mark package as broken 2019-08-15 16:07:11 +01:00
Vincent Ambo
f217564a2d chore: Add very basic .gitignore 2019-07-04 16:10:13 +01:00
Vincent Ambo
e039a95de6 feat(tazblog): Add Bazel build configuration
Adds a build configuration using rules_haskell and rules_nixpkgs with
all dependencies coming from the centrally configured GHC in the
project root.
2019-07-04 16:07:59 +01:00
Vincent Ambo
fe243d32fe feat(direnv): Add REPO_ROOT variable in workspace
Makes it quick & easy to do things from the root.
2019-07-04 16:05:32 +01:00
Vincent Ambo
407a65b9ba refactor(tazblog): Move required GHC extensions into source
Necessary because Cabal is going away.
2019-07-04 16:05:14 +01:00
Vincent Ambo
d26cf3d806 fix(build): Work around rules_nixpkgs repository setup
Specifying a local repository from a Nix file is expected to be
referencing an external nixpkgs source.

However, in this monorepo setup the root of the repository itself is
the Nix package set and a workaround in the `external` folder is
required to import it into Bazel.
2019-07-04 15:59:42 +01:00
Vincent Ambo
81a0a96225 fix(bazel): Always use Haskell toolchain from Nix 2019-07-04 15:57:29 +01:00
Vincent Ambo
27c3e77d2f feat(tools): Add custom GHC with dependencies to env 2019-07-04 15:57:12 +01:00
Vincent Ambo
6fbdf41b05 feat(build): Introduce pre-packaged GHC with dependencies via Nix
This uses the Nix infrastructure's Haskell setup to create a GHC
derivation that comes with all required Haskell packages, fetched &
built via Nix.

Downstream packages that want to make use of Haskell dependencies need
them to be added to this list.
2019-07-04 15:55:13 +01:00
Vincent Ambo
ca549e4edc fix(bazel): Ensure that CC toolchain from Nix is used 2019-07-04 15:54:53 +01:00
Vincent Ambo
0bc731ee1b feat(build): Add WORKSPACE configuration for Bazel
This sets up Haskell & Nix rules in the workspace.
2019-07-04 11:19:40 +01:00
Vincent Ambo
64275e446e feat(third_party/bazel): Check in rules_nixpkgs from Tweag 2019-07-04 11:18:37 +01:00
Vincent Ambo
f723b8b878 feat(third_party/bazel): Check in rules_haskell from Tweag 2019-07-04 11:18:12 +01:00
Vincent Ambo
2eb1dc26e4 feat(tools): Add symlinks for bazel & stylish-haskell 2019-07-04 11:17:34 +01:00
Vincent Ambo
2b31921c3e fix(nix): Ensure package set is callable with/without args
When instantiating a Nix package via Bazel, the package set is called
with an empty map as the argument. From the Nix REPL or the dispatch
script, however, the package set is called without arguments.

This change adds a catch-all optional argument in the package set
which ensures that both use-cases are supported (similar to what
nixpkgs itself does).
2019-07-04 11:15:59 +01:00
Vincent Ambo
af7cbf64e5 feat(dotenv): Set NIX_PATH for entire workspace 2019-07-04 11:15:31 +01:00
Vincent Ambo
b2f40b6ed8 fix(tools): Ensure dispatch script passes arguments correctly 2019-07-04 11:15:15 +01:00
Vincent Ambo
892493a478 feat(tools): Add dispatcher script to transparently access tools
Initial version of tool provider via Nix. This requires two separate
steps for adding a new tool:

1. New symlink in tools/bin to point at the dispatch script.
2. Mapping of tool to Nix package set attribute in dispatch script.
2019-07-02 16:40:51 +01:00
Vincent Ambo
c31a0b552b feat(git-appraise): Add Nix build configuration 2019-07-02 14:39:49 +01:00
Vincent Ambo
fe642c30f0 feat(third_party): Check in git-appraise 2019-07-02 14:19:12 +01:00
Vincent Ambo
e03f063052 merge(infra): Embed infrastructure configuration into monorepo
This contains DNS and NixOS module configuration.
2019-07-02 12:48:14 +01:00
Vincent Ambo
a131b30514 refactor(infra): Move infrastructure into monorepo structure 2019-07-02 12:48:05 +01:00
Vincent Ambo
915a2f8464 fix(tazblog): Ensure build works with MonadFail changes
This updates some old code that makes assumptions via pattern matching
to instead make assumptions via a Prelude function.

This is known to be safe as it has been running fine for almost a
decade now, but the recent MonadFail changes broke the build.
2019-07-02 12:42:28 +01:00
Vincent Ambo
b51a53c936 chore(build): Add Gemma to package set
Note that this does not actually build right now because Elm has done
a thing again to break the universe and it requires massive changes to
the application to make it work again.
2019-06-29 14:28:41 +01:00
Vincent Ambo
e2951dc9f5 merge(gemma): Integrate Gemma into monorepo 2019-06-29 14:14:35 +01:00
Vincent Ambo
60532a541b refactor(gemma): Move Gemma source into monorepo stucture 2019-06-29 14:13:58 +01:00
Vincent Ambo
545d9a2db9 docs(third_party): Add README 2019-06-29 14:12:38 +01:00
Vincent Ambo
4cefb9256a feat(build): Add top-level package index file 2019-06-29 14:12:24 +01:00
Vincent Ambo
5c3ac08fcf feat(tazblog): Add Nix build configuration 2019-06-29 14:11:56 +01:00
Vincent Ambo
207c6dac0c merge(tazblog): Integrate blog into monorepo 2019-06-29 14:02:28 +01:00
Vincent Ambo
47f2145b5b chore(tazblog): Remove files from ye olde times 2019-06-29 14:01:28 +01:00
Vincent Ambo
85dbb4cc23 chore: Keep project root under MIT license
To comply with Google's open-source patching rules :)
2019-06-28 22:56:48 +01:00