Code Monkey home page Code Monkey logo

Comments (3)

luxus avatar luxus commented on June 1, 2024 1

great with your help i got everything working so far, even with your config.
i imported my key by hand. i didn't knew that i can use a gpg key for ssh, that is working as well now.
i should grab one of these yubikeys

from nix-config.

Misterio77 avatar Misterio77 commented on June 1, 2024

Hey!

Glad I could be of help somehow.

I currently use a yubikey for storing my key, but this should work with usual keys stored on disk too.

My most important gpg-related stuff are configured through home-manager. These are the minimum you have to set to get gpg working:

{
  services.gpg-agent = {
    enable = true;
    pinentryFlavor = "gtk2";
  };
  programs.gpg = {
    enable = true;
  };
}

And that's it! Pretty simple.

My own config is a little bit more complicated, because I also:

  • Get public keys declaratively. I do this to avoid having to do anything manually, as my private keys lives on my yubibkey (but I need to have the public key on the keyring to use it). This isn't really useful if you have private keys as files, as you need to copy them anyway, might as well copy the public part.
  • Use my key for SSH. For this, you should also set services.gpg-agent.enableSshSupport = true and services.gpg-agent.sshKeys = [ 'keygrip' ] (you can get your keygrip using gpg --list-secret-keys --with-keygrip).
  • Forward gpg-agent through SSH

from nix-config.

Misterio77 avatar Misterio77 commented on June 1, 2024

Oh and I use gnome3 pinentry flavor instead of gtk2 as it looks nicer. I think you need to set (on NixOS, not home-manager) the option services.dbus.packages = [ pkgs.gcr ] for it to work.

from nix-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.