« get me outta code hell

device_template_pre « device - dotfiles - Miscellaneous configuration files of my personal use
about summary refs log tree commit diff
path: root/device/device_template_pre
blob: 68cdae70835c9d8378b303f3e94288c10954d7c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/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_PYTHON_3
export DEVICE_PYTHON_3_INSTALLATION="$HOME/Library/Python/3.9"

export DEVICE_HAS_PYENV
export DEVICE_PYENV_CONFIGURATION="$HOME/.pyenv"

export DEVICE_HAS_SUBLIME_TEXT
export DEVICE_SUBLIME_TEXT_INSTALLATION="/Applications/Sublime Text.app"