Giter VIP home page Giter VIP logo

dotfiles's People

Contributors

danemacmillan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dotfiles's Issues

Brew git does not install on fresh MacOS

Due to the logic in dpm, it checks if the command exists before installing it, and Apple ships with its own version. A different type of check would need to be run to ensure the Brew version does get installed.

Note that if the version of git from brew does not install, that means the __git_ps1 function is unavailable, which means that the entire PS1 string will not load due to a new condition that checks for it.

Create good fzf + rg integration

I was most of the way there, but having issues following a symlink to ignored directories. For example, the M2 codebase I work on has releases/2020... and then a symlink to one of the dated releases. Ignoring releases works, but then the current symlink cannot search the path.

Examples:

Refactor dotfiles to do less by default

At the moment, dotfiles will install tonnes of things in addition to its files. This has become a problem on production servers that should be as barebones as possible. Often, the dotfiles dependencies will install far more than is needed.

What should it do now?

Dotfiles should only install the bare minimum required utilities that are needed in order for the dotfiles to be useful. Anything beyond that, like installing a language interpreter, compilers, etc, are superfluous. In other words, if not a single dotfile requires that one of those installs are required to function, it should not install by default.

What needs to be changed?

The dpm utility should have categories of installations. By default, without options provided to it, it will install the necessarty utilities for the dotfiles to function. If the machine requires more, pass a flag, like --development, and it will install all the additional developer tools, or --localmachine, and it will install all the extra tools like weechat.

Reconsider Brew vs Nix

Since November 2021, these dotfiles intended to migrate away to Nix for package management.

Numerous changes were made to the relevant feature branch that allowed the dotfiles to work, but they were not merged back to the master branch.

Given time constraints, it may be worthwhile to attempt to merge all the changes that went into the nix branch and attempt to maintain cross-compatibility.

This issue will attempt to consolidate that.

First step:

  • Create PR and review diff between the nix home manager approach, and master.
  • Merge in as much as possible to master. Perhaps interactively rebase all the necessary commits, while allowing the nix branch to exist a while longer.

Notes

Review install notes:

Warning: /opt/homebrew/bin is not in your PATH.
  Instructions on how to configure your shell for Homebrew
  can be found in the 'Next steps' section below.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
    (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/danemacmillan/.profile
    eval "$(/opt/homebrew/bin/brew shellenv)"
- Run brew help to get started
- Further documentation:
    https://docs.brew.sh
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin

bash-completion.d is no longer compatible directory on pre-m1. see update.

fzf paths for keybindings are different

Use short hostname for bash history file name

Bash history is stored in ${XDG_DATA_HOME}/bash/${DOTFILES_HOSTNAME}.${USER}.history. The ${DOTFILES_HOSTNAME} environment variable is assigned using hostname -f. Depending on the network connected to, this domain information can change quite often, so use the short version, hostname -s, which includes only the name of the host. Consider making the change backwards-compatible.

Things lost in new machine

When starting fresh on a new machine, these are things I have lost:

Important

  • MySQL (SequelPro) saved server connections and auths.
  • PhpStorm settings.
  • Firefox bookmarks (sync did not sync them).

Consider using https://github.com/lra/mackup for backing up many of these GUI tools' settings.

Somewhat important

Nice to have

  • Code repositories, though they are all up in Git. It would be nice, though, to have a backup in iCloud (could be bad given the number of small files), so a new machine can just bring it in.
  • Virtual machines (not that bad).
  • Firefox containers (all of the work of designating what domains for what containers).
  • Symlink to Mobile Documents at ~/iCloud
  • Replace native bash version with homebrew version. etc/shells and chsh.
  • Safari Extensions: XDebugToggle.app and Dark Reader for Safari.app
  • stts uptime tool, from App Store.

Everything else is backed up or automated.

#21

Note that to setup xdebug, configs in dotfiles use port 9001, so modify phpstorm to use that. Consider just going back to socket.

Also, xdebug's RC became 3+, so the configuration needs to be changed. See:

Edit Nov 9, 2021:

  • Integrate iCloud Drive technique for quicker uptime. This will ensure compatible calls to ln that are POSIX-compliant (not using -r option). This will also ensure some links like .ssh directory are made properly.
  • Consider replacing whole linking technique with stow at the very end.

Update to support M-series processors

While trying to install the dotfiles on a M1 Mac, there were a few things I had to tinker with. It's a fresh Monterey install on M1 Mac, 2022-10-13:

brew

My own commit was a quick-and-dirty test to make it work on the M1 Mac but the better solution would account for the hardware properly and still work for Intel, so I did not make a PR and instead just use it as reference: silpheel@9d21f5b
To detect M-series or Intel it should be enough to check if uname -m returns arm64 or x86_64 respectively.

Rosetta

We can install Rosetta automatically, which will be handy because something at this stage surely will need it.
sudo softwareupdate --install-rosetta --agree-to-license
As above, this should only be done on arm64

stow

It seems that stow is used as part of the install process but before brew has a chance to install packages. This would work as an update, but not an an initial install.
For my needs, I had brew installed by the time it failed, so I installed the package and restarted the installation process.

A fresh install will not work

For some reason as of now, dpm --install will not work on a fresh install. It suddenly starts working if brew is installed, but of course, that should be part of the install, and not an initial step. This used to work. Look at pre-installation and includes to see if they are calling brew before it's available.

Also, check that __git_ps1 is available before attempting to use it in .bash_prompt.

Ensure that $PATH includes some paths before beginning install

Example:

  • Root user installs dotfiles, which installs tools like tmux and rclone to /usr/local/bin.
  • Regular user then installs dotfiles for first time; their environment variables will be minimal on a new machine, which includes a basic $PATH; this path on CentOS, at least, does not contain /usr/local/bin, which means this user will then compile tmux and rclone again, unnecessarily.

Ensure that the PATH looks in these places for the install script.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.