check out the initial bootstrap stuff first.
via multi-user installation from: https://nixos.org/download
sh <(curl -L https://nixos.org/nix/install)
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager && \
nix-channel --update && \
nix-shell '<home-manager>' -A install
home-manager switch -f ~/code/dotfiles/home-manager/(home|work).nix
- after a fresh installation, set up fish:
sudo sh -c 'echo $(which fish) >> /etc/shells' chsh -s $(which fish)
orbctl create nixos $NAME
for ease of life, set it as the default vm:
orbctl default $NAME
ref:
- https://nix-community.github.io/home-manager/index.html#sec-install-standalone
- https://alexpearce.me/2021/07/managing-dotfiles-with-nix/
orb nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager && \
orb nix-channel --update && \
orb nix-shell '<home-manager>' -A install
if you're using orbstack and your dotfiles repo live someone in your homedir, it's probably already mounted in the VM. you only really need this for VMs where you're not mounting host dirs.
mkdir ~/code
nix-shell -p git --run "git clone https://github.com/notnmeyer/dotfiles ~/code/dotfiles"
from the root of the repo,
orb home-manager switch -f /Users/nate/code/dotfiles/home-manager/home.nix
or move the home-manager
directory to ~/.config/
and drop the -f
argument.
- note: apply home-manager first to avoid an issue where installing fish here write a config.fish that home-manager complains about
from the root of the repo,
orb sudo nixos-rebuild switch -I nixos-config=/Users/nate/code/dotfiles/configuration.nix
or move configuration/nix
to /etc/nixos/configuration.nix
and drop the -I
argument.