nixos-config/tests/README.adoc

27 lines
948 B
Plaintext
Raw Normal View History

2024-03-09 02:39:35 +00:00
= Tests
:toc:
Yes, tests!
Because apparently, letting desktop users BE the developers of their own operating system is such as a GOOOOOOOOD idea...
Anyways, as part of cosplaying of a wannabe developer, we have tests for the major components of this NixOS configuration including the link:../lib[custom library], link:../modules/nixos[our custom NixOS modules], link:../modules/home-manager[custom home-manager modules], and so on.
2024-03-09 02:39:35 +00:00
Each of the test suite follows how the upstream does their tests.
For example, our home-manager module tests just copies what the upstream is doing.
You should be able to test them with the following command:
[source, shell]
----
# These commands assume you're in the project root.
# This test is for home-manager module tests because it is using nix-lib-nmt
# which is only working in pure mode.
2024-03-09 02:39:35 +00:00
nix-shell --pure ./tests/modules/home-manager -A list
# This is for the library.
nix eval -f ./tests lib
----