dotfiles.nix/home/ssh.nix

29 lines
610 B
Nix
Raw Normal View History

2024-07-18 14:16:04 +00:00
{
config,
lib,
pkgs,
...
}:
let
2024-07-18 14:16:04 +00:00
socket = "${config.home.homeDirectory}/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
in
{
home.sessionVariables.SSH_AUTH_SOCK = socket;
programs.ssh = {
enable = true;
matchBlocks = {
# use the keychain on macOS
"*".extraOptions = lib.mkIf pkgs.stdenv.isDarwin {
UseKeychain = "yes";
AddKeysToAgent = "yes";
IdentityAgent = socket;
};
# entry for easy access to reMarkable tablet
remarkable = {
hostname = "10.11.99.1";
user = "root";
};
};
};
}