1
0
Fork 0
forked from mirror/grapevine
Commit graph

7 commits

Author SHA1 Message Date
Benjamin Lee
3a71b8e5d1
optionally use nom to build devshell dependencies
This is nice when messing around with the nix configuration, since
you'll often end up building rocksdb *many* times.

We shouldn't need to do anything to get the logs in CI because we're
calling `nix-build-and-cache ci` at the beginning
2024-05-30 21:19:09 -07:00
Benjamin Lee
823515b475
load .env file before initializing flake
This allows specifying DIRENV_DEVSHELL in .env
2024-05-30 21:19:09 -07:00
Benjamin Lee
467417c32a
use all-features devshell for clippy/all in CI
Without this, we're building a static rocksdb inside the rust-rocksdb
build script every time. As far as I know this doesn't change clippy's
behavior, but it does take a *long* time.
2024-05-30 21:19:08 -07:00
Charles Hall
b7df5a7da6
allow loading env vars from .env if it exists
This is primarily useful for replicating the environment from CI so that
the `nix-build-and-cache` script is easier to invoke.
2024-05-14 20:08:37 -07:00
Charles Hall
bdc46f6392
add script to build and push to binary cache
This is even useful for local development, as you can pre-populate the
binary cache before running CI (assuming you have the token). Also, it
being in a script makes it easier to test.

We've added attic as a flake input even though the flake itself doesn't
use it so that we can use `--inputs-from .` in Nix commands to reference
a locked version of attic. This helps with reproducibility and caching,
and to makes it easy to update attic because it's part of the normal
flake lifecycle.
2024-01-25 11:34:46 -08:00
Charles Hall
8f3f5c01f9
add shebang to .envrc
All this really does is make syntax highlighting and shellcheck work by
default in more editors.
2023-12-23 22:21:19 -08:00
Charles Hall
fe7d8c4f12
add nix flake
Also add `.envrc` for direnv + Nix users. This makes developing locally
easier for us NixOS folks.

The flake itself will allow NixOS users to pull code directly from
Conduit's repository, making it completely trivial to stay up-to-date
with every commit.

I'd also like to add a NixOS module directly to this repository at some
point so that new configuration options will be available in the NixOS
module faster. But for now, NixOS users can simply override
`serivces.matrix-conduit.package` and get pretty much all the
functionality.

I've added myself to the `CODEOWNERS` file for the Nix files, since I am
willing to maintain this stuff. I use Conduit on NixOS so I'm personally
invested in having this work.

Lastly, `.gitignore` was updated to exclude symlinks created by `direnv`
and `nix build` and other such Nix commands.

This doesn't come without maintenance burden, however:

* The `sha256` in `flake.nix` will need to be updated whenever Conduit's
  MSRV is updated, but that should be pretty infrequent.

* `nix flake update` should be run every so often to pull in updates to
  `nixpkgs` and other flake inputs. I think downstream users can also
  override this themselves with `inputs.<name>.inputs.<name>.follows`.

* `nix flake check` should be run in CI to ensure Nix builds keep
  working.

* `nixpkgs-fmt --check $(fd '\.nix')` (or similar) should be run in CI
  to ensure style uniformity.
2022-10-15 19:26:53 -07:00