Skip to content

ELLIOTTCABLE/System

Repository files navigation

ELLIOTTCABLE's system configuration

Notes

Install Homebrew packages, symlink all of this config, etc:

$ xcode-select --install
$ git clone https://github.com/ELLIOTTCABLE/System.git ~/Library/System
$ cd ~/Library/System
$ ./Bootstrap/bootstrap.sh

For Ansible, etc, there's a Python .venv w/ Ansible setup. Use [uv][] to configure it:

$ cd ~/Library/System
$ mise install # installs uv
$ uv sync # installs ansible, etc
$ ansible-galaxy install -r Infrastructure/requirements.yaml
```

----

Run before using home/.gitignore:

    $ git config --global core.excludesfile ~/.gitignore

----

Some Vim plugins require extra setup:

 - Vim's hosts need to be installed. Node's will be installed via `nodenv-default-packages` above,
   but Ruby and Python need to be installed manually for now:

       pip3 install pynvim
       sudo gem install neovim
       # or possibly something with rbenv, if using that

 - My coc.nvim setup will use a few additional linters that need to be installed externally. Some
   are installed via the `nodenv default-packages install` command above; others need to come from
   Homebrew (via `brew bundle` above) etc:

       pip3 install vim-vint

 - CoffeeTags requires the `coffeetags` gem to be installed globally (beware `rvm`!):

        brew gem install coffeetags

 - `tern_for_vim`, supporting JavaScript in SuperTab/Deoplete, requires some setup:

        cd ~/.local/share/nvim/plugged/tern_for_vim
        npm i

 - color_coded requires compilation (and note that it will *fail* if the installed `vim` included
   luajit. I keep forgetting this fact somehow.):

        cd ~/.vim/bundle/color_coded
        (mkdir build; \
           cd build && cmake .. && \
           make && make install; \
           make clean && make clean_clang)

 - Command-T requires compilation; and this must be done against the same version of Ruby that the
   current Vim is compiled against: (Check both MacVim and command-line `vim`!)
   `:ruby puts "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}"`. Re-build both Vims with the same Ruby; and
   then `rvm` (or similar) to that Ruby to build Command-T. (More information is available [in the
   docs.][command-t]

        cd ~/.vim/bundle/command-t/ruby/command-t
        ruby extconf.rb
        make

 - `sparkup` [has to have its vim docs re-generated][sparkup]:

        cd ~/.vim/bundle/sparkup
        make vim-pathogen

   [command-t]: <https://github.com/wincent/Command-T>
   [sparkup]: <https://github.com/rstacruz/sparkup/blob/master/vim/README.txt>

 - IPython-notebook-extensions needs some config to be configured, and I haven't figured out how to
   abstract it out, so I just `.gitignore`'d it:

        cd ~/.jupyter/IPython-notebook-extensions
        ./install.py install

   (This may need to be ‘fixed’ afterwards, restoring the symlinks in `~/.jupyter`. This should be
   enough: `git checkout extensions nbextensions templates`, or similar.)

----

GnuPG (of effin' course) needs a lot of custom setup.

1. First off, Tor is configured in my configuration to requst keys over Tor. This means starting
   tor (which was already installed by the above `brew bundle`):

        brew services start tor

2. As described [here](https://riseup.net/en/security/message-security/openpgp/best-practices), a
   special cronjob is necessary to regularly (and securely) request packages. The script is included
   in `Dotfiles/refresh-keys.sh`, and can be invoked automatically by LaunchD / cron:

        mkdir ~/Library/LaunchAgents
        cp Dotfiles/gnupg/io.ell.gpg-refresh-keys.plist ~/Library/LaunchAgents/
        launchctl load ~/Library/LaunchAgents/io.ell.gpg-refresh-keys.plist

3. Chill out the "unsafe permissions" warning-errors:

        chmod 700 ~/.gnupg

4. The actual private-key has to be retrieved from the smartcard:

        gpg --card-edit
        # type 'fetch' at the gpg/card> prompt

        gpg --with-keygrip -K
        # should show "ssb>" before the private-key lines, to show that they're available on the
        # attached card

----

VScode keeps its config in a MacOS location, not the Linux/XDG location.

    ln -s "$HOME/.config/Code/User/settings.json" \
       ~/Library/Application\ Support/Code/User/settings.json

----

The Terminal preferences (hotkeys etc) require Karabiner and Seil be installed, and that the fonts
from the `Extras/` directory also be installed. *After* all of those are installed, the
configurations can be symlinked from my Dropbox:

    ln -s '~/Documents/Dropbox/Library/karabiner.private.xml' '/Users/ec/Library/Application Support/Karabiner/'
    ln -s '~/Documents/Dropbox/Library/com.apple.Terminal.plist' '~/Library/Preferences/'
    ln -s '~/Documents/Dropbox/Library/GlobalPreferences.plist' \
       '~/Library/Preferences/.GlobalPreferences.plist'

(May require existing files be removed, or directories be created, first.)

----

Windows still needs some work, but here's some hints:

 - Hyper.is works with PowerShell
 - VSCodeVim is less work than *actual* vim, probably. Less of my configuration, though.
 - `New-Item -Path C:\Users\ec\.tridactylrc -ItemType SymbolicLink -Value C:\Users\ec\Documents\GitHub\System\Dotfiles\config\tridactyl\tridactylrc`

----

Okay, got fed up, automated a tiny bit of the Windows setup:

Open an Admin terminal (right-click the Windows logo in the taskbar); then run this
PowerShell script:

```powershell
powershell -ExecutionPolicy Bypass `
   -File C:\Users\ec\System\Bootstrap\bootstrap.ps1
```

About

dotfiles, handy scripts, and new-system configuration stuff

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published