feat: github ssh support
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
parent
a7dce62fca
commit
ccc0eda517
|
@ -11,11 +11,11 @@
|
||||||
stateVersion = "23.11"; # Please read the comment before changing.
|
stateVersion = "23.11"; # Please read the comment before changing.
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.ssh.extraConfig = ''
|
# programs.ssh.extraConfig = ''
|
||||||
#UseKeychain yes
|
# #UseKeychain yes
|
||||||
#AddKeysToAgent yes
|
# #AddKeysToAgent yes
|
||||||
IdentityFile ~/.ssh/id_ed25519
|
# IdentityFile ~/.ssh/id_ed25519
|
||||||
'';
|
# '';
|
||||||
|
|
||||||
metacfg = {
|
metacfg = {
|
||||||
cli-apps = {
|
cli-apps = {
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
tools = {
|
tools = {
|
||||||
#direnv.enable = true;
|
#direnv.enable = true;
|
||||||
ssh.enable = true;
|
# ssh.enable = true;
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,7 +14,7 @@ let
|
||||||
gpgConf = "${inputs.gpg-base-conf}/gpg.conf";
|
gpgConf = "${inputs.gpg-base-conf}/gpg.conf";
|
||||||
|
|
||||||
gpgAgentConf = ''
|
gpgAgentConf = ''
|
||||||
enable-ssh-support
|
# enable-ssh-support
|
||||||
default-cache-ttl 60
|
default-cache-ttl 60
|
||||||
max-cache-ttl 120
|
max-cache-ttl 120
|
||||||
'';
|
'';
|
||||||
|
@ -31,7 +31,10 @@ in
|
||||||
|
|
||||||
environment.shellInit = ''
|
environment.shellInit = ''
|
||||||
export GPG_TTY="$(tty)"
|
export GPG_TTY="$(tty)"
|
||||||
export SSH_AUTH_SOCK=$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)
|
#export SSH_AUTH_SOCK=$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)
|
||||||
|
if test -z "$SSH_AGENT_PID"; then
|
||||||
|
eval $(ssh-agent -s)
|
||||||
|
fi
|
||||||
|
|
||||||
${pkgs.coreutils}/bin/timeout ${builtins.toString cfg.agentTimeout} ${pkgs.gnupg}/bin/gpgconf --launch gpg-agent
|
${pkgs.coreutils}/bin/timeout ${builtins.toString cfg.agentTimeout} ${pkgs.gnupg}/bin/gpgconf --launch gpg-agent
|
||||||
gpg_agent_timeout_status=$?
|
gpg_agent_timeout_status=$?
|
||||||
|
@ -45,7 +48,7 @@ in
|
||||||
|
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSSHSupport = true;
|
enableSSHSupport = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
metacfg.home.file = {
|
metacfg.home.file = {
|
||||||
|
|
|
@ -29,7 +29,7 @@ with lib.metacfg;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
iterm2
|
# iterm2
|
||||||
# azure-cli
|
# azure-cli
|
||||||
kubectl
|
kubectl
|
||||||
kubectx
|
kubectx
|
||||||
|
@ -37,6 +37,7 @@ with lib.metacfg;
|
||||||
attic-client
|
attic-client
|
||||||
ollama
|
ollama
|
||||||
imagemagick
|
imagemagick
|
||||||
|
gh
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.harald.shell = pkgs.fish;
|
users.users.harald.shell = pkgs.fish;
|
||||||
|
|
Loading…
Reference in a new issue