Skip to content

novicecpp/home-config-ansible

Repository files navigation

home-config-ansible

Workstation setup scripts. All roles (except the private one) are now migrated to My (Ansible) Galaxy.

Prerequisite

  • Packages
    - git
    - sudo
    - ssh and ssh-agent
    - sudo
        
  • Credentials directory
  • Local account with sudo no password (Or use init/sudoer.sh)

Bootstrap (manual)

Create myhome directory.

mkdir ~/myhome

Note: I do not back up the whole home directory, but put everything into ~/myhome instead to clean up the mess left by applications when reinstalling the OS.

Symlink/copy credentials path-to-keys directory.

CREDENTIALS_BACKUPPATH=/path/to/backup/creds
CREDENTIALS_PATH=/path/to/credentials-store
cp $CREDENTIALS_BACKUPPATH $CREDENTIALS_PATH

Add github ssh key to ssh-agent to pull this repository.

CREDENTIALS_PATH=/path/to/credentials-store
SSH_KEY="${CREDENTIALS_PATH}/path-to-ssh-key"
eval "$(ssh-agent)"
ssh-add -f "${CREDENTIALS_PATH}"
# adding ssh config
cat > ~/.ssh/config <<-EOF
Host github.com
    HostName github.com
    User git
    IdentityFile $SSH_KEY
EOF

Clone this repo and initialize home-config-ansible-private, mygalaxy.

cd ~/myhome
git clone [email protected]:novicecpp/home-config-ansible.git
cd home-config-ansible
git submodule update --init
# install galaxy deps and symlink mygalaxy to ~/.ansible
bash mygalaxy/install.sh

Clone home-config and home-config-private to ~/myhome.

cd ~/myhome
git clone [email protected]:novicecpp/home-config.git
cd home-config
git submodule update --init

Install pyenv/venv and ansible

cd ~/myhome/home-config-ansible
bash pyenv_init.sh

Run home-config-ansible

cd ~/myhome/home-config-ansible
source .venv/bin/activate # sourcing venv
bash example_run.sh  # Switch playbook and inventory to the machine you run in the script.

Run home-config setup

TBD

Note

When updating “linux-firmware”, you need to do “cold boot”.

For Lenovo X1/P1 Gen 2,

  • Remove power cord.
  • Restart.
  • Open bios menu > Power > Turn of built-in battery.
  • wait 5 seconds.
  • Plug in power cord, open laptop.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages