Skip to content

demo: add env option to shell #1115

Merged
fricklerhandwerk merged 3 commits into
ngi-nix:mainfrom
eljamm:shell-vars
Jun 10, 2025
Merged

demo: add env option to shell #1115
fricklerhandwerk merged 3 commits into
ngi-nix:mainfrom
eljamm:shell-vars

Conversation

@eljamm
Copy link
Copy Markdown
Contributor

@eljamm eljamm commented Jun 9, 2025

Changes

  • Propagate environment variables to the demo shell
  • Small refactors

Test

# default.nix
{
  ngipkgs ?
    import
      (fetchTarball "https://github.com/eljamm/ngipkgs/archive/de1fec73821f847e6c0c5cc12094b780a4f07413.tar.gz")
      { },
}:
ngipkgs.demo-shell (
  { pkgs, ... }:
  {
    demo-shell.xrsh = {
      programs.xrsh = pkgs.xrsh;
      envVars.XRSH_PORT = "9090";
    };
  }
)
$ nix-build default.nix && ./result
[demo-shell] ~/ngipkgs > echo $XRSH_PORT
9090

Comment thread overview/demo/shell.nix Outdated
@eljamm eljamm changed the title demo: add envVars option to shell demo: add env option to shell Jun 10, 2025
@eljamm eljamm requested a review from fricklerhandwerk June 10, 2025 08:18
@themadbit themadbit mentioned this pull request Jun 10, 2025
Copy link
Copy Markdown
Contributor

@fricklerhandwerk fricklerhandwerk left a comment

Choose a reason for hiding this comment

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

Nice!

@fricklerhandwerk fricklerhandwerk merged commit 22776f7 into ngi-nix:main Jun 10, 2025
14 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Nix@NGI Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants