From 2e9c7a5f3d4df7d218ae61b96844eb851ae5a2c5 Mon Sep 17 00:00:00 2001 From: Jakub Svec <jakubsvec001@gmail.com> Date: Sat, 30 Mar 2024 12:00:17 -0700 Subject: [PATCH 1/4] Update README.md ADD a note about adding '/run/current-system/sw/bin' to path in order to access the 'darwin-rebuild' command if the command is not found --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index cc98aea9..57a93112 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,8 @@ After installing, you can run `darwin-rebuild` to apply changes to your system: darwin-rebuild switch --flake ~/.config/nix-darwin ``` +NOTE: if the 'darwin-rebuild' command is not found, you will need to add a path to your ~/.bashrc or ~/.zshrc file. In the file, add: `export PATH=/run/current-system/sw/bin:$PATH` + #### Using flake inputs Inputs from the flake can also be passed into `darwinSystem`. These inputs are then From 0c5467cf5bc39be74b72ddf974a495a9c6647f70 Mon Sep 17 00:00:00 2001 From: Jakub Svec <jakubsvec001@gmail.com> Date: Tue, 2 Apr 2024 09:27:55 -0700 Subject: [PATCH 2/4] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 57a93112..be3e222a 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Add the following to `flake.nix` in the same folder as `configuration.nix`: nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs@{ self, nix-darwin, nixpkgs }: { +outputs = inputs@{ self, nix-darwin, nixpkgs }: { darwinConfigurations."Johns-MacBook" = nix-darwin.lib.darwinSystem { modules = [ ./configuration.nix ]; }; @@ -132,13 +132,14 @@ nix run nix-darwin -- switch --flake ~/.config/nix-darwin ### Step 3. Using `nix-darwin` -After installing, you can run `darwin-rebuild` to apply changes to your system: +After installing, restarting your computer should make `darwin-rebuild` available in your `PATH` to apply changes to your system: ```bash darwin-rebuild switch --flake ~/.config/nix-darwin ``` -NOTE: if the 'darwin-rebuild' command is not found, you will need to add a path to your ~/.bashrc or ~/.zshrc file. In the file, add: `export PATH=/run/current-system/sw/bin:$PATH` +> NOTE: if the 'darwin-rebuild' command is not found after installation, you will need to add a path to your shell configuration (f.e. the ~/.bashrc or ~/.zshrc file). +> To to so, add: `export PATH=/run/current-system/sw/bin:$PATH` in your shell configuration file. #### Using flake inputs From cb1fe0c1eda953774e2285045613f5ac786a364f Mon Sep 17 00:00:00 2001 From: Jakub Svec <jakubsvec001@gmail.com> Date: Tue, 2 Apr 2024 09:29:13 -0700 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index be3e222a..c3374312 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Add the following to `flake.nix` in the same folder as `configuration.nix`: nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; }; -outputs = inputs@{ self, nix-darwin, nixpkgs }: { + outputs = inputs@{ self, nix-darwin, nixpkgs }: { darwinConfigurations."Johns-MacBook" = nix-darwin.lib.darwinSystem { modules = [ ./configuration.nix ]; }; From edb2f6a1fdf2933c99e92fc3272ead98300095bd Mon Sep 17 00:00:00 2001 From: Jake Wija <jakewija@Jakes-Mac-mini.local> Date: Tue, 2 Apr 2024 11:28:53 -0700 Subject: [PATCH 4/4] Incorporated suggestion from @Enzime, kept the NOTE hinting to add to PATH --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c3374312..063d6089 100644 --- a/README.md +++ b/README.md @@ -132,7 +132,7 @@ nix run nix-darwin -- switch --flake ~/.config/nix-darwin ### Step 3. Using `nix-darwin` -After installing, restarting your computer should make `darwin-rebuild` available in your `PATH` to apply changes to your system: +After installation, restarting your computer will make `darwin-rebuild` available in your `PATH`. After restarting, you can apply changes in your configuration by running: ```bash darwin-rebuild switch --flake ~/.config/nix-darwin