Skip to content

Commit

Permalink
[nix-flakes] add ~/.nix-profile/bin to PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
tennox committed Feb 28, 2023
1 parent d46ba95 commit 595c86e
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 595c86e

Please sign in to comment.