#!/bin/zsh # [device friendly name] ([~account_if_applicable]) # [device hostname].local # # This is a Fictional Device 4,13 (2009). # Acquired in 2023. # # This is a template file demonstrating the basic structure # and ordering which all files under device/ should follow. # # Each device (potentially specialized to local accounts) # should have two files in this directory: one suffixed # "_pre", one "_post". When actually cloning and setting up # .dotfiles on a new device or user account, these two files # should be symlinked into the home directory as .device_pre # and .device_post respectively. # # device_pre exports a bunch of environment variables; .zshrc # (and other files) make use of these variables to configure # behavior on a per-device or per-account basis, rather than # editing the source files (e.g. .zshrc) on each device and # attempting to use git for some very cursed maintenance. # File-based layouts are Just Easier to Work With (signed, # someone who learned Linux the "Deebian" way, probably). # # device_post is a more generally capable shell script which # runs device-specialized commands once the rest of a shell # has finished initializing (i.e. at the end of .zshrc). # These are so unique that it wouldn't be appropriate to # generalize the behavior so it's available on all devices # (based on environment variables in device_pre) - it's the # place for specific hardware or peripheral configuration # that only ever directly applies to the one device. # # If there are multiple accounts on one device and common # settings or defaults apply across all of them, create a # file shared across the devices, then one for each acocunt, # sourcing from the common file. # # Entries in this file are generally left uncommented for # convenience. In practice, just copy over the relevant # fields and enter device-specific details, following the # order here (generally alphabetical). # # Variables have sensible defaults identifying what they # should point to or specify; you'll likely want to change # these per-device. # If this is an account-specific file, source the common one: # source "$(realpath "$0" | xargs dirname)/device_template_pre" export DEVICE_HAS_GPG export DEVICE_HAS_HOMEBREW export DEVICE_HOMEBREW_INSTALLATION="/opt/homebrew" export DEVICE_HAS_NVM export DEVICE_NVM_INSTALLATION="$HOME/.nvm" export DEVICE_HAS_PYENV export DEVICE_PYENV_CONFIGURATION="$HOME/.pyenv" export DEVICE_HAS_SUBLIME_TEXT export DEVICE_SUBLIME_TEXT_INSTALLATION="/Applications/Sublime Text.app"