Commit graph

238 commits

Author SHA1 Message Date
Zhaofeng Li
16ed9d8c66 Move nix::NixCommand to util::CommandExt 2022-01-08 01:20:36 -08:00
Zhaofeng Li
2aeab62880 Bundle rust-analyzer in dev environment
The user's rust-analyzer may be of the wrong version.
2022-01-08 01:20:36 -08:00
Zhaofeng Li
f92236da46 Refactor current profile detection 2022-01-08 01:20:36 -08:00
Zhaofeng Li
6401ce4c3c cli: Remove target from logs
format_target is enabled by default in env_logger 0.9.0. It makes
the logs look cluttered and is not very useful for our use case.
2022-01-05 14:01:05 -08:00
Zhaofeng Li
cb4afb689a Cargo.toml: Move tokio-test to dev-dependencies 2022-01-05 14:01:05 -08:00
Zhaofeng Li
2dbe2b1440 Cargo.toml: Update indicatif to 0.17.0-rc.1 2022-01-05 14:01:05 -08:00
Zhaofeng Li
da7907c874 General code cleanup 2022-01-05 14:01:05 -08:00
Zhaofeng Li
62cf77a8b6 manual: Only render apply-local help on Linux 2022-01-03 10:54:59 -08:00
Zhaofeng Li
c1be1c7f21 manual: Rename cli.md 2022-01-03 10:42:16 -08:00
Zhaofeng Li
f234e16e80 manual: Fix colorized CLI help
In clap 3.0, it's no longer possible to get `App::write_long_help` to
output colorized text (it doesn't invoke the Colorizer at all). So let's
move the generation outside of Rust.
2022-01-03 10:37:03 -08:00
Zhaofeng Li
d2762757f0 command/eval: Fix introspect alias
On clap 3.0, resetting the App::name still causes clap to complain
that the subcommand doesn't exist in debug mode.
2022-01-03 10:37:03 -08:00
Zhaofeng Li
79d1010356 command: Change wording for consistency 2022-01-03 10:37:03 -08:00
Zhaofeng Li
3ea320b355 Update other deps 2022-01-03 10:37:03 -08:00
Zhaofeng Li
81e2982bbb Migrate to clap 0.3 2022-01-03 10:37:03 -08:00
Zhaofeng Li
6e90b710bb LICENSE: Update year to 2022 2022-01-03 10:37:03 -08:00
Zhaofeng Li
7b05558008 Advertise Matrix channel 2022-01-02 13:16:24 -08:00
Zhaofeng Li
1adb0b4246 .github: Rename workflows for clarity 2022-01-02 13:16:24 -08:00
Zhaofeng Li
f9fab83030 deployment: Remove useless Arc clones 2022-01-02 13:16:24 -08:00
Zhaofeng Li
7bf57fd1ad nix/node_filter: Forgot to add 2022-01-01 16:47:38 -08:00
Zhaofeng Li
98897bf4de Support building on target nodes
This partially addresses #33, and allows Colmena to be used more
easily on bandwidth-constrained hosts and macOS.

With `deployment.buildOnTarget = true;` deployment works fine from
macOS without designated builders, except when IFD is involved.
2022-01-01 16:41:35 -08:00
Zhaofeng Li
872f944743 eval.nix: Skip recursive type checking when cross-referencing configs through the nodes argument
This makes evaluation faster especially when `nodes` is heavily used in
the configuration (like in my auto-meshing setup). This matches the
behavior of Morph.
2022-01-01 16:41:35 -08:00
Zhaofeng Li
cdbb69617f eval.nix: Support specifying a list of configs 2022-01-01 16:41:35 -08:00
Zhaofeng Li
bc3450b3ce cli: Disable apply-local on non-Linux platforms 2022-01-01 16:41:35 -08:00
Zhaofeng Li
f0f1be46c3 .github: Pin NIX_PATH before nix-shell invocation 2022-01-01 16:41:35 -08:00
Zhaofeng Li
ef2b5b53a8 .github: Add Nix 2.5.1 and 2.6.0pre to matrix 2022-01-01 16:41:35 -08:00
Zhaofeng Li
d74df64826 Update nixpkgs, fix manual build 2022-01-01 16:41:35 -08:00
Zhaofeng Li
06804e3715 Support macOS
Currently it requires Linux remote builders to be set up to do
anything useful, but soon it will not once we able to initiate
builds directly on the target nodes themselves.
2022-01-01 16:41:35 -08:00
Zhaofeng Li
f9f4dd5f63 Remove another ugly toJSON hack 2022-01-01 16:41:35 -08:00
Zhaofeng Li
111bc9dea7 Remove test-progress subcommand from release builds 2022-01-01 16:41:35 -08:00
Zhaofeng Li
f809d3b21c nix/host: Always copy outputs to remote along with derivations when realizing
This prevents useless rebuilds when trying to realize a derivation on
a remote host. This code path isn't actually used by Colmena at the
moment.
2022-01-01 16:41:35 -08:00
Zhaofeng Li
64534a744c manual: Make mdbook-linkcheck happy 2022-01-01 16:41:35 -08:00
Zhaofeng Li
16bf9899c5 manual: Correct paths to eval.nix in comments 2022-01-01 16:41:35 -08:00
Zhaofeng Li
2b652f7236 hive: Add another test for nixpkgs.system 2022-01-01 16:41:35 -08:00
Zhaofeng Li
8f77184d58 eval.nix: Inherit pkgs.system in evalConfig 2021-12-18 14:35:06 -08:00
Zhaofeng Li
bd4493da73 nix: Move eval.nix tests into /hive 2021-12-18 14:35:06 -08:00
Zhaofeng Li
d5c6f7cb0c integration-tests: No need to sort 2021-12-18 14:35:06 -08:00
Zhaofeng Li
b52ac7e94f .github: workflow_run triggers can't be used on non-default branches
[ci skip] for main
2021-12-07 23:28:36 -08:00
Zhaofeng Li
a12d7e1115 Update installation docs to point users at Nixpkgs
Nixpkgs now includes Colmena starting with 21.11 and is now the
preferred method to obtain Colmena. The `stable` branch will
continue to be updated for each stable release.

Fixes #41.
2021-12-07 23:13:31 -08:00
Zhaofeng Li
83ebe45f20 integration-tests/apply: Test GC root creation 2021-12-07 23:13:31 -08:00
Zhaofeng Li
372de58dff integration-tests: Make it easier to override pkgs and colmena 2021-12-07 23:13:31 -08:00
Zhaofeng Li
31fc98cfa7 nix: Remove ugly toJSON hack
We now evaluate with --strict.
2021-12-07 23:13:31 -08:00
Zhaofeng Li
eebded1786 Build each node individually
Now nodes that take a long time to build won't bottleneck the
deployment of other nodes in the same chunk.

Fixes #47.
2021-12-07 23:13:31 -08:00
Zhaofeng Li
ea09e60e36 default.nix: Oops 2021-12-06 15:08:47 -08:00
Zhaofeng Li
14f6c707f5 flake.nix: Cherry pick supported platforms 2021-12-06 12:47:33 -08:00
Zhaofeng Li
4a31a01c4f default.nix: Match what was merged in Nixpkgs 2021-12-06 12:26:19 -08:00
Zhaofeng Li
b88a19b904 .github: Add commit status for manual build 2021-12-05 18:07:12 -08:00
Zhaofeng Li
39f597f778 hive: Pass --read-write-mode to nix-instantiate --eval
This enables the use of IFD inside `meta` and node `deployment.*`
options, from which we obtain the values with `nix-instantiate --eval`.

Fixes #45.
2021-12-05 12:34:44 -08:00
Zhaofeng Li
e609301a72 .github: Run user manual build after main build workflow 2021-12-05 01:30:17 -08:00
Zhaofeng Li
804cf1f85e manual/migration: Fix broken link 2021-12-05 01:14:12 -08:00
Zhaofeng Li
7433661aed Add deployment.keys.<name>.name 2021-12-05 01:14:12 -08:00