Dotfiles handled with chezmoi.
Go to file
2020-11-10 16:15:34 +01:00
bin Added 'bin' directory. 2020-10-23 14:01:32 +02:00
dot_bashrc.d Fixed wrong internal name for .sshrc. 2020-11-10 16:15:34 +01:00
.chezmoi.toml.tmpl added missing template file 2020-10-23 20:03:34 +02:00
.chezmoiignore Added vim ligthline plugin. 2020-11-08 16:56:24 +01:00
dot_bashrc_linux Added extension include. 2020-10-23 13:29:58 +02:00
dot_gitconfig.tmpl Added stuff from .gitconfig (more aliases and push/pull hints). 2020-11-08 14:10:58 +01:00
dot_solarize_colors Added .sshrc with solarized color schema. 2020-10-23 13:33:33 +02:00
dot_solarize_colors_base Added .sshrc with solarized color schema. 2020-10-23 13:33:33 +02:00
dot_sshrc.tmpl Secured .sshrc sourcing. 2020-11-08 14:06:53 +01:00
dot_vimrc Added .vimrc - to be done: vim packages. 2020-11-08 14:54:51 +01:00
README.adoc Added check for interactive shell to README. 2020-11-09 16:48:28 +01:00
vim-lightline.tar.gz Added vim ligthline plugin. 2020-11-08 16:56:24 +01:00

Dotfiles managed with chezmoi

Initialization

TODO: how to handle a new linux system correctly.

Test with centos7-01:

  1. put executable to HOME dir

  2. add public ssh key to gitea user

  3. initialize with ./chezmoi init sdroid@gitea.sdroid.uber.space:heavy/dotfiles.git

  4. check what will happen with ./chezmoi diff

  5. apply it with ./chezmoi apply

After that a bin directory will exist (if not yet present before), move the executable to this dir to have it PATH.

AWS Systeme (Draft)

TODO: create user file for initialization at provisioning

  1. install go sudo yum install -y golang golang-bin

  2. install git sudo yum install -y git-all

  3. install chezmoi from git repo (see below)

  4. check GOPATH and adjust if necessary

  5. initialize with chezmoi init https://gitea.sdroid.uber.space/heavy/dotfiles.git (Use 'heavy' as user).

  6. check what will happen with chezmoi diff

  7. TODO: vi .config/chezmoi/chezmoi.toml (Template is not correct)

  8. apply it with chezmoi apply

chezmoi installation
cd $(mktemp -d)
git clone --depth=1 https://github.com/twpayne/chezmoi.git
cd chezmoi
go install

New User

Better try modifications with a new user to keep the defaul user accessible to the system. See below links to proceed.

Uberspace

Alternative way to include .sshrc by detecting SSH connection.

# User specific aliases and functions

# test if the prompt var is not set
# See https://unix.stackexchange.com/questions/154395/running-scp-when-bashrc-of-remote-machine-includes-source-command
if [ -z "$PS1" ]; then
    # prompt var is not set, so this is *not* an interactive shell
    return
fi

if [ -f ~/.sshrc ] && [ -z "$SSH_CLIENT" ]; then
    echo "Not a ssh connection"
else
    echo "ssh client is present: $SSH_CLIENT"
    . ~/.sshrc
fi