Skip to content

modules: Export pkgs to match NixOS#2696

Merged
berbiche merged 1 commit intonix-community:masterfrom
Enzime:export-pkgs
Apr 16, 2022
Merged

modules: Export pkgs to match NixOS#2696
berbiche merged 1 commit intonix-community:masterfrom
Enzime:export-pkgs

Conversation

@Enzime
Copy link
Copy Markdown
Member

@Enzime Enzime commented Feb 3, 2022

Description

This makes it a lot easier to access the pkgs that would be used to
build the home configuration, e.g.

nix build ./dotfiles#homeConfigurations."user@host".pkgs.vim

This is useful as it allows access to a Nixpkgs that has been
instiantiated with config and overlays.

Currently you would need to do:

nix build ./dotfiles#homeConfigurations."user@host".options._module.args.value.pkgs.vim

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

    • Added myself and the module files to .github/CODEOWNERS.

This makes it a lot easier to access the `pkgs` that would be used to
build the home configuration, e.g.

    nix build ./dotfiles#homeConfigurations."user@host".pkgs.vim

This is useful as it allows access to a Nixpkgs that has been
instiantiated with config and overlays.
@Enzime Enzime requested a review from rycee as a code owner February 3, 2022 22:25
Copy link
Copy Markdown
Collaborator

@teto teto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks useful

@Enzime
Copy link
Copy Markdown
Member Author

Enzime commented Mar 23, 2022

@berbiche any thoughts on this PR?

Copy link
Copy Markdown
Member

@berbiche berbiche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me

@berbiche berbiche merged commit 8ab155c into nix-community:master Apr 16, 2022
@teto teto mentioned this pull request Aug 22, 2022
7 tasks
teto pushed a commit to teto/home-manager that referenced this pull request Aug 22, 2022
This makes it a lot easier to access the `pkgs` that would be used to
build the home configuration, e.g.

    nix build ./dotfiles#homeConfigurations."user@host".pkgs.vim

This is useful as it allows access to a Nixpkgs that has been
instiantiated with config and overlays.
@Enzime Enzime deleted the export-pkgs branch November 28, 2022 00:05
spacekookie pushed a commit to spacekookie/home-manager that referenced this pull request Feb 10, 2023
This makes it a lot easier to access the `pkgs` that would be used to
build the home configuration, e.g.

    nix build ./dotfiles#homeConfigurations."user@host".pkgs.vim

This is useful as it allows access to a Nixpkgs that has been
instiantiated with config and overlays.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants