1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-09 02:21:05 +01:00
home-manager/tests/modules/services/nix-gc-darwin
Damien Cassou 3b930bb653 services.nix-gc: improve error message when nix.gc.frequency is invalid on darwin
Previously, if an invalid value was passed, the build would fail with:

       error: attribute '"00:02:03"' missing
       at /nix/store/sz92b5gqi0ma61d18fwbihi8p37mkvir-source/modules/services/nix-gc.nix:69:5:
           68|     in
           69|     freq.${frequency};
             |     ^
           70|

There was an assertion that should have prevented this from happening
but the crash would happen before the assertion gets a chance to stop
the build with a nice error message.

This commit both gives the assertion a chance to trigger and improves
the assertion's error message.
2025-05-15 13:07:13 -05:00
..
basic.nix tests: rework derivation stubbing 2025-02-04 23:58:20 +01:00
darwin-nix-gc-interval-assertion.nix services.nix-gc: improve error message when nix.gc.frequency is invalid on darwin 2025-05-15 13:07:13 -05:00
default.nix services.nix-gc: improve error message when nix.gc.frequency is invalid on darwin 2025-05-15 13:07:13 -05:00
expected-agent.plist nix-gc: add service 2024-02-05 18:10:00 +01:00