Skip to content

GiyoMoon/nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

.nix

My nix flake config to manage macOS.

โšก๏ธ Installation

โœจ Prerequisites

โž– Install Nix

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

Restart your shell after installing nix to make sure the nix command is available.


โž– Install brew (Will also install Command Line Tools for Xcode)

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

# Disable analytics
/opt/homebrew/bin/brew analytics off

๐Ÿ“ Clone this config

git clone https://github.com/GiyoMoon/nix ~/.nix

๐Ÿ”ฅ Activate config

โž– Enable nix-command and flakes and symlink to the home-manager config directory

mkdir -p ~/.config/nix
cat <<EOF > ~/.config/nix/nix.conf
experimental-features = nix-command flakes
EOF
ln -s ~/.nix ~/.config/home-manager

โž– Activate the config

cd ~/.nix
nix run home-manager -- switch

โž– ๐Ÿšจ Fish needs to be set as the default shell manually

echo /Users/jasi/.nix-profile/bin/fish | sudo tee -a /etc/shells
chsh -s /Users/jasi/.nix-profile/bin/fish

๐Ÿšจ You need to log out and log in again for all changes to take effect. A restart does NOT work properly.

๐ŸŽ‰ Done

That's it! ๐Ÿš€

Things you might want to do:

  • Remove spotlight shortcut in Settings > Keyboard > Shortcuts > Spotlight
  • Remove spotlight from the menu bar in Settings > Control Centre > Menu Bar Only > Spotlight

๐Ÿ” Update config

If you made any changes and want to update, you can run the home manager switch command directly to apply the changes:

nix flake update # optionally update flakes
home-manager switch

About

๐ŸŒบ Nix configs for my Macbook

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published