mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-01-11 20:40:24 +01:00
I'd love some advice on getting flakes to use private repos #14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zdcthomas on GitHub (Nov 21, 2023).
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 usesudofor 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!
@ryan4yin commented on GitHub (Nov 21, 2023):
The key parameter is
--use-remote-sudohttps://github.com/ryan4yin/nix-config/blob/main/Makefile#L14
@zdcthomas commented on GitHub (Nov 21, 2023):
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
@ryan4yin commented on GitHub (Nov 29, 2023):
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