Zhaofeng Li
19384f3ee2
Merge pull request #155 from oddlama/fix-overridden-nodes
2023-07-01 09:13:13 -06:00
oddlama
c6f42e447d
fix: allow specialArgs and nodeSpecialArgs to override name and nodes
...
Co-authored-by: Zhaofeng Li <hello@zhaofeng.li>
2023-07-01 09:07:17 -06:00
emilylange
beb157dcb6
ssh: fix substitution when using experimental nix copy
2023-05-23 15:49:52 +02:00
oddlama
24900c5624
fix: remove usage of impure variable currentSystem in flakes
2023-02-02 00:27:29 +01:00
Zhaofeng Li
7602e548a7
hive: Mark all descriptions as Markdown
...
mdDoc didn't exist prior to 22.11 so we make it noop there.
Fixes #133 .
2023-01-29 12:19:27 -07:00
Connor Prussin
691ac99e4d
Use nixops implementation of key services
2023-01-27 13:43:12 -07:00
ThinkChaos
90c88ddd17
refactor: rename NixOptions to NixFlags
...
This helps differentiate in the code Nix's `--option` and other CLI
flags (previously referred to as options).
2022-11-13 16:53:04 -07:00
ThinkChaos
19bf776e8e
cli: Add --nix-option to allow passing arbitrary nix options
2022-11-13 16:53:00 -07:00
Zhaofeng Li
5432fe488e
error: Add backtraces to ChildFailure and ChildKilled
...
The plan is to have more hierarchical error types so it's easier
to find exactly where in the deployment flow an error occurred.
2022-10-29 13:42:47 -06:00
Zhaofeng Li
715e10561b
deployment: Pass job to host during upload_keys
2022-10-29 13:42:47 -06:00
Zhaofeng Li
956c3363b8
deployment: Fail the evaluation job if any attribute fail to evaluate
...
nix-eval-jobs doesn't return non-zero exit code if any attribute
fail to evaluate. Let's just keep track ourselves.
Fixes #122 .
2022-10-19 17:16:25 -06:00
Zhaofeng Li
872949504b
Migrate to Clap 4.0
...
It was kind of a bumpy experience. Gradual migration to the Derive API
is coming soon.
2022-10-09 15:26:37 -06:00
Zhaofeng Li
513ffd1f12
Apply fixes from Clippy
2022-10-09 15:26:37 -06:00
Zhaofeng Li
0ee3bb2e62
Update inotify-tools alias
...
No longer exists in unstable since https://github.com/NixOS/nixpkgs/pull/192681 .
2022-09-28 18:47:42 -06:00
Zhaofeng Li
a8e6b999cf
host/ssh: Fix extension matching for .drv
...
Oopsie
2022-09-21 00:40:27 -06:00
Zhaofeng Li
3bdd0b1cc7
hive/flake.nix: Fix trailing whitespce
2022-09-18 17:45:43 -06:00
Zhaofeng Li
3e8ec98a26
ssh: Support using the experimental nix copy
command to copy
...
The new SSH store protocol (ssh-ng://) provides better performance.
This is now enabled for flake deployments.
2022-09-18 17:27:46 -06:00
Zhaofeng Li
695ec0c36f
Use --extra-experimental-features as opposed to --experimental-features
2022-09-18 17:27:46 -06:00
Zhaofeng Li
d4dcf1c6e9
Add support for using an already-evaluated hive
...
Note that the interface hasn't been finalized yet.
After this commit, the discovery order is:
1. flake.nix `colmenaHive` output (prepared hive)
2. flake.nix `colmena` output (raw hive)
3. hive.nix (raw hive)
2022-09-18 17:27:46 -06:00
Zhaofeng Li
bd048e98d8
flake.nix: Add lib.makeHive
...
Ground work to make the evaluation logic more clearly separated from
the deployment logic.
The `colmenaHive` output will be the integration point between the two
halves.
2022-09-18 17:27:46 -06:00
Zhaofeng Li
f01f6ac197
deployment: Move post-activation key upload after reboot
...
Ref: #113
2022-09-01 18:42:37 -06:00
Zhaofeng Li
e740a50b73
nix/assets: Use more descriptive prefix for temp dir
2022-08-28 00:45:23 -06:00
Zhaofeng Li
3fbc5eeb11
repl: Add arguments depending on Nix version
2022-08-17 11:56:30 -06:00
Zhaofeng Li
7aa1607a3c
nix_eval_jobs: Pass the expression on the command line
...
This gets rid of the temporary file.
2022-08-17 01:09:43 -06:00
Zhaofeng Li
06168dabf3
nix_eval_jobs: Remove --impure
...
Note that this still does not make flake evaluation pure in
nix-eval-jobs yet, since it forcibly resets `evalSettings.pureEval`
prior to starting the evaluation.
2022-08-16 20:38:42 -06:00
Zhaofeng Li
c540e00861
Add repl
subcommand
...
Fixes #115 .
2022-08-16 20:16:00 -06:00
Zhaofeng Li
80426aa814
cli: Support passing --impure
2022-08-16 20:16:00 -06:00
Zhaofeng Li
8aca525788
Make flake evaluation pure
...
This seems to be the easiest way to get pure-eval working with
existing evaluation mechinery (nix-instantiate, nix-eval-jobs).
Now `--pure-eval` is forced for flakes with user being able to
add `--impure` as needed.
2022-08-16 20:16:00 -06:00
Zhaofeng Li
092e5848ab
Directly serialize Nix expressions as quoted strings
2022-08-16 20:16:00 -06:00
Zhaofeng Li
271d9ae576
nix/assets: Make assets a flake
...
Groundwork to make flake evaluation pure. `pure-eval` works when
the git workspace is clean.
2022-08-16 20:16:00 -06:00
Zhaofeng Li
a98d1f8963
nix/flake: Always resolve flake metadata
2022-08-16 20:16:00 -06:00
Zhaofeng Li
62a3d1e6f8
Run rustfmt
2022-07-29 22:13:09 -07:00
David Arnold
b3ca4b1c4d
ref: transparent eval.nix contract
...
- at least to my eyes, this code formatting gives a better view about
the gist of the eval.nix interface
2022-07-09 16:04:23 -05:00
David Arnold
e309b2d4b2
ref: reduce eval.nix contract even further
...
- meta and evalAll contracts are found to be not consumed
2022-07-09 15:41:17 -05:00
David Arnold
83a919bdb0
ref: reduce eval.nix contract forther
...
- module export contratcts can now bypass the eval.nix iface
- enabled by:9bd5e7bb2540664fe1c728c85f80375fe0cbf9fa
2022-07-09 15:41:17 -05:00
David Arnold
c82517fc12
ref: reduce eval.nix contract
...
- documentation contratcts can now bypass the eval.nix iface
- enabled by:9bd5e7bb2540664fe1c728c85f80375fe0cbf9fa
2022-07-09 15:41:15 -05:00
Zhaofeng Li
b8bdf5824c
hive: Use absolute paths for non-flake hives
...
Fixes #107 .
2022-07-04 14:05:50 -07:00
Zhaofeng Li
ea1e7684f1
hive: Add tests for nodeSpecialArgs
2022-07-01 16:31:13 -07:00
Zhaofeng Li
1b045eb38d
Merge pull request #100 from fooker/pr/specialArgs
...
eval.nix: per-node specialArgs
2022-07-01 16:29:59 -07:00
Zhaofeng Li
0209b6dc40
Add name of key to key upload errors
...
> example | Key upload failed: Error processing key "meow": I/O Error: No such file or directory (os error 2)
Fixes #101 .
2022-06-24 17:34:37 -07:00
Dustin Frisch
07499a1eaf
eval.nix: per-node specialArgs
2022-06-23 12:09:29 +02:00
NeverBehave
dd7a2924ca
feat(meta): add disallowApplyAll options
...
unify meta access for machinesFile
update release note and config name
2022-06-20 18:47:53 -07:00
Zhaofeng Li
dd3f4b252c
host/local: Upload keys with sudo as well
2022-06-10 11:29:25 -07:00
Zhaofeng Li
d7aa4ab864
hive/tests: Fix editorconfig
2022-06-09 11:35:02 -07:00
Zhaofeng Li
9db25bd914
deployment: Move GC root creation after build
...
Previously GC roots were only created after successful activation.
2022-06-09 11:31:49 -07:00
Zhaofeng Li
2b0bafa155
eval.nix: Restore signature in introspect
...
It was broken in 9bd5e7bb25
.
2022-06-09 11:31:49 -07:00
Zhaofeng Li
b5629dca83
eval.nix: Enable config merging for meta.nixpkgs on 21.11+
...
Ref: #74 #15
2022-06-03 23:51:32 -07:00
Zhaofeng Li
1cd3aa6401
eval.nix: Accept path-likes in meta.nixpkgs as well
...
This fixes usage with Niv.
2022-06-03 23:51:32 -07:00
Zhaofeng Li
b87da69558
Don't import impure overlays if meta.nixpkgs
is a path
...
Also update documentations to recommend specifying `overlays = []`
explicitly.
Fixes #39 .
2022-06-03 23:51:32 -07:00
Zhaofeng Li
ca12be27ed
apply-local: Escalate privileges only during activation
...
Fixes #85 .
2022-06-03 23:51:32 -07:00