gitpod
                                
                                 gitpod copied to clipboard
                                
                                    gitpod copied to clipboard
                            
                            
                            
                        Feedback Issue: Dotfiles Support
Objective
This issue is to track feedback related to Dotfiles Support.
See related roadmap item [21]
https://github.com/trumbitta/dotfiles didn't 100% work for me
A README.md was indeed symlinked, but my customized .gitconfig wasn't
I understand this is due to the file already existing in the workspace. Here's my reply to a suggested workaround (merging via install script):
thanks but I'm hesitant to do that in an install script, because I need to use this same repo in my work machine and in my personal machine, where I have already an "inversion of control" situation with:
[include] path = ~/.gitconfig-localI use .gitconfig-local to make git merge its own configurations when needed, without my intervention with a script
I'm going to try this updated install script snippet by @axonasif 🙏
#!/usr/bin/env bash
set -eu;
if test ! -e /ide/bin/gp-code || test ! -v GITPOD_REPO_ROOT; then {
    printf 'error: This script is meant to be run on Gitpod, quiting...\n' && exit 1;
} fi
_source_dir="$(readlink -f "$0")" && _source_dir="${_source_dir%/*}";
printf '%s\n' "$(< "$_source_dir/.gitconfig")" >> $HOME/.gitconfig
A user wished to have a feature that would allow them set a default .gitpod.yml and Dockerfile(if specified in .gitpod.yml) https://github.com/gitpod-io/gitpod/issues/6275. Someone surely can script up something on install.sh from their dotfiles repo to automatically copy these files but that would require the user to create a new workspace to see the changes. I think it will be nice if somehow we could supply custom .gitpod.yml and Dockerfile on condition from our dotfiles repo and that Gitpod would pick them up before workspace initialization.
cc @csweichel
Linking https://github.com/gitpod-io/gitpod/issues/7639 because it is related to dotfiles 🙂.
Cross-linking https://github.com/gitpod-io/gitpod/issues/7592 here.
Maybe it would be handy for setup scripts to clone submods if the .dotfiles dir is not owned by root
How does this work with VS Code User settings? My settings in ~/.config/Code/User/settings.json don't seem to be applied. The User settings that gitpod lets you edit appears to be some virtual file?
How does this work with VS Code User settings? My settings in
~/.config/Code/User/settings.jsondon't seem to be applied. The User settings that gitpod lets you edit appears to be some virtual file?
Yes, it's stored on your browser.
Ok, would it be possible to make gitpod use the file in .config instead if it's present? Or, as a workaround, is there a way to write to the in browser file, so I can sync it in the install script?
FYI I wasnt getting my dotfiles repo but the logs gave a clue at ~/.dotfiles.log. I hadnt given Gitpod access to my private repos at Github. I fixed that and it now works as documented. Thanks for this feature.
Another small feature request: automatic execution of .install.sh and other variants prepended with the .
Reason being: this being dotfiles, I try to keep everything in this repo.. a dotfile. (Feels cleaner for me, but that's subjective).
Another small feature request: automatic execution of
.install.shand other variants prepended with the.Reason being: this being dotfiles, I try to keep everything in this repo.. a dotfile. (Feels cleaner for me, but that's subjective).
You can always call your other scripts from your main install.sh.
Yes, it's stored on your browser.
@axonasif I don't understand the answer. I am trying to get my zsh4humans set up and need the default shell for the gitpod user to be $(which zsh) and not bash. Is there a way to define user custom vscode settings? (btw: I use the VSCode app not the browser).
@christian-bromann IIRC in order to have zsh as my default shell I set up the $SHELL environment variable in my user settings in Gitpod.
 
                                    
                                    
                                    
                                
@trumbitta thanks, this works when I create a new terminal within VSCode but fails when executing tasks. I could workaround it by modifying them but the idea of dot files is to create custom settings. So I guess a suggestion would be to have a Gitpod user allow to set the default shell for all their tasks.
Ok, I have to correct myself: it seems that zsh is now used everywhere but all tasks started by gitpod come with this terminal UI:
 While a new shell correctly starts like this:
While a new shell correctly starts like this:

Even an exec zsh doesn't help.
@christian-bromann @trumbitta you have to include the full path for your shell if you want to do it that way, also this is not recommended to do for non-posix shells like fish if anyone's wondering.

you have to include the full path for your shell if you want to do it that way
That is what I had
fyi: behavior between using VSCode as application where
❯ echo $SHELL
/usr/bin/zsh
vs browser:
 $ echo $SHELL
/bin/bash
differs. Additionally it seems that running command through zsh fails due to this error:
node:internal/modules/cjs/loader:936
  throw err;
  ^
Error: Cannot find module '/home/gitpod/.vscode-server/data/User/workspaceStorage/27251866a452c4736ef63d0424ce389e/ms-vscode.js-debug/bootloader.js'
Require stack:
- internal/preload
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at Module._preloadModules (node:internal/modules/cjs/loader:1280:12)
    at loadPreloadModules (node:internal/bootstrap/pre_execution:476:5)
    at prepareMainThreadExecution (node:internal/bootstrap/pre_execution:77:3)
    at node:internal/main/run_main_module:7:1 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ 'internal/preload' ]
}
Idk what to say... my shell is zsh everywhere and it works via the SHELL env variable without /usr/bin 🤷
You can also find my dotfiles repo some comments above.
Another small feature request: automatic execution of
.install.shand other variants prepended with the.Reason being: this being dotfiles, I try to keep everything in this repo.. a dotfile. (Feels cleaner for me, but that's subjective).You can always call your other scripts from your main
install.sh.
Yea, this would be a pretty obvious solution, but also defeats the purpose of why people like me have the install script include a prepending dot. The point of the setup is that the .install.sh is the main setup file, and is hidden by ls or ll, leaving only the data as listable, not configuration or installation scripts. And if someone were to say "just delete the installer afterwords".. then it creates a change to .git, leaving git conscious shells to be a bit annoying. Just deleting the .git as well.. just makes managing/updating the dotfiles itself more work.
(Not meaning to be condescending, just trying to explain the usecase and the other mitigation's problems.)
I was getting the error error: This script is meant to be run on Gitpod, quiting... tweaked the setup.sh by @axonasif, @trumbitta 🙏 to copy over .gitconfig as follows:
#!/usr/bin/env bash
set -eu;
if test ! -v GITPOD_REPO_ROOT; then {
    printf 'error: This script is meant to be run on Gitpod, quiting...\n' && exit 1;
} fi
_source_dir="$(readlink -f "$0")" && _source_dir="${_source_dir%/*}";
printf '%s\n' "$(< "$_source_dir/.gitconfig")" >> $HOME/.gitconfig
Ok, I have to correct myself: it seems that zsh is now used everywhere but all tasks started by gitpod come with this terminal UI:
While a new shell correctly starts like this:
Even an
exec zshdoesn't help.
Hey @christian-bromann, it should be fixed now, it was probably related with TERM variable having xterm-color.
Idk what to say... my shell is
zsheverywhere and it works via theSHELLenv variable without/usr/bin🤷You can also find my dotfiles repo some comments above.
I forgot why I said that, but it was likely because something wasn't working for me 😅
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.