feat: Link SSH keys into ~/{public,private}-keys
This commit is contained in:
@@ -3,10 +3,22 @@
|
||||
let mutableSymlink = config.lib.file.mkOutOfStoreSymlink;
|
||||
in lib.mkMerge [
|
||||
{
|
||||
# Link private SSH keys to ~/.ssh/id_ed25519 (where SSH will automatically
|
||||
# find them) and ~/private-keys (where humans will find them). Remember
|
||||
# that private keys must always be linked with mutable symlinks as to not
|
||||
# copy them into the world-readable Nix store!!
|
||||
home.file.".ssh/id_ed25519".source =
|
||||
mutableSymlink "/persist/private-keys/ssh/crumb-at-nixos-testbed";
|
||||
home.file."private-keys/ssh/crumb-at-nixos-testbed".source =
|
||||
mutableSymlink "/persist/private-keys/ssh/crumb-at-nixos-testbed";
|
||||
|
||||
|
||||
# Similarly, public keys are linked where SSH will find them as well as a
|
||||
# human-friendly ~/public-keys.
|
||||
home.file.".ssh/id_ed25519.pub".source =
|
||||
../../public-keys/ssh/crumb-at-nixos-testbed.pub;
|
||||
home.file."public-keys/ssh/crumb-at-nixos-testbed".source =
|
||||
../../public-keys/ssh/crumb-at-nixos-testbed.pub;
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user