Skip to content

jpetuchovas/dev-env-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

518 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Development Environment Setup

macOS

Install Determinate Nix using nix-installer:

curl -fsSL https://install.determinate.systems/nix | sh -s -- install --determinate --diagnostic-endpoint=""

Install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Bootstrap nix-darwin:

nix build .#darwinConfigurations.$(hostname).system

# Create a symlink from /run to /private/var/run required by nix-darwin. This step is needed since macOS does not allow any software to write to the root directory.
printf 'run\tprivate/var/run\n' | sudo tee -a /etc/synthetic.conf
# If the following command fails, restart the OS to achieve the same thing.
/System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -t

sudo ./result/sw/bin/darwin-rebuild switch --flake .

If the macOS user was not created by nix-darwin and Can't set user shell without giving nix-darwin complete control over my user issue is still not solved, run:

chsh -s /run/current-system/sw/bin/zsh

If infocmp tmux-256color produces an error, run:

ln -s ~/.nix-profile/share/terminfo/74/tmux-256color ~/.terminfo/74/tmux-256color

From now on, changes to the configuration can be applied by running:

make switch

To activate configuration changes such as autohiding the dock, log out and log in again.

Rollback

List home-manager profile versions:

nix profile history

Switch to the previous home-manager profile version:

nix profile rollback

Switch to version 39 of the home-manager profile:

nix profile rollback --to 39

List nix-darwin profile versions:

darwin-rebuild --list-generations
# OR
nix profile history --profile /nix/var/nix/profiles/system

Switch to the previous nix-darwin profile version:

darwin-rebuild switch --rollback

Switch to version 30 of the nix-darwin profile:

darwin-rebuild -G 30

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors