tasks.py: add ssh-to-age to shell and update comments
This commit is contained in:
parent
a6fb3a5457
commit
16962b3a09
3 changed files with 4 additions and 4 deletions
|
@ -8,8 +8,7 @@ keys:
|
||||||
- &ryantm age1d87z3zqlv6ullnzyng8l722xzxwqr677csacf3zf3l28dau7avfs6pc7ay
|
- &ryantm age1d87z3zqlv6ullnzyng8l722xzxwqr677csacf3zf3l28dau7avfs6pc7ay
|
||||||
- &zimbatm age1jrh8yyq3swjru09s75s4mspu0mphh7h6z54z946raa9wx3pcdegq0x8t4h
|
- &zimbatm age1jrh8yyq3swjru09s75s4mspu0mphh7h6z54z946raa9wx3pcdegq0x8t4h
|
||||||
- &zowoq age1m7xhem3qll35d539f364pm6txexvnp6k0tk34d8jxu4ry3pptv7smm0k5n
|
- &zowoq age1m7xhem3qll35d539f364pm6txexvnp6k0tk34d8jxu4ry3pptv7smm0k5n
|
||||||
# scan new hosts like this:
|
# scan new hosts with `scan-age-keys` task
|
||||||
# $ nix-shell -p ssh-to-age --run 'ssh-keyscan buildXX.nix-community.org | ssh-to-age'
|
|
||||||
creation_rules:
|
creation_rules:
|
||||||
- path_regex: ^secrets.yaml$
|
- path_regex: ^secrets.yaml$
|
||||||
key_groups:
|
key_groups:
|
||||||
|
|
|
@ -17,6 +17,7 @@ mkShellNoCC {
|
||||||
))
|
))
|
||||||
jq
|
jq
|
||||||
sops
|
sops
|
||||||
|
ssh-to-age
|
||||||
(python3.withPackages (
|
(python3.withPackages (
|
||||||
p: [
|
p: [
|
||||||
p.deploykit
|
p.deploykit
|
||||||
|
|
4
tasks.py
4
tasks.py
|
@ -124,7 +124,7 @@ find . \
|
||||||
@task
|
@task
|
||||||
def scan_age_keys(c, host):
|
def scan_age_keys(c, host):
|
||||||
"""
|
"""
|
||||||
Scans for the host key via ssh an converts it to age
|
Scans for the host key via ssh an converts it to age. Use inv scan-age-keys build**.nix-community.org
|
||||||
"""
|
"""
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ def scan_age_keys(c, host):
|
||||||
)
|
)
|
||||||
print("###### Age keys ######")
|
print("###### Age keys ######")
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
["nix", "run", "--inputs-from", ".#", "nixpkgs#ssh-to-age"],
|
["ssh-to-age"],
|
||||||
input=proc.stdout,
|
input=proc.stdout,
|
||||||
check=True,
|
check=True,
|
||||||
text=True,
|
text=True,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue