Working environment defined with Nix and home-manager
Install nix through the nix-installer
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
Or download the nixos image from the nixos.org and create bootable flash
sudo dd bs=4M conv=fsync oflag=direct status=progress if=<path-to-image> of=/dev/sdX
Update package versions in flake.lock
cd ~/dotfiles; nix flake update
Install updated packages
sudo nixos-rebuild switch --flake .#optiplex
Cleanup unused packages from nix store
nix-store --gc