mirror of
https://github.com/kmein/niveum
synced 2026-03-20 03:51:07 +01:00
feat(ssh): use gpg agent for agent
This commit is contained in:
@@ -18,10 +18,25 @@ in {
|
|||||||
maxCacheTtlSsh = 4 * defaultCacheTtlSsh;
|
maxCacheTtlSsh = 4 * defaultCacheTtlSsh;
|
||||||
sshKeys = [
|
sshKeys = [
|
||||||
"568047C91DE03A23883E340F15A9C24D313E847C"
|
"568047C91DE03A23883E340F15A9C24D313E847C"
|
||||||
|
"BB3EE102DB8CD45540A78A6B18B511B67061F6B4" # kfm@manakish ed25519
|
||||||
|
"3F8986755818B5762A096BE212777EAAC441DD9D" # fysiweb rsa
|
||||||
|
"0E4ABD229432486CC432639BB0986B2CDE365105" # agenix ed25519
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.extraInit = ''
|
||||||
|
if [[ -z "$SSH_AUTH_SOCK" ]]; then
|
||||||
|
export SSH_AUTH_SOCK="$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment.interactiveShellInit = ''
|
||||||
|
GPG_TTY="$(tty)"
|
||||||
|
export GPG_TTY
|
||||||
|
${pkgs.gnupg}/bin/gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||||
|
'';
|
||||||
|
|
||||||
home-manager.users.me.programs.ssh = {
|
home-manager.users.me.programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
matchBlocks = rec {
|
matchBlocks = rec {
|
||||||
|
|||||||
Reference in New Issue
Block a user