elitak / nixos-infect

[GPLv3+] install nixos over the existing OS in a DigitalOcean droplet (and others with minor modifications)
GNU General Public License v3.0
1.33k stars 215 forks source link

Fails with cert-authority authorized keys #82

Open fiddlerwoaroof opened 2 years ago

fiddlerwoaroof commented 2 years ago

I like to use SSH certificate authorities to authorize all my computers at once. The regex in nixos-infect strips off the "cert-authority" prefix, making authentication impossible:

https://github.com/elitak/nixos-infect/blob/1e2ab19808038b9598f88b69a6c1d3e1ce4c92dd/nixos-infect#L16

Here's a sample authorized_keys line for this sort of authentication:

cert-authority ssh-ed25519 00000000000000000000000000000000000000000000000000000000000000000000 2020-11-23
fiddlerwoaroof commented 2 years ago

I forked this project and have used this modified sed command successfully: https://github.com/fiddlerwoaroof/nixos-infect/blob/8f3bb10b93e9216b92196d8ca4b082184a2d554e/nixos-infect#L16