Commit graph

163 commits

Author SHA1 Message Date
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
Zhaofeng Li
fa07814abf hive/assets.rs: Use OpenOptions::new() instead 2022-06-03 23:51:32 -07:00
Zhaofeng Li
af3247faeb Update docs after #91 2022-06-03 23:51:32 -07:00
Zhaofeng Li
ed91898e59 Clippy 2022-06-03 23:51:32 -07:00
Zhaofeng Li
ac8852dcdf hive: Refactor static file creation 2022-06-02 16:39:45 -07:00
Wanja Hentze
6fe48ccd04 nix-eval-jobs: Strip quotes surrounding attribute names
Fixes #92.
2022-06-02 16:39:45 -07:00
Victor Nawothnig
e937eb8faa Do not use an explicit user for ssh when deploymentUser is null 2022-06-01 12:30:49 +02:00
Zhaofeng Li
429a0f5aa1 eval.nix: Suppress _module.args docs 2022-05-22 02:15:33 -07:00
Zhaofeng Li
1be16d552d apply: Add --reboot flag
Fixes #46.
2022-05-22 02:15:33 -07:00
Zhaofeng Li
e239cbd260 host: Add get_current_system_profile 2022-05-22 02:15:33 -07:00
Zhaofeng Li
c8b79e7e2d ssh: Clean up 2022-05-22 02:15:33 -07:00
David Arnold
9bd5e7bb25 imp: soc of eval, modules & options
- the reason for this change is to have more transparent separation
  of concern between effectuations of the module system and pre-module
  system effectuations

- with improved flakes support down the line, pre-module system
  effectuations will get more complex

- this also allows to patch the aspects of the evaluation individually
  while tracking other components from upstream. eg. path options & eval
  but not modules
2022-05-22 01:54:52 -07:00
Zhaofeng Li
6a64625fda eval.nix: Ignore typed allowAliases config when checking unoverridden config keys
This was added in NixOS/nixpkgs#166792.

Fixes #74.
2022-04-25 00:03:57 -07:00
Zhaofeng Li
ab754ac2e3 Squelch dead code warnings on non-Linux platforms (aka macOS) 2022-04-19 00:29:35 -07:00
Zhaofeng Li
5a81996afb ssh: Enable BatchMode 2022-04-19 00:29:35 -07:00
Zhaofeng Li
108c135700 Rename: NixFailure -> ChildFailure, NixKilled -> ChildKilled 2022-03-07 22:02:04 -08:00
Zhaofeng Li
2b281286d0
eval.nix: Add "${name}-key.service" units for keys (#51)
Fixes #48.
2022-02-16 10:23:27 -08:00
Zhaofeng Li
85b0107b59 eval.nix: Skip recursive type checking for nodes in colmena eval as well
This matches the behavior of the `nodes` argument in NixOS modules.
2022-02-16 01:11:06 -08:00
Linus Heckemann
efa7322587
streaming evaluator: respect eval-nodes-limit (#58) 2022-02-16 01:10:52 -08:00
Zhaofeng Li
c088925e0d Misc doc tweaks 2022-02-05 18:43:43 -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
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