mkdir -p ~/.config
git clone [email protected]:micburks/dotfiles.git ~/.config/nixpkgs
(skip) Good post about setting up an encrypted volume
sudo rm /etc/*.backup-before-nix
sh <(curl -L https://nixos.org/nix/install) --daemon
nix-channel --update nixpkgs
nix-env -u '*'
# nix binary can be found at /nix/var/nix/profiles/default/bin/nix
To recover after system update:
# Manually added this to zsh.nix, so hopefully it's fixed
export PATH=$PATH:/nix/var/nix/profiles/default/bin/
TODO: Remove need for --impure This would significantly decrease build time
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf
# change USERNAME and EMAIL in flake.nix
nix build --no-link ~/.config/nixpkgs#homeConfigurations.$USER.activationPackage --impure
"$(nix path-info ~/.config/nixpkgs#homeConfigurations.$USER.activationPackage --impure)"/activate
home-manager switch --flake ~/.config/nixpkgs#$USER --impure
sudo rm -rf /etc/profile/nix.sh /etc/nix /nix ~/.nix-profile ~/.nix-defexpr ~/.nix-channels