mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-09 22:22:40 +02:00
chore(All Markdown Files): auto wrap text, fix typos
This commit is contained in:
+17
-14
@@ -7,18 +7,18 @@ There is no need to do this when you have a small number of machines.
|
||||
But when you have a large number of machines, it is necessary to manage them in a fine-grained way,
|
||||
otherwise, it will be difficult to manage and maintain them.
|
||||
|
||||
The number of my machines has grown to more than 20,
|
||||
and the increase in scale has shown signs of getting out of control of complexity,
|
||||
so it is a natural and reasonable choice to use this fine-grained architecture to manage.
|
||||
The number of my machines has grown to more than 20, and the increase in scale has shown signs of
|
||||
getting out of control of complexity, so it is a natural and reasonable choice to use this
|
||||
fine-grained architecture to manage.
|
||||
|
||||
## Tests
|
||||
|
||||
Testing is not necessary when your configuration is not complex,
|
||||
but with the increase in the number and configuration of your machines, testing becomes more and more important.
|
||||
Testing is not necessary when your configuration is not complex, but with the increase in the number
|
||||
and configuration of your machines, testing becomes more and more important.
|
||||
|
||||
We have two types of tests: eval tests and nixos tests,
|
||||
both of which can help us detect many obscure errors early,
|
||||
so as to avoid testing directly in the real world, and to avoid failures in personal computers and even corporate online environments.
|
||||
We have two types of tests: eval tests and nixos tests, both of which can help us detect many
|
||||
obscure errors early, so as to avoid testing directly in the real world, and to avoid failures in
|
||||
personal computers and even corporate online environments.
|
||||
|
||||
Related projects & docs:
|
||||
|
||||
@@ -30,9 +30,9 @@ Related projects & docs:
|
||||
|
||||
> TODO: More Tests!
|
||||
|
||||
Eval Tests evaluate the expressions and compare the results with the expected results.
|
||||
It runs fast, but it doesn't build a real machine.
|
||||
We use eval tests to ensure that some attributes are correctly set for each NixOS host(not Darwin).
|
||||
Eval Tests evaluate the expressions and compare the results with the expected results. It runs fast,
|
||||
but it doesn't build a real machine. We use eval tests to ensure that some attributes are correctly
|
||||
set for each NixOS host(not Darwin).
|
||||
|
||||
How to run all the eval tests:
|
||||
|
||||
@@ -45,12 +45,15 @@ nix eval .#evalTests --show-trace --print-build-logs --verbose
|
||||
> WIP: not working yet
|
||||
|
||||
NixOS Tests builds and starts virtual machines using our NixOS configuration and run tests on them.
|
||||
Comparing to eval tests, it runs slow, but it builds a real machine, and we can test the whole system actually works as expected.
|
||||
Comparing to eval tests, it runs slow, but it builds a real machine, and we can test the whole
|
||||
system actually works as expected.
|
||||
|
||||
Problems:
|
||||
|
||||
- [ ] We need a private cache server, so that our NixOS tests do not need to build some custom packages every time we run the tests.
|
||||
- [ ] Cannot test the whole host, because my host relies on its unique ssh host key to decrypt its agenix secrets.
|
||||
- [ ] We need a private cache server, so that our NixOS tests do not need to build some custom
|
||||
packages every time we run the tests.
|
||||
- [ ] Cannot test the whole host, because my host relies on its unique ssh host key to decrypt its
|
||||
agenix secrets.
|
||||
- [ ] Maybe it's better to test every service separately, not the whole host?
|
||||
|
||||
How to run NixOS tests for every host:
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ in {
|
||||
settings = {
|
||||
typos = {
|
||||
write = true; # Automatically fix typos
|
||||
ignored-words = [];
|
||||
configPath = "../.typos.toml";
|
||||
};
|
||||
prettier = {
|
||||
write = true; # Automatically format files
|
||||
|
||||
Reference in New Issue
Block a user