Can sops-nix work with ssh keys?

To use sops-nix I have to use ssh-to-age to convert all my hosts’ ssh keys to age keys and then add those age keys to the .sops.yaml file. Instead I wish I could just directly add the ssh keys to .sops.yaml but that doesn’t work for me. I wonder why sops-nix can’t just do ssh-to-age on the fly and save me some extra steps?

Here’s the relevant excerpt from my .sops.yaml:

creation_rules:
  - path_regex: secrets\.yaml$
    key_groups:
      - age:
        - *host1_age
        - *host2_age
        - ...

1 Like

So it looks like it’s still an open issue which needs to be addressed?

It’s evidently not supported. If you want it to work you’d have to write a patch or some other code yourself.