@@ -10,23 +10,31 @@ This is a Nix-based dotfiles repository using Flakes for managing system configu
1010
1111## Essential Commands
1212
13- All system management is done through the ` hey ` command (located in ` bin/hey ` ), which wraps a justfile :
13+ System management can be done through the ` hey ` command (located in ` bin/hey ` ) or directly with darwin-rebuild :
1414
1515``` bash
16+ # Using hey wrapper (if available):
1617hey rebuild # Rebuild and switch to new configuration (alias: hey re)
1718hey upgrade # Update flake inputs and rebuild
1819hey rollback # Roll back to previous generation
1920hey gc # Run garbage collection
2021hey check # Run flake checks
2122hey show # Show flake outputs
2223hey test # Quick rebuild without adding to bootloader
24+
25+ # Direct darwin-rebuild commands:
26+ sudo darwin-rebuild switch -I darwin=. # Rebuild and switch to new configuration
27+ sudo darwin-rebuild switch --flake . # Alternative flake syntax
28+ darwin-rebuild --list-generations # List available generations
29+ sudo darwin-rebuild --rollback # Roll back to previous generation
30+ nix-collect-garbage -d # Garbage collection
2331```
2432
2533For development:
2634``` bash
27- hey shell < package> # Start nix shell with package
28- hey repl # Start nix repl with flake
29- hey search < term> # Search for packages
35+ hey shell < package> # Start nix shell with package (or: nix shell nixpkgs#<package>)
36+ hey repl # Start nix repl with flake (or: nix repl)
37+ hey search < term> # Search for packages (or: nix search nixpkgs <term>)
3038```
3139
3240## Architecture
7684
7785### Testing Configuration Changes
78861 . Make changes to relevant files
79- 2 . Run ` hey test ` for quick testing (doesn't update boot)
80- 3 . Run ` hey rebuild ` to apply permanently
81- 4 . If issues occur: ` hey rollback `
87+ 2 . Run ` sudo darwin-rebuild switch -I darwin=. ` to rebuild and switch
88+ 3 . If issues occur: ` sudo darwin-rebuild --rollback `
8289
8390### Updating Dependencies
8491``` bash
85- hey upgrade # Update all flake inputs
86- nix flake update # Update specific input
92+ nix flake update # Update all flake inputs
93+ nix flake update < input> # Update specific input
94+ sudo darwin-rebuild switch -I darwin=. # Apply updates
8795```
8896
8997### Adding New Packages
@@ -108,7 +116,8 @@ nix flake update # Update specific input
108116
109117## Notes
110118
111- - The ` hey ` command must be run from the repository root
112- - After major updates, run ` hey gc ` to clean old generations
119+ - Commands must be run from the repository root
120+ - After major updates, run ` nix-collect-garbage -d ` to clean old generations
113121- Host-specific settings override module defaults
114- - The system uses home-manager for user-level configuration
122+ - The system uses home-manager for user-level configuration
123+ - The ` hey ` command (if available) provides convenient wrappers for common operations
0 commit comments