- Run
sudo nixos-rebuild switch --flake .#hostname
to apply your system configuration.- If you're still on a live installation medium, run
nixos-install --flake .#hostname
instead, and reboot.
- If you're still on a live installation medium, run
- Run
darwin-rebuild switch --flake .#username@hostname
to apply your home configuration.- If you don't have nix-darwin installed, try
nix build .#darwinConfigurations.hostname.system
or see here for installation.
- If you don't have nix-darwin installed, try
- Run
home-manager switch --flake .#username@hostname
to apply your home configuration.-
If you don't have home-manager installed, try
nix shell nixpkgs#home-manager
. -
When using for the first time, if the above does not work, try activating it directly:
nix build --no-link .#homeConfigurations.username@hostname.activationPackage "$(nix path-info .#homeConfigurations.username@hostname.activationPackage)"/activate
-
And that's it, really! You're ready to have fun with your configurations using the latest and greatest nix3 flake-enabled command UX.
github:misterio77/nix-starter-configs
github:sherubthakur/dotfiles
github:hlissner/dotfiles
github:dustinlyons/nixos-config
github:tars0x9752/home
github:Misterio77/nix-config
github:nix-community/todomvc-nix
This is a bug being tracked in NixOS/nix#7273. It appears when you have nix.settings.auto-optimise-store = true
in your darwinSystem
(or the equivalent option in /etc/nix/nix.conf
). Disable it to get rid of this behavior.
If you don't want to disable this option, you can always retry the builds until they succeed (and possibly also performing garbage collection in between). Use until <switch_command>; do sleep 1; done
and go get a coffee.
Usually accompanied by the message "An update is ready to install. Visual Studio Code is trying to add a new helper tool".
This is usually caused due to VSCod{e,ium} residing in a different path than /Applications
. To fix, according to microsoft/vscode#7426 (comment):
sudo chown $USER ~/Library/Caches/com.vscodium.ShipIt/* # or com.microsoft.VSCode.ShipIt/*
xattr -dr com.apple.quarantine ~/Applications/Home\ Manager\ Apps/VSCodium.app # Or Visual\ Studio\ Code.app