use gnome-keyring for ssh-agent

This commit is contained in:
Adithya 2024-01-04 21:51:11 +05:30
parent 6e76dc6a3d
commit 55f2197e8b
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
5 changed files with 14 additions and 7 deletions

View file

@ -1,7 +1,12 @@
{ config
, pkgs
, ...
}: {
}:
let
gnome-keyring-daemon = "${pkgs.gnome.gnome-keyring}/bin/gnome-keyring-daemon";
hyprland = "${config.wayland.windowManager.hyprland.finalPackage}/bin/Hyprland";
in
{
programs.zsh = {
enable = true;
defaultKeymap = "viins";
@ -15,10 +20,13 @@
};
initExtra = ''
bindkey -v '^?' backward-delete-char
eval $(${gnome-keyring-daemon} -s -d 2> /dev/null)
export SSH_AUTH_SOCK
'';
profileExtra = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ] ; then
exec ${config.wayland.windowManager.hyprland.finalPackage}/bin/Hyprland
exec ${hyprland}
fi
'';
shellAliases = {

View file

@ -4,7 +4,9 @@ _: {
./gpg-agent.nix
];
services = {
gnome-keyring.enable = true;
ssh-agent.enable = true;
gnome-keyring = {
enable = true;
components = [ "pkcs11" "secrets" "ssh" ];
};
};
}

View file

@ -2,7 +2,6 @@ _: {
services = {
gpg-agent = {
enable = true;
enableExtraSocket = true;
enableScDaemon = true;
pinentryFlavor = "gnome3";
};

View file

@ -9,7 +9,6 @@ _: {
fuse.userAllowOther = true;
git.enable = true;
seahorse.enable = true;
ssh.startAgent = true;
xwayland.enable = true;
zsh.enable = true;
};

View file

@ -1,7 +1,6 @@
_: {
programs.gnupg.agent = {
enable = true;
enableExtraSocket = true;
pinentryFlavor = "gnome3";
};
}