/DotFiles

Primary LanguageShell

Yuri's OS X Dotfiles

Install Nix and Nix Darwing

Removing

To uninstall:

# Remove the entry from fstab using
sudo vifs


# Get the volume "APFS Volume Disk (Role)"
diskutil apfs list

# Destroy the data volume using
diskutil apfs deleteVolume <role>

# Remove the nix line from synthetic.conf
sudo vim /etc/synthetic.conf

# Search for daemons and unload and remove if any
sudo ls /Library/LaunchDaemons/

# Clear files
sudo rm -rf etc/nix /nix /var/root/.nix-profile /var/root/.nix-defexpr /var/root/.nix-channels
rm -rf ~/.nix-profile ~/.nix-defexpr ~/.nix-channels

Install

Nix Commands

# Update nix channel
nix-channel --update

# Rebuild install stuff
darwin-rebuild switch

# Get sha256 for git url
nix-prefetch-git <url> --rev v0.1.1

# Get sha256 for github url
nix-prefetch-url --unpack <url>

# Delete old generations
nix-env --delete-generations old

# Garbage collect
nix-collect-garbage -d

# After you garbage collect it clear's cache run search to setup things up
nix search -u

# Open nix repl
nix repl
:l <nixpkgs>

# Tets a single derivation
nix-build -E 'with import <nixpkgs> { };  callPackage ./default.nix {}'

Brew

Not everything can be installed with nix

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install
brew bundle install

# Cleanup
brew bundle cleanup

Reference