My daily development environment, running on VMware Workstation | VMware Fusion | MacOS.
Background image source: https://unsplash.com/photos/5Lw1U5BIumE
-
Without flakes(only on linux vm)
-
Follow the manual installation guide
-
Post installation
a. enable vmware-tools
virtualisation.vmware.guest.enable = true;
d. rebuild whole system with
sudo nixos-rebuild --flake "."
e. GUNPG | SSH
-
-
With flakes
Follow the manual installation guide, replace 2.3.5 command with the following
# optional dir creation for store dev.nix repo sudo mkdir -p /etc/build sudo chown -R $(whoami) /etc/build # when running on darwin, install nix, then darwin first. # enter a shell env(with nix flakes installed) nix-shell -p nixFlakes git # clone repo using git git clone https://github.com/beetcb/dev.nix.git /etc/build/ # replace hardware configruation with newly generated one(can be safly ignored on darwin) cp /mnt/etc/nixos/hardware-configuration.nix /etc/build/os/nixos/hardware.nix # finally, install nixos ## linux sudo nixos-install --impure --flake /etc/build ## darwin darwin-rebuild switch --flake /etc/build # ssh stuff ssh-keygen -t ed25519 -C "$($ git config user.email)" cat ~/.ssh/id_ed25519.pub ## time to sync your configs to remote git hosting service like github.com, ## you can clone my repo and reset remote url(to your cloned repo ssh url) to quickly achieve this. git remote set-url origin git@github.com:beetcb/dev.nix.git
Bellow is a list of gotchas I've encountered, record them as a reminder.
-
Defragmenting and shrinking VM disk
- Disable 3D acceleration temporarily, weird bug on vmware workstation.
- Defragmenting and shrinking on guest machine
Update: use unstatble channel for all!
- For system pkgs: nixos latest statble channel
- For user pkgs: mixin of nixos latest unstatble & statble channel