Use KeepassXC as SSH Agent

This replaces the configuration of files per ssh match block,
as well as the need for keychain.

See: https://keepassxc.org/docs/KeePassXC_UserGuide#_ssh_agent
This commit is contained in:
Daniel Siepmann 2023-05-24 19:54:41 +02:00
parent 6d28265b1d
commit 6dbecabf40
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
5 changed files with 6 additions and 23 deletions

View file

@ -45,4 +45,8 @@
LockDatabaseIdleSeconds = 120;
Security_HideNotes = true;
};
SSHAgent = {
Enabled = true;
};
}

View file

@ -40,10 +40,6 @@ in {
inherit config pkgs;
};
keychain = import ./programs/keychain.nix {
inherit config pkgs ownLib;
};
gpg = import ./programs/gpg.nix {
inherit config;
};

View file

@ -1,10 +0,0 @@
{ config, pkgs, ownLib }:
{
enable = true;
keys = if ownLib.onHikari {} then ["id_ed25519"] else ["id_rsa" "id_ed25519"];
enableBashIntegration = false;
enableFishIntegration = false;
enableZshIntegration = true;
enableXsessionIntegration = false;
}

Binary file not shown.

View file

@ -1,10 +1,6 @@
_:
let
oldKey = "~/.ssh/id_rsa";
newKey = "~/.ssh/id_ed25519";
in {
{
enable = true;
matchBlocks = {
@ -17,10 +13,7 @@ in {
"github.com" = {
user = "git";
hostname = "github.com";
identityFile = "${newKey}";
};
} // import ./ssh-match-blocks.nix {
inherit oldKey newKey;
};
} // import ./ssh-match-blocks.nix { };
}