Extract away the ssh-client config.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
60aa11b540
commit
454eb03119
2 changed files with 59 additions and 48 deletions
|
|
@ -25,8 +25,12 @@ in
|
|||
../../home-modules/books.nix
|
||||
../../home-modules/ghostty-config.nix
|
||||
../../home-modules/sops.nix
|
||||
../../home-modules/ssh-client.nix
|
||||
];
|
||||
|
||||
# Add the match block for the rasp alarm.
|
||||
ssh-client.add-alarm = true;
|
||||
|
||||
# Let home manager start the X11 session.
|
||||
xsession = {
|
||||
enable = true;
|
||||
|
|
@ -302,54 +306,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
services.ssh-agent.enable = true;
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
addKeysToAgent = "yes";
|
||||
matchBlocks = {
|
||||
"git" = {
|
||||
host = "github.com";
|
||||
user = "git";
|
||||
identityFile = [
|
||||
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
|
||||
"/home/jmug/.ssh/id_jmug" # Fallback key with passphrase.
|
||||
];
|
||||
};
|
||||
"forgejo" = {
|
||||
host = "code.jmug.me";
|
||||
user = "forgejo";
|
||||
identityFile = [
|
||||
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
|
||||
"/home/jmug/.ssh/id_jmug" # Fallback key with passphrase.
|
||||
];
|
||||
};
|
||||
alarm = {
|
||||
user = "alarm";
|
||||
hostname = "alarm";
|
||||
forwardAgent = true;
|
||||
identityFile = "/home/jmug/.ssh/id_ed25519";
|
||||
};
|
||||
wsl = {
|
||||
user = "jmug";
|
||||
hostname = "192.168.10.241";
|
||||
port = 69;
|
||||
forwardAgent = true;
|
||||
identityFile = [
|
||||
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
|
||||
];
|
||||
};
|
||||
ws = {
|
||||
user = "jmug";
|
||||
hostname = "98.59.213.212";
|
||||
port = 69;
|
||||
forwardAgent = true;
|
||||
identityFile = [
|
||||
"/home/jmug/.ssh/id_yubikey" # Auto updated symlik that matches all yubikeys.
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue