-
Create a directory within the user home directory which will house the configuration files and clone the repository.
cd ~ && mkdir .config && gh repo clone dotfiles ~/.config
-
If the computer being set up is completely fresh
xcode-selectmay need to be installed.xcode-select --install
-
Download and install nix:
sh <(curl -L https://nixos.org/nix/install) -
Edit the files within the configurations so that the configured system architecture matches the actual architecture of the system, the configured system name matches matches the actual system name, and the configured user home directory matches the actual user home directory.
# make sure the following example parameters match the system attributes # in flake.nix darwinConfigurations.<name> = darwin.lib.system { system = "<system_architecture>" ... remaining configuration } # in hosts/<name>.nix nixpkgs.hostPlatform = "<system_architecture>" users.users.<user>.home = "<user_home_dir>" system.primaryUser = "<user>" # in configuration.nix # keep system defaults and GUI apps here
and so on. CLI tools and user programs live in
nix/home.nixwhile GUI apps live innix/configuration.nix. -
Run nix build from the configuraiton directory or the nix subdirectory of the configuration directory.
nix build --stack-trace --extra-experimental-features 'nix-command flakes' .#darwinConfigurations.theo.system
note:
--extra-experimental-featureswill only need to be added once. After the first build, its added tonix.confand is no longer needed as a flag to thenix buildcommand. -
Run
./result/sw/bin/darwin-rebuild switch --flake .from within thenixsubdirectory of the~/.configdirectory. -
Enjoy!
-
Notifications
You must be signed in to change notification settings - Fork 0
theomantz/dotfiles
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
dotfile repository managed by nix
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published