NixOS options in environment configuration

Hi, I am trying to enable GPG in workspace. But I don’t know if it is possible to configure the packages that are installed.

# To learn more about how to use Nix to configure your environment
# see: https://developers.google.com/idx/guides/customize-idx-env
{ config, pkgs, ... }: {
  # Which nixpkgs channel to use.
  channel = "stable-23.11"; # or "unstable"

  # Use https://search.nixos.org/packages to find packages
  packages = [
    pkgs.gnupg
    pkgs.pinentry
    pkgs.nodejs_20
  ];

  programs.gnupg.agent = {
    enable = true;
  };
  
  # Sets environment variables in the workspace
  env = {};
  idx = {
    # Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
    # extensions = [
      # "vscodevim.vim"
    # ];

    # Enable previews
    previews = {
      enable = true;
      previews = { };
    };

    # Workspace lifecycle hooks
    workspace = {
      # Runs when a workspace is first created
      onCreate = {
        npm-install = "npm install";
      };
      # Runs when the workspace is (re)started
      # onStart = { };
    };
  };
}

Is it possible to add package options in the idx template?

programs.gnupg.agent = {
enable = true;
};

Thanks. Best regards.

GPG & SSH key pairs management - Help - NixOS Discourse

Thank you so much! But that doesn’t solve my problem because I think it is not possible to add package options in the “dev.nix” file.

Hi Jeff, did you solve the problem in the meantime? Also struggling to configure the same. Cheers!