Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ macOS dotfiles managed with Nix flakes, nix-darwin, and home-manager.
3. Clone this repository:

```bash
git clone https://github.com/mfyuu/dotfiles.git ~/dev/dotfiles
git clone https://github.com/mfyuu/dotfiles.git ~/.dotfiles
```

4. Apply the nix-darwin configuration [^2] [^3]:

```bash
# Replace <hostname> with your machine name (M4Pro, M4Air, etc.)
sudo nix run nix-darwin -- switch --flake ~/dev/dotfiles#<hostname>
sudo nix run nix-darwin -- switch --flake ~/.dotfiles#<hostname>
```

5. Reload your shell:
Expand All @@ -44,7 +44,7 @@ macOS dotfiles managed with Nix flakes, nix-darwin, and home-manager.

## Daily Usage

Run these commands from the dotfiles directory (`~/dev/dotfiles`):
Run these commands from the dotfiles directory (`~/.dotfiles`):

```bash
# Update flake.lock (fetch latest nixpkgs, nix-darwin, home-manager)
Expand All @@ -58,7 +58,7 @@ nix run .#build
```

> [!NOTE]
> If running from outside the dotfiles directory, replace `.` with the path to the repository (e.g., `nix run ~/dev/dotfiles#update`).
> If running from outside the dotfiles directory, replace `.` with the path to the repository (e.g., `nix run ~/.dotfiles#update`).

## Benchmark

Expand Down
6 changes: 3 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
pkgs.writeShellScript "flake-update" ''
set -e
echo "Updating flake.lock..."
nix flake update --flake "$HOME/dev/dotfiles"
nix flake update --flake "$HOME/.dotfiles"
echo "Done! Run 'nix run .#switch' to apply changes."
''
);
Expand All @@ -61,7 +61,7 @@
echo "Updating Homebrew..."
/opt/homebrew/bin/brew update
echo "Building and switching to darwin configuration for $HOST_NAME..."
sudo nix run nix-darwin -- switch --flake "$HOME/dev/dotfiles#$HOST_NAME" |& ${pkgs.nix-output-monitor}/bin/nom
sudo nix run nix-darwin -- switch --flake "$HOME/.dotfiles#$HOST_NAME" |& ${pkgs.nix-output-monitor}/bin/nom
echo "Done!"
''
);
Expand All @@ -73,7 +73,7 @@
set -e
HOST_NAME=$(scutil --get LocalHostName)
echo "Building darwin configuration for $HOST_NAME..."
${pkgs.nix-output-monitor}/bin/nom build "$HOME/dev/dotfiles#darwinConfigurations.$HOST_NAME.system"
${pkgs.nix-output-monitor}/bin/nom build "$HOME/.dotfiles#darwinConfigurations.$HOST_NAME.system"
echo "Build successful! Run 'nix run .#switch' to apply."
''
);
Expand Down