Skip to content

Commit a2407b0

Browse files
committed
Switch to a yaml based install
Remove unneeded function
1 parent 75f845f commit a2407b0

File tree

13 files changed

+712
-675
lines changed

13 files changed

+712
-675
lines changed

README.md

Lines changed: 65 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,141 +1,104 @@
1-
# 🚀 Dotfiles
1+
# Dotfiles
22

3-
A comprehensive collection of configuration files for a modern development environment, featuring a highly customized LazyVim setup, zsh configuration, and automated installation scripts.
3+
A curated set of dotfiles and scripts to bootstrap a comfortable, modern dev environment. It includes shell configuration (zsh), a Lua-based Neovim setup, and a small set of helper scripts to install prerequisites and symlink everything into place.
44

5-
## ✨ What's Included
6-
7-
### Core Configurations
8-
- **Neovim**: Heavily customized LazyVim configuration with enhanced keybindings and additional plugins
9-
- **Zsh**: Modern shell setup using zgenom and oh-my-zsh
10-
- **Git**: Optimized git configuration and aliases
11-
- **Terminal**: Various terminal emulator configurations
5+
---
126

13-
### Key Features
14-
- 📦 **Automated Installation**: One-command setup for new systems
15-
- 🔗 **GNU Stow Integration**: Clean symlink management
16-
- 🎯 **LazyVim Enhancement**: Custom keybindings and plugin configurations
17-
- 🔧 **DevContainer Support**: Includes `nvim-devcontainer-cli` plugin
18-
- 🌟 **Cross-Platform**: Support for multiple operating systems
7+
## What’s inside
198

20-
## 📁 Repository Structure
9+
- **`home/`** — Files intended to live directly under `$HOME` (e.g., shell RCs).
10+
- **`config/`** — Files for `$HOME/.config` (e.g., `nvim/` for the Neovim config written in Lua).
11+
- **`scripts/`** — Helper/installer scripts used during setup.
12+
- **`install.sh`** — One-shot installer that orchestrates the setup.
13+
- Extras:
14+
- `guake.conf` (terminal), `vimium.json` (browser Vim keybinds), `resticprofile.toml`, `sanoid.conf` (backup/snapshots).
2115

22-
```
23-
dotfiles/
24-
├── home/ # Files that go directly in $HOME
25-
├── config/ # Files that go in $HOME/.config
26-
│ └── nvim/ # LazyVim configuration
27-
│ └── lua/user/ # Custom user configurations
28-
├── scripts/ # Installation and utility scripts
29-
│ ├── main.sh # Interactive installation menu
30-
│ └── utils.sh # Shared functions and utilities
31-
├── private/ # Private configurations (not tracked)
32-
└── install.sh # Main installation script
33-
```
16+
> The repository is primarily **Lua** and **Shell**, reflecting the Neovim config plus installer scripts.
3417
35-
## 🚀 Quick Start
18+
---
3619

37-
### Full Installation
20+
## Quick start
3821

39-
Clone the repository and run the installation script:
22+
> **Requirements:** `git` and a POSIX-like environment (Linux/macOS). The installer will try to install anything else it needs (e.g., zsh, Neovim) depending on your system.
4023
4124
```bash
25+
# clone
4226
git clone https://github.com/erichlf/dotfiles.git ~/.dotfiles
4327
cd ~/.dotfiles
44-
./install.sh
45-
```
4628

47-
### Dotfiles Only
48-
49-
If you only want to install the configuration files without additional software:
50-
51-
```bash
52-
./scripts/main.sh
53-
# Select "Create symbolic links" from the menu
29+
# run the installer
30+
./install.sh
5431
```
5532

56-
## ⚙️ Installation Process
57-
58-
The installation system automatically:
59-
60-
1. **Detects your operating system** and selects appropriate installation scripts
61-
2. **Installs required dependencies** based on your system
62-
3. **Creates symbolic links** using GNU Stow for clean file management
63-
4. **Configures shell environment** with zsh and custom themes
64-
65-
### Environment Variables
66-
67-
The installation scripts use these environment variables:
33+
What the installer typically does:
6834

69-
- `DOTFILES_DIR`: Path to the dotfiles repository
70-
- `SYSTEM`: System identifier (auto-detected, used for debugging)
35+
1. Detects your OS/distro.
36+
2. Installs or updates core tools (zsh, neovim, etc.) as needed.
37+
3. Creates symlinks from the repo to your `$HOME` and `$HOME/.config`.
38+
4. Optionally applies terminal/editor/browser extras.
7139

72-
## 🎯 LazyVim Configuration
40+
> Prefer to do things manually? See **Manual linking** below.
7341
74-
The crown jewel of this repository is the highly customized LazyVim configuration located in `config/nvim/`.
75-
76-
### Key Improvements
77-
- **Enhanced Keybindings**: More intuitive and efficient key mappings
78-
- **Additional Plugins**: Including `nvim-devcontainer-cli` for container development
79-
- **Custom User Configurations**: Located in `config/nvim/lua/user/`
80-
- **Modular Structure**: Easy to understand and modify
81-
82-
### Notable Plugins
83-
- DevContainer CLI integration
84-
- Enhanced file navigation
85-
- Improved LSP configurations
86-
- Custom statusline and themes
42+
---
8743

88-
## 🛠️ Customization
44+
## Manual linking (advanced)
8945

90-
### Adding New Configurations
46+
If you’d rather link files yourself:
9147

92-
1. **For $HOME files**: Add to `home/` directory
93-
2. **For $HOME/.config files**: Add to `config/` directory
94-
3. **Run stow**: `stow home config` to create symlinks
48+
1. Copy or symlink anything under `home/` into `$HOME`.
49+
2. Copy or symlink anything under `config/` into `$HOME/.config`.
50+
3. Launch a new shell to pick up zsh config; start `nvim` to let plugins finish bootstrapping.
9551

96-
### Modifying LazyVim
52+
> Tip: If you use GNU Stow, you can mirror `home/` and `config/` into place cleanly (not required by the repo, but convenient).
9753
98-
The most important customization files are in `config/nvim/lua/user/`. The naming convention is self-explanatory:
54+
---
9955

100-
- `keymaps.lua` - Custom keybindings
101-
- `options.lua` - Neovim options
102-
- `plugins/` - Additional plugin configurations
56+
## Updating
10357

104-
## 📋 Requirements
58+
```bash
59+
cd ~/.dotfiles
60+
git pull
61+
# re-run the installer if you want it to reconcile changes
62+
./install.sh
63+
```
10564

106-
- **Git**: For cloning the repository
107-
- **GNU Stow**: For symlink management
108-
- **Zsh**: Modern shell (auto-installed if not present)
109-
- **Neovim**: Recent version for LazyVim compatibility
65+
---
11066

111-
## 🔧 Troubleshooting
67+
## Uninstalling / reverting
11268

113-
### Common Issues
69+
Remove symlinks you created and/or restore your previous dotfiles backup. If you used Stow, `stow -D <package>` will reverse those links. If you used the one-shot installer, re-run it to switch features off, or remove the linked files in `$HOME`/`$HOME/.config` that point into `~/.dotfiles`.
11470

115-
1. **Stow conflicts**: Remove existing dotfiles before running installation
116-
2. **Missing dependencies**: Run `./scripts/main.sh` and select dependency installation
117-
3. **Permission issues**: Ensure you have write access to your home directory
71+
---
11872

119-
### Getting Help
73+
## Repository layout
12074

121-
If you encounter issues:
75+
```
76+
dotfiles/
77+
├─ home/ # items that should live directly in $HOME
78+
├─ config/ # items for $HOME/.config (e.g., nvim/)
79+
├─ scripts/ # installer and helper scripts
80+
├─ install.sh # main entry point for setup
81+
├─ guake.conf # terminal config (optional)
82+
├─ vimium.json # browser keybindings (optional)
83+
├─ resticprofile.toml# restic profiles (optional)
84+
├─ sanoid.conf # zfs-auto-snapshot profiles (optional)
85+
└─ private/ # local-only overrides (not tracked)
86+
```
12287

123-
1. Check the `scripts/utils.sh` for debugging functions
124-
2. Run with `SYSTEM` variable set for additional debugging output
125-
3. Open an issue on GitHub with your system information
88+
(See the repo root for the actual files and directories.)
12689

127-
## 🤝 Contributing
90+
---
12891

129-
Feel free to:
130-
- Report bugs or issues
131-
- Suggest improvements
132-
- Submit pull requests
133-
- Share your own configurations
92+
## FAQ
13493

135-
## 📄 License
94+
**Q: Can I pick and choose?**
95+
Yes. Run `source scripts/utils.sh` and then run the commands you'd like to run.
13696

137-
This project is open source. Feel free to use, modify, and distribute as needed.
97+
**Q: macOS or Linux?**
98+
Both are supported; but currently `install.sh` focuses on android (termux), cachyos, and ubuntu.
13899

139100
---
140101

141-
**Note**: The `private/` directory is intentionally not tracked in git and contains personal configurations that shouldn't be shared publicly.
102+
## License
103+
104+
Open source—see the LICENSE file in the repo.

install.sh

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,46 @@
22

33
set -e
44

5+
DOTFILES_DIR=$(pwd)
6+
source "$DOTFILES_DIR/scripts/base_install.sh"
7+
58
# get the kernel string
69
kernel=$(uname -r)
710
case "$kernel" in
8-
*"android"* )
9-
./scripts/phone.sh
10-
;;
11-
*"azure"* ) # github action
12-
export CI=true
13-
if [[ $DEV_WORKSPACE != "" ]]; then
14-
./scripts/devcontainer.sh
15-
else
16-
./scripts/main.sh
17-
fi
18-
;;
19-
*"generic"* )
20-
if [[ $DEV_WORKSPACE != "" ]]; then
21-
./scripts/devcontainer.sh
22-
else
23-
./scripts/main.sh
24-
fi
25-
;;
26-
*"cachyos"* )
27-
./scripts/nas.sh
28-
;;
29-
*)
30-
if [[ $(uname -o) == "Darwin" ]]; then
31-
./scripts/mac.sh
32-
elif [[ $DEV_WORKSPACE != "" ]]; then
33-
./scripts/devcontainer.sh
34-
else
35-
echo \
36-
"
11+
*"android"*)
12+
base_install "phone"
13+
;;
14+
*"azure"*) # github action
15+
export CI=true
16+
sudo apt-get install -y yq
17+
if [[ $DEV_WORKSPACE != "" ]]; then
18+
base_install "devcontainer"
19+
else
20+
base_install "ubuntu"
21+
fi
22+
;;
23+
*"generic"*)
24+
sudo apt-get install yq
25+
if [[ $DEV_WORKSPACE != "" ]]; then
26+
base_install "devcontainer"
27+
else
28+
base_install "ubuntu"
29+
fi
30+
;;
31+
*"cachyos"*)
32+
sudo pacman -S --needed --noconfirm yq
33+
base_install "nas"
34+
;;
35+
*)
36+
if [[ $DEV_WORKSPACE != "" ]]; then
37+
base_install "devcontainer"
38+
else
39+
echo \
40+
"
3741
Unknown system: $(uname -a)
3842
KTHNXBYE
3943
"
40-
exit 1
41-
fi
42-
;;
44+
exit 1
45+
fi
46+
;;
4347
esac
44-

0 commit comments

Comments
 (0)