config: Turn missing wireguard peers error into a warning
Version Control Information
Source branch: bruno.sc/config-turn-missing-wireguard-peers-error-into-warning
Target branch: devel
Commits:
* Turn missing wireguard peers error into a warning
Lets Nix (and wireguard_helper) emit a warning instead exiting with an error
when no wireguard peers are configured while wireguard is enabled.
This allows users to clear all peers at once (temporarily).
* wireguard_helper: Implement proper logging and error handling
The script just raised `ValueError`s instead of properly exiting (leading to
stack trace output).
This commit turns those `ValueError`s into custom `DataError`s so that they can
be distinguished from regular `ValueError`s.
The script catches and logs those `DataError`s before gracefully exiting with
exit code 1.
* wireguard_helper: Use mergedeep
This is more robust and also resolves an error in
`_assign_ip_addresses_to_wg_users` when feeding it an empty user list.
Merge Prerequisites
-
MR title (and description) are descriptive -
Code is readable and syntactically correct -
Code is understandable -
Documentation has been updated, if necessary -
Commit messages look good -
Release note file in RST format added in latest commit