diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-12-22 11:50:11 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-12-22 11:50:11 -0400 |
commit | ba371f3a8ac39dc1c58314e894a719192981d831 (patch) | |
tree | 838898a6cd9d8394958b3d87b9e61396070d1718 /device | |
parent | c35823a20ed94b2d6c367dd40057a5255621a50c (diff) |
add device_template_pre and device_template_post
Diffstat (limited to 'device')
-rw-r--r-- | device/device_template_post | 4 | ||||
-rw-r--r-- | device/device_template_pre | 65 |
2 files changed, 69 insertions, 0 deletions
diff --git a/device/device_template_post b/device/device_template_post new file mode 100644 index 0000000..1fc5162 --- /dev/null +++ b/device/device_template_post @@ -0,0 +1,4 @@ +#!/bin/zsh + +# [device friendly name] ([~account_if_applicable]) +# See [device_template_pre] for info. diff --git a/device/device_template_pre b/device/device_template_pre new file mode 100644 index 0000000..22a8f81 --- /dev/null +++ b/device/device_template_pre @@ -0,0 +1,65 @@ +#!/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" |