nixos-config/tests
Gabriel Arazas 92cece8273
home-manager/services/borgmatic: init replacement module
Like the previous replacement module, we cannot test it properly since
it relies on `modulesPath` specialArg which home-manager initialize and
nmt doesn't.
2024-09-07 22:04:58 +08:00
..
lib lib/fetchers: add Internet Archive fetcher 2024-08-28 14:36:28 +08:00
modules home-manager/services/borgmatic: init replacement module 2024-09-07 22:04:58 +08:00
default.nix tests: include tests-specific utils in all test suites 2024-08-29 13:23:46 +08:00
README.adoc docs: add instructions for testing custom wrapper-manager modules 2024-09-04 14:49:51 +08:00
utils.nix tests: update default arguments 2024-07-23 21:43:21 +08:00

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 custom library, our custom NixOS modules, custom home-manager modules, and so on.

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:

# 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.
nix-shell --pure ./tests/modules/home-manager -A list

# This is for the library.
nix eval -f ./tests lib

# This is for the wrapper-manager modules but it should be best done with the
# tests passthru attribute. We just don't have easy way of testing with them
# yet.
nix build -f ./tests/modules/wrapper-manager