Zhaofeng Li
55ce6d078e
Remove unused stuff
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
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
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
da7907c874
General code cleanup
2022-01-05 14:01:05 -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
81e2982bbb
Migrate to clap 0.3
2022-01-03 10:37:03 -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
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
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
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
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
7433661aed
Add deployment.keys.<name>.name
2021-12-05 01:14:12 -08:00
Zhaofeng Li
0f8873027f
utils: Don't panic in capture_stream
2021-12-05 01:14:12 -08:00
Zhaofeng Li
ddccad4fb9
eval.nix: Auto-call functors as well
...
This makes some very cursed setup work :P
2021-12-04 01:03:26 -08:00
Zhaofeng Li
7757a0e45d
command/apply: Use verbose output when goal is "dry-activate"
...
It doesn't make sense to use the spinners since you can't see
the full output from the activation script.
Fixes #44 .
2021-12-04 01:03:26 -08:00
Zhaofeng Li
7b1feffb9e
util: Log the configuration in use
2021-12-04 01:03:26 -08:00
Zhaofeng Li
9cd2af9438
cli: Re-order arguments in help message
2021-12-04 01:03:26 -08:00
Zhaofeng Li
f253e6eb18
cli: Allow configuring output colorization
...
We now follow the <https://bixense.com/clicolors > standard.
2021-12-04 01:03:26 -08:00
Zhaofeng Li
dc57b489ea
progress: Restore tty-detection after refactoring
2021-12-04 01:03:26 -08:00
Zhaofeng Li
064432f38e
nix/deployment: Misc cleanup
2021-12-04 01:03:26 -08:00
Zhaofeng Li
04976e5fda
job: Make event formatting less ugly
2021-12-03 00:06:21 -08:00
Zhaofeng Li
a3e292d7fb
nix: Another deployment parallelization oops
2021-12-03 00:06:17 -08:00
Zhaofeng Li
2bba64a002
nix: Fix deployment parallelization
2021-12-02 23:49:46 -08:00
Zhaofeng Li
a42e8c5bf0
Misc cleanup
2021-11-23 14:12:01 -08:00
Zhaofeng Li
ec51f5703f
deployment: A few oops
2021-11-22 01:53:08 -08:00
Zhaofeng Li
572f77dbf5
A couple of fixes to progress output
...
Need to have some integration tests.
2021-11-21 16:02:45 -08:00
Zhaofeng Li
b3016ad3a7
progress/plain: Fix label alignment
2021-11-21 16:02:45 -08:00
Zhaofeng Li
46090598eb
apply-local: Fix output after rewrite
2021-11-21 15:30:52 -08:00
Zhaofeng Li
0cb3f8e968
Redesign deployment process (again)
...
We now ship Events from different parts of the deployment process
via a channel to a job monitor.
2021-11-21 00:11:37 -08:00
Zhaofeng Li
5c84134af3
Refactor node names
2021-11-20 23:34:52 -08:00
Zhaofeng Li
47ccc6c9c4
nix/info.rs: Update message about nixUnstable for 21.11
2021-11-18 15:41:02 -08:00