Skip to content

Instantly share code, notes, and snippets.

@l3m
Last active May 15, 2024 13:14
Show Gist options
  • Save l3m/ffd649cc3d70106142bdeebc2fd11cd6 to your computer and use it in GitHub Desktop.
Save l3m/ffd649cc3d70106142bdeebc2fd11cd6 to your computer and use it in GitHub Desktop.

NixOS

configuration.nix

Use gnome-keyring as ssh agent

services.gnome.gnome-keyring.enable = true;

security.pam.services.lightdm.enableGnomeKeyring = true;

programs.ssh.startAgent = true;

git.nix or wherever you set up git in home-manager

enable git commit signing with ssh key

gpg.format = "ssh";

commit.gpgsign = true;

user.signingkey = "~/.ssh/id_ed25519.pub";

macOS (when not using nix home-manager)

ssh-add --apple-use-keychain ~/.ssh/id_ed25519

add to ~/.config/git/config

[commit] gpgsign = true

[gpg] format = "ssh"

[user] signingkey = "~/.ssh/id_ed25519.pub"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment