Giter VIP home page Giter VIP logo

Comments (4)

midchildan avatar midchildan commented on June 9, 2024 1

The dotfiles.pinentry-mac module is something I used in the past to create a symlink to pinentry_mac in /usr/local/bin.

https://github.com/midchildan/dotfiles/blob/9128258ef19e93818b51fc7258aeb1152f7857bb/home/.config/nixpkgs/home.d/dotfiles/modules/pinentry-mac.nix

from dotfiles.

midchildan avatar midchildan commented on June 9, 2024

The gnupg module that you referenced will actually work without any additional configuration. While pinentry_mac won't be available in PATH or ~/Applications, it'll be present in the Nix store.

Here's a simplified version of the relevant configuration:

home.file.".gnupg/gpg-agent.conf".text = ''
  pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac
'';

When Home Manager sees this, it builds a derivation similar to the following:

pkgs.writeTextFile {
  name = "gpg-agent.conf";
  text = ''
    pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac
  '';
}

Nix sees that this derivation depends on pkgs.pinentry_mac, and instantiates it in the Nix store. ${pkgs.pinentry_mac} is also replaced with the store path.

The key here is that there are other ways to use a package other than including it in home.packages.

from dotfiles.

seh avatar seh commented on June 9, 2024

Nix sees that this derivation depends on pkgs.pinentry_mac, and instantiates it in the Nix store. ${pkgs.pinentry_mac} is also replaced with the store path.

The key here is that there are other ways to use a package other than including it in home.packages.

Oh, that was not apparent to me. Thank you for explaining that.

I'm not sure that I have any other reason to refer to the pinentry-mac program other than for GnuPG to prompt me, so perhaps it being present but sort of "hidden" would be enough.

from dotfiles.

seh avatar seh commented on June 9, 2024

I confirmed that yes, pinentry-mac is available, in one case at a path like /nix/store/h0j374ylb8g411sv9wnb55859v6fq2n2-pinentry-mac-1.1.1.1/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac.

from dotfiles.

Related Issues (3)

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.