1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-18 16:29:36 +01:00

Factor out Machine::systemSupported

There's just enough logic (the `"builtin"` special case) that makes this
worthy of its own method.
This commit is contained in:
John Ericson 2024-01-23 12:52:54 -05:00
parent 870acc2892
commit 0aa85088de
3 changed files with 13 additions and 3 deletions

View file

@ -19,6 +19,12 @@ struct Machine {
const std::string sshPublicHostKey;
bool enabled = true;
/**
* @return Whether `system` is either `"builtin"` or in
* `systemTypes`.
*/
bool systemSupported(const std::string & system) const;
/**
* @return Whether `features` is a subset of the union of `supportedFeatures` and
* `mandatoryFeatures`