use ssh keys instead of password
This commit is contained in:
parent
ed720cc9dc
commit
30cc1f42b4
4 changed files with 40 additions and 2 deletions
18
lib/helpers.nix
Executable file
18
lib/helpers.nix
Executable file
|
@ -0,0 +1,18 @@
|
|||
{ lib, ... }:
|
||||
|
||||
with lib;
|
||||
rec {
|
||||
indexFrom = origin: name: item: list: foldr
|
||||
(h: t:
|
||||
if h.${origin} == name && hasAttr item h
|
||||
then h.${item}
|
||||
else t)
|
||||
(error ''
|
||||
No item at the origin point ${origin} with element ${name} found.
|
||||
Please make sure that the item with that origin exists, and,
|
||||
failing that, that it also has the requested item defined.
|
||||
'')
|
||||
list;
|
||||
|
||||
getSSH = name: keys: indexFrom "hostname" name "ssh" keys;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue