feat: migrated to chezmoi

This commit is contained in:
2026-07-30 04:25:19 +02:00
parent 340b955bc5
commit 73fe6b87a9
160 changed files with 902 additions and 6470 deletions
+54 -36
View File
@@ -1,46 +1,64 @@
# Installation
Clone the repo and execute the `install.sh` script.<br/>
Or use this command:
# Dotfiles (chezmoi)
Dotfiles managed by [chezmoi](https://www.chezmoi.io/). The repo works on
Arch and Ubuntu (not complete) and has three machine classes: **server**, **desktop**, and **laptop**.
## First-time install on a new machine
### 1. Install prerequisites
```bash
bash -c "$(curl -fsSL https://gitea.keuledrive.de/Keule2/Dotfiles/raw/branch/main/install.sh)"
```
Or this command to use arguments:
```bash
curl -fsSL "https://gitea.keuledrive.de/Keule2/Dotfiles/raw/branch/main/install.sh" | bash -s -- -e "system=server"
# Arch
sudo pacman -S git curl age jq chezmoi
# Ubuntu
sudo apt-get install -y git curl age jq
# chezmoi: see https://www.chezmoi.io/install/
```
# Update
Just execute the `install.sh` script again.
### 2. Provision the age key
# Usage
All additional parameters are passed to the ansible playbook. This means that you can skip tags or only execute desired tags.<br/>
Example: Skip alacritty
The age key needs to be placed at `~/.config/chezmoi/key`
With following permissions
```bash
./install.sh --skip-tags alacritty
```
Example: Only execute alacritty and fish
```bash
./install.sh -t alacritty,fish
chmod 600 ~/.config/chezmoi/key
```
# Settings
There are two ways to set settings/values.
1. Create/Edit: `$HOME/.config/dotfiles/values.yml`
2. Edit: `$HOME/.dotfiles/group_vars/all`
### 3. Bootstrap
## Ansible Vault
Vault password file: `$HOME/.config/dotfiles/vault-password.txt`
```bash
chezmoi init --apply git@gitea.keuledrive.de:Keule2/Dotfiles.git
```
## Settings
### System
|Value |Desc |Default|
|------------|-------------------------------------------------------|-------|
|server |Minimal installation (CMD tools) | |
|desktop |Install WM and desktop applications |x |
|desktop_full|Install additional packages for the desktop (e.g. wine)| |
<br/>
Will ask:
# TODO
- AGS: Bar, AppLauncher, PowerMenu, Notifications, Calculator, Emoji-Picker, ...
- Ubuntu/Debian Support
- ...
- **Which system class is this machine?** — pick `server`, `desktop`, or `laptop`.
- **EMAIL** — for git config.
## Usage
| Command | Effect |
|---|---|
| `chezmoi apply` | apply any local changes to dotfiles and run-once scripts |
| `chezmoi update` | `git pull` + `apply` |
| `chezmoi edit <file>` | open a tracked file in `$EDITOR` |
| `chezmoi cd` | shell into the source dir |
| `chezmoi diff` | show pending changes against your home |
| `chezmoi managed` | list files chezmoi manages |
## Changing the system class
Two ways:
```bash
# Option A: re-prompt
chezmoi init --apply --force --prompt
# Option B: edit the cached value
$EDITOR ~/.config/chezmoi/chezmoi.toml # change [data].system
chezmoi apply
```
## TODO
- Check packages e.g. gaming Steam/Lutris