Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

Personal configuration files and initialization scripts.

Quick Start (on a fresh machine)

# 1. Install prerequisites
sudo apt-get update && sudo apt-get install -y git curl

# 2. Clone this repository
git clone https://github.com/eidnoat/dotfiles.git && cd dotfiles

# 3a. Configure the current user (zsh + go)
sudo ./install.sh all

# 3b. ...or provision a new user first, then configure them
sudo ./scripts/init_user.sh <username>
sudo TARGET_USER=<username> ./install.sh all

# 4. Apply to the current terminal
source ~/.zshrc     # or: exec zsh

Requires a Debian-based Linux distribution (Debian/Ubuntu) and root/sudo. See Usage for details.

Directory Layout

dotfiles/
├── install.sh              # Top-level entry: deploy modules (requires root)
├── scripts/                # Initialization scripts (init_<name>.sh)
└── modules/                # Configuration files, grouped by module

Usage

All scripts must run as root. They deploy for the user who invokes sudo; override with TARGET_USER=<name>.

Deploy modules

sudo ./install.sh                # error, lists available modules
sudo ./install.sh zsh            # deploy the named module
sudo ./install.sh go zsh         # deploy multiple modules
sudo ./install.sh all            # deploy all modules

Each module can also be run directly, e.g.:

sudo ./scripts/init_zsh.sh                    # set up the zsh environment
sudo ./scripts/init_go.sh                     # install Go (default: 1.27.0)
sudo GO_VERSION=1.26.5 ./scripts/init_go.sh   # install a specific Go version
sudo TARGET_USER=alice ./scripts/init_zsh.sh  # deploy for another user

Apply changes to the current terminal

init_*.sh scripts run as sudo subprocesses, so they cannot change the environment of the terminal that invoked them. After a script finishes, apply the changes in the current shell yourself by running:

source ~/.zshrc     # or: exec zsh

(The scripts print this reminder at the end of their output.)

New server initialization

sudo ./scripts/init_user.sh <username>

Installs system dependencies, creates the user (password, sudo access). The user account is created with bash as the default shell. It is not tied to any tooling - deploy per-user configuration separately, e.g.:

sudo TARGET_USER=<username> ./scripts/init_zsh.sh
sudo TARGET_USER=<username> ./scripts/init_go.sh

Adding a New Module

  1. Put configuration files in modules/<name>/.
  2. Write the deployment logic in scripts/init_<name>.sh (must run as root, deploy for $TARGET_USER).
  3. ./install.sh picks it up automatically.

Notes

  • All scripts require root (sudo); none of them prompt for a password to elevate mid-run.
  • The target user defaults to $SUDO_USER (the user who ran sudo).
  • ~/.zshrc and ~/.p10k.zsh are COPIES of the repository files, so the system config has no direct connection to the repo. After editing a file in modules/, re-run the module to sync it; pre-existing files are backed up as *.bak.
  • init_zsh.sh / init_go.sh are idempotent and safe to re-run.
  • Debian-based Linux (Debian/Ubuntu) is required; the scripts use apt-get and related tools. Tested against Ubuntu (amd64/arm64).

About

Personal configuration files and initialization scripts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages