Skip to content

Commit 4160ad4

Browse files
committed
Apply @mafredri's suggestion
1 parent ae0f24b commit 4160ad4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dogfood/main.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ resource "coder_agent" "dev" {
7171
sudo service docker start
7272
7373
# Install Nix into our bash profile so `nix-shell`, `nix-build, and `nix` are available
74-
echo '. /home/coder/.nix-profile/etc/profile.d/nix.sh' >> /home/coder/.bashrc
7574
bash /opt/nix/install --no-daemon
75+
if ! grep -q '. ~/.nix-profile/etc/profile.d/nix.sh' ~/.bashrc; then
76+
echo '. ~/.nix-profile/etc/profile.d/nix.sh' >> ~/.bashrc
77+
fi
7678
7779
DOTFILES_URI=${var.dotfiles_uri}
7880
if [ -n "$DOTFILES_URI" ]; then

0 commit comments

Comments
 (0)