Commit graph

368 commits

Author SHA1 Message Date
Zhaofeng Li
501ca74ce6 flake.lock: Update nixpkgs and stable 2022-02-04 20:58:17 -08:00
Zhaofeng Li
45b135c1b1 nix_eval_jobs: Add timeouts to tests
Sometimes nix-eval-jobs would lock up indefinitely, so let's make it
fail fast in CI.

Also ignore test_json_global_error while we investigate.
2022-02-04 20:58:17 -08:00
Zhaofeng Li
856f82644e apply_local: Fix argument name typo
Caught by debug assertions in clap 3.0. We should switch to the Derive
API where possible to prevent this from happening in the future.
2022-01-27 18:48:25 -08:00
Zhaofeng Li
6d5b7d7e3e integration-tests: Only enable documentation build in apply test
Otherwise it takes too long :/
2022-01-27 18:48:25 -08:00
Zhaofeng Li
0a955d0a4c integration-tests: Also run apply test against stable nixpkgs 2022-01-27 18:48:25 -08:00
Zhaofeng Li
6bff965a39 integration-tests: Enable documentation build
It makes sense to keep the tests as close to real life (docs enabled)
as possible.

Ref: #50
2022-01-25 15:03:59 -08:00
Zhaofeng Li
f674ddf173 key: Compute full path to key file in Nix 2022-01-25 14:22:26 -08:00
Zhaofeng Li
e58dde1be0 eval.nix: Don't override modulesPath
`eval-config.nix` will set the canonical path for us that will then be used
to strip the module path prefixes in `nixos/modules/misc/documentation.nix` [1].
This should fix split docs build problems described in #50.

[1] 1511e72b75/nixos/modules/misc/documentation.nix (L79)
2022-01-25 14:22:26 -08:00
Zhaofeng Li
7cd9b6f70c eval.nix: Don't pass baseModules to modules
This is unnecessary and breaks the separation of user `modules`
and `baseModules` in `eval-config.nix`.
2022-01-25 14:22:26 -08:00
Zhaofeng Li
9251019723 nix_eval_jobs: Errors may not have an attribute name attached 2022-01-25 14:22:26 -08:00
Zhaofeng Li
c0107b21e0 General code cleanup 2022-01-25 14:22:26 -08:00
Zhaofeng Li
0019fa8239 Update deps 2022-01-25 14:22:26 -08:00
Paul Haerle
5b8971a0f4
eval.nix: expose nixosModules.deploymentOptions (#49)
Allow flake users to import .#nixosModules.deploymentOptions
into their flake, so that the same expression can be used for both,
.#colmena.$host as well as .#nixosConfiguration.$host, without the
latter complaining about undefined options in "deployment".
2022-01-23 10:06:41 -08:00
Zhaofeng Li
f4896aad39 flake.nix: Fix trailing whitespace 2022-01-22 17:53:54 -08:00
Zhaofeng Li
0d9198c351 spinner: Work around the lack of newline after completion 2022-01-22 17:50:53 -08:00
Zhaofeng Li
57b3ccca85 integration-tests: Test streaming evaluator 2022-01-22 17:50:53 -08:00
Zhaofeng Li
87189ec3df nix_info: Display pinned nix-eval-jobs path 2022-01-22 17:50:53 -08:00
Zhaofeng Li
faf84d5718 flake.nix: Use own nix-eval-jobs fork
Currently we depend on changes that are not yet in a released
version of nix-eval-jobs. This pin needs to go before the 0.3
release.
2022-01-22 17:50:53 -08:00
Zhaofeng Li
cf9a72a1d4 nix: Add initial nix-eval-job integration
A DrvSetEvaluator is able to evaluate attribute sets of derivations,
streaming results as they come in.
2022-01-22 17:50:53 -08:00
Zhaofeng Li
3e40e84e19 nix: Add NixExpression abstraction
This decouples expression generation from evaluation. `NixExpression`s
that evaluate to a set of derivations can be fed to `DrvSetEvaluator`s
which may be able to parallelize evaluation.
2022-01-22 17:50:53 -08:00
Zhaofeng Li
9fbb6b133b job: Make it possible to have a JobHandle not connected to a JobMonitor 2022-01-22 17:50:53 -08:00
Zhaofeng Li
55ce6d078e Remove unused stuff 2022-01-22 17:50:53 -08:00
Zhaofeng Li
7f3e15f1a7 flake.lock: Update nixpkgs 2022-01-22 17:50:53 -08:00
Zhaofeng Li
d3e556027f deployment: Move chunked mode into self-contained function 2022-01-21 00:45:12 -08:00
Zhaofeng Li
82361e5ea5 hive: Clean up, make way for nix-eval-jobs 2022-01-21 00:45:12 -08:00
Zhaofeng Li
3fa0dee6b0 hive: Convert derivations to drvPath in separate attribute
This is to make way for the nix-eval-jobs streaming evaluator.
2022-01-21 00:45:12 -08:00
Zhaofeng Li
7e15450fd2 default.nix: Switch to flake-compat
`package.nix` is kept in sync with the expression in upstream Nixpkgs.
2022-01-21 00:45:12 -08:00
Zhaofeng Li
abb74b9f49 Add EditorConfig rules, fix trailing whitespaces 2022-01-08 01:20:36 -08:00
Zhaofeng Li
deca292b53 Refactor NixOptions 2022-01-08 01:20:36 -08:00
Zhaofeng Li
31fd1e49ac Move nix::{NixResult, NixError} to error::{ColmenaResult, ColmenaError} 2022-01-08 01:20:36 -08:00
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