Skip to content

Repository files navigation

Linux

This repository defines my Linux environment across machines.

Bootstrap

~/.bin/bootstrap installs and updates this repository on a machine idempotently. It clones this repository as a bare repository with sparse checkout, backing up conflicting files before checkout and restoring them afterward. Stale files from previous installations are removed; local changes are kept unless --force is passed.

New machine

Run the bootstrap script directly from GitHub:

curl -fsSL https://raw.githubusercontent.com/tk755/linux/main/.bin/bootstrap | bash

Existing machine

Use the bootstrap command to apply the latest changes:

bootstrap   # see --help for more options

Version control

A home alias is provided to interact with the bare repository:

alias home='git --git-dir=$HOME/.home.git --work-tree=$HOME'

Use it like a git command:

home add ~/.bashrc
home commit -m 'update bashrc'
home push

Conventions

Files are organized by scope:

  • ~/.bin/ — user scripts (on $PATH)
  • ~/.config/** — application scripts and config files
  • ~/.hosts/** — host scripts and system files

Host commands

Use the hostname as a command to run scripts in ~/.hosts/<hostname>/:

suzuki                # list available commands
suzuki upgrade        # run ~/.hosts/suzuki/upgrade

About

My Linux scripts and config files.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages