1
0
Fork 0

Fix or fallback

This commit is contained in:
Sandro - 2022-12-27 00:59:45 +01:00
parent ae3e6270bb
commit af228e3b2c
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 2 additions and 2 deletions

View File

@ -3,9 +3,9 @@
let
getHostAddr = name:
let
hostConf = hostRegistry."${name}";
hostConf = hostRegistry."${name}" or (throw "Host ${name} has no ip4 or ip6 address");
in
hostConf.ip4 or (hostConf.ip6 or (throw "Host ${name} has no ip4 or ip6 address"));
hostConf.ip4 or hostConf.ip6;
# all the input flakes for `nix copy` to the build machine,
# allowing --override-input