No description
This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2021-11-03 13:27:04 -05:00
common Move todos out and clarify in readme 2021-11-03 12:52:33 -05:00
host Underp 2021-11-03 12:43:32 -05:00
os/linux Cleanup 2021-11-03 12:01:43 -05:00
.editorconfig Fix some things 2019-11-17 09:06:44 -06:00
.gitignore Add color scheme 2021-07-05 23:06:31 -05:00
readme.md Add note on layers 2021-11-03 13:27:04 -05:00
todo.md Move todos out and clarify in readme 2021-11-03 12:52:33 -05:00

lytedev's dotfiles

My various configuration files. I can't recommend using them directly, just take what you like.

🖥️ Upstream🐙 GitHub Mirror

Battlestation Desktop Screenshot

Repo Structure

My dotfiles are composed together by layering "environments" since I want my dotfiles to be flexible across servers, laptops, desktops, and even my phone (via Termux).

lytedev-dotfiles
|- common --- common to all hosts and operating systems
| |- bin ------- programs or scripts useful to all hosts/OSs
| |- data ------ shared storage for certain scripts
| `- {app...} -- configuration related to {app}
|- host ----- specific to specific hosts or types of hosts
| |- desktop --- for desktop-class machines
| |- headless -- for server-class machines with no display/GUI
| `- laptop ---- for portable, battery-having machines
`- os ------- specific to operating systems
  |- linux ----- you alread know <3
  |  |- desktop ------ for desktop-class machines
  |  |- headless ----- for server-class machines with no display/GUI
  |  |- bin ---------- programs/scripts useful to linux machines
  |  |- {distro...} -- configuration related to {distro}
  |  `- {app...} ----- linux-specific configuration related to {app}
  `- macos ----- for those stupid macbooks work tries to make you use

Any environment should be able to extend the configuration of any application in some unique way. This isn't possible with all applications, of course, since some programs do not make it easy (or possible) to include multiple configuration files or to extend a single file by having it include others via globs or some other mechanism.

One example of doing this well is with fish:

for s in $ENV_PATH/*/config.d.fish; source $s (dirname $s); end

This way, if any environment (a dir in $ENV_PATH) has a config.f.fish script inside, it will be sourced by the main configuration file.

Likewise, some setup only happens in certain environments via the dotfiles-setup.d.fish script.

One important note on environments is that even though they are laid out like a tree (directories), you do NOT automatically get the parent-environment's configuration, so if you are setting up a Arch Linux desktop machine, you cannot only link the os/linux/arch and host/desktop environments but will also need to include os/linux if you want the Linux-generic configuration.

Basic Setup

curl -Ss https://lyte.dev/df.sh | sh

I don't like curl ... | sh

Clone the repo:

git clone https://git.lyte.dev/lytedev/dotfiles.git "$HOME/.config/lytedev-dotfiles"

Inspect and run the common (no macOS- or Linux-specific configuration) setup fish script:

$EDITOR "$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup"
"$HOME/.config/lytedev-dotfiles/common/bin/dotfiles-setup"

Post-Setup

You will want to symlink relevant environment layers into the $ENV_PATH in order to have your OS-specific applications be configured and common applications configured for the host OS.

There's a handy fzf-based script that makes this super easy (note that you can select multiple environments with TAB):

dotfiles-link-environments

You can also list the possible environments:

cat $DOTFILES_PATH/common/envs

And then link them yourself (note that environments must be in $ENV_PATH and cannot be nested, so replacing slashes with dashes is a nice way to show what's going on):

ln -s (pwd)/os/linux $ENV_PATH/os-linux
ln -s (pwd)/os/linux/arch $ENV_PATH/os-linux-arch
ln -s (pwd)/host/laptop $ENV_PATH/host-laptop
ln -s (pwd)/host/laptop/third $ENV_PATH/os-laptop-third
# etc...

And run setup again once you've finished linking all related environments:

dotfiles-setup