Commit graph

6 commits

Author SHA1 Message Date
strawberry
023fb41c49 load .env file before initializing flake to use DIRENV_DEVSHELL in .env
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-06-03 00:10:28 -04:00
Benjamin Lee
c0f8253fc5 enable all-features in nix for CI builds
CI is running `cargo build --all-features`, so we should be passing all
the features to nix as well.

The only thing this currently affects is the jemalloc_prof feature, but if
we add any non-default features that affect nix in the future they should
also be handled correctly now.
2024-05-24 10:53:47 -04:00
strawberry
3b2db9027a envrc: allow loading env vars from .env if it exists
from ffd479d66f

This is primarily useful for replicating the environment from CI so that
the `nix-build-and-cache` script is easier to invoke.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-05-06 03:45:10 -04:00
Charles Hall
620bfacc30 ci: cross compile static binaries for x86_64 and aarch64
from https://gitlab.com/famedly/conduit/-/merge_requests/569

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-26 19:47:54 -05:00
Charles Hall
6a9f8dfa6f add shebang to .envrc
All this really does is make syntax highlighting and shellcheck work by
default in more editors.
2023-12-24 01:56:56 -05: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