Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install .dotfiles first time macOS NIXY #158

Open
aspauldingcode opened this issue Dec 1, 2024 · 2 comments
Open

Install .dotfiles first time macOS NIXY #158

aspauldingcode opened this issue Dec 1, 2024 · 2 comments

Comments

@aspauldingcode
Copy link
Owner

aspauldingcode commented Dec 1, 2024

  • Must be user: alex

  • You must set hostname:

sudo scutil --set LocalHostName NIXY
  • You must source zsh:
zsh
  • FIXME: AUTOMATE You must install Rosetta 2 with (before nix-homebrew):
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
  • You must install nix with:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
  • You must source nix with:
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
  • You must sign-in to github and add ssh key:
echo "Visit https://github.com/settings/ssh/new and sign in to your GitHub account."
echo "Opening the GitHub SSH key settings page in your default browser..."

if command -v xdg-open > /dev/null; then
  xdg-open https://github.com/settings/ssh/new
elif command -v open > /dev/null; then
  open https://github.com/settings/ssh/new
else
  echo "Unable to open the browser automatically. Please manually visit:"
  echo "https://github.com/settings/ssh/new"
fi

echo "Checking for existing SSH keys..."
for FILE in ~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pub ~/.ssh/id_rsa ~/.ssh/id_rsa.pub; do
  if [ -f "$FILE" ]; then
    echo "Removing existing key: $FILE"
    rm -f "$FILE"
  fi
done

echo "Generating a new SSH key..."
if ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N ""; then
  KEY_FILE=~/.ssh/id_ed25519.pub
else
  ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -N ""
  KEY_FILE=~/.ssh/id_rsa.pub
fi

if [ -f "$KEY_FILE" ]; then
  echo "Your SSH key has been generated. Copy the following key and paste it into GitHub:"
  cat "$KEY_FILE"
  echo
  echo "After adding the key to GitHub, you can test your connection with:"
  echo "ssh -T [email protected]"
else
  echo "Error: SSH key generation failed."
fi
  • You must clone the dotfiles repo:
nix-shell -p git --command "git clone [email protected]:aspauldingcode/.dotfiles.git ~/.dotfiles/"
  • FIXME: AUTOMATE You must install Xcode tools first (before nix-homebrew):
xcode-select --install
  • You must enable Terminal.app Full Disk Access under Settings > Privacy & Security > Full Disk Access + /Applications/Utilities/Terminal.app:
open "x-apple.systempreferences:com.apple.preference.security?Privacy_AllFiles"
  • Now you may install dotfiles repo:
nix --extra-experimental-features "nix-command flakes" run github:LnL7/nix-darwin -- switch --show-trace --flake github:aspauldingcode/.dotfiles#NIXY
@aspauldingcode
Copy link
Owner Author

First time error:

Warning: Expecting a LaunchDaemons path since the command was ran as root. Got LaunchAgents instead.
launchctl bootstrap is a recommended alternative.
creating service com.example.macforgehelper
Warning: Expecting a LaunchDaemons path since the command was ran as root. Got LaunchAgents instead.
launchctl bootstrap is a recommended alternative.
creating service com.lwouis.alt-tab-macos
Warning: Expecting a LaunchDaemons path since the command was ran as root. Got LaunchAgents instead.
launchctl bootstrap is a recommended alternative.
Load failed: 5: Input/output error
Try running launchctl bootstrap as root for richer errors.
creating service com.user.desktop-cleaner
Warning: Expecting a LaunchDaemons path since the command was ran as root. Got LaunchAgents instead.
launchctl bootstrap is a recommended alternative.
creating service com.user.fix-wm
Warning: Expecting a LaunchDaemons path since the command was ran as root. Got LaunchAgents instead.
launchctl bootstrap is a recommended alternative.
creating service org.flameshot
Warning: Expecting a LaunchDaemons path since the command was ran as root. Got LaunchAgents instead.
launchctl bootstrap is a recommended alternative.
creating service org.freedesktop.dbus-session
Warning: Expecting a LaunchDaemons path since the command was ran as root. Got LaunchAgents instead.
launchctl bootstrap is a recommended alternative.
creating service org.nix-community.home.xdg_cache_home
Warning: Expecting a LaunchDaemons path since the command was ran as root. Got LaunchAgents instead.
launchctl bootstrap is a recommended alternative.

@aspauldingcode
Copy link
Owner Author

aspauldingcode commented Dec 18, 2024

Successful first-time install.

@aspauldingcode aspauldingcode changed the title Install macOS NIXY Install .dotfiles first time macOS NIXY Dec 18, 2024
@aspauldingcode aspauldingcode pinned this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant