Hacking Machine

vscode
macOS Monterey ver 12.5.1
MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
2.3GHz DualCore IntelCore i5
16GB 2133 MHz LPDDR3
Intel Iris Plus Graphics 640 1536MB

Nix

sh <(curl -L https://nixos.org/nix/install)

Quit the terminal once.

nix-shell -p nix-info --run "nix-info -m"

Error

The following error may occur when the very first command is executed.

error: failed to bootstrap /nix If you enabled FileVault after booting, this is likely a known issue
with macOS that you'll have to reboot to fix. If you didn't enable FV,
though, please open an issue describing how the system that you see
this error on was set up.

Solution

  • mac system settings
  • security and privacy
  • Filevault on/off
  • mac reboot

Home-manager

nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --update

nixpkgs

nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update

nix path

export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
nix-shell '<home-manager>' -A install

Gitui

make config file.

mkdir ~/.ssh
cd ~/.ssh
touch config
vim config

write config.

Host github github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/github

make ssh-key.

ssh-keygen -t ecdsa -C "example@gmail.com"
pbcopy < ~/.ssh/github.pub
ssh-add ~/.ssh/github
ssh -T git@github.com

Type "github" in the first question...

pbcopy < ~/.ssh/github.pub
ssh-add ~/.ssh/github
ssh -T git@github.com

Install Repository

Coordinate-Cat/darwin

cd ~/.config
rm -rf nixpkgs
git clone git@github.com:Coordinate-Cat/darwin.git nixpkgs

home-manager switch
source ~/.zshrc