Skip to content

Commit

Permalink
[nix-flakes] add ~/.nix-profile/bin to PATH (#51)
Browse files Browse the repository at this point in the history
See #50
  • Loading branch information
tennox authored Jun 8, 2024
1 parent 2e4deab commit e7ea2ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions images/nix-flakes/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ docker-nixpkgs.nix.override {
'';
})
] ++ extraContents;

extraEnv = [
"PATH=/root/.nix-profile/bin:/usr/bin:/bin" # Not sure how to just prepend
];
}
3 changes: 2 additions & 1 deletion images/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
, openssh
, xz
, extraContents ? [ ]
, extraEnv ? [ ]
}:
let
image = dockerTools.buildImageWithNixDb {
Expand Down Expand Up @@ -58,7 +59,7 @@ let
"PATH=/usr/bin:/bin"
"SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt"
"USER=root"
];
] ++ extraEnv;
};
};
in
Expand Down

0 comments on commit e7ea2ba

Please sign in to comment.