I'd love some advice on getting flakes to use private repos
Closed this issue · 3 comments
Hi! Love reading through your config for inspiration!
I noticed that you use a private repo in your flake inputs. I'm trying to do a similar thing with my own private repo in my dotfiles, but I keep seeing Permission denied (publickey)
. I have git happily set up for my user, but since I have to use sudo
for nixos-rebuild, that ssh doesn't have the right access.
Also, it feels like there would be a chicken and egg problem. How does the nix configuration know to setup the righ ssh configuration before it's been run the first time?
Anyway, I'd love any advice or resources you have. Thanks!
The key parameter is --use-remote-sudo
https://github.com/ryan4yin/nix-config/blob/main/Makefile#L14
That did it! thanks so much!
Does that mean that there's an extra step when setting up a new machine? I'd assume you have to auth with github first before you can apply
That did it! thanks so much!
Does that mean that there's an extra step when setting up a new machine? I'd assume you have to auth with github first before you can apply
Yes, an ssh private key should be prepared before deploying this flake.
See this branch for more details: https://github.com/ryan4yin/nix-config/tree/nixos-install