Skip to content

Commit

Permalink
Add notes on monorepo dev
Browse files Browse the repository at this point in the history
  • Loading branch information
bryango committed Jul 31, 2024
1 parent ccd031c commit 41c10ac
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
26 changes: 26 additions & 0 deletions doc/monorepo-tips.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Managing monorepos: nixpkgs developments made easy

## sync from upstream

This ensures minimal blob transfers in a sparse checkout:
```bash
# pin the latest hash from the nixpkgs-unstable channel
nix registry pin nixpkgs

# find the "$rev" hash by inspecting the cached registry
nix registry list

# fetch the git "$rev" from the remote
git fetch origin "$rev"

# bump local master to the "$rev"
git switch master
git reset --hard "$rev"

# sync github remote with upstream from the web interface,
# and then fetch the upstream "$rev"
git fetch origin master

# reset the remote master to the channel "$rev"
git push --force
```
1 change: 1 addition & 0 deletions home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ let
trash-cli
git-branchless
dust
bottom
openssh # need to unset SSH_AUTH_SOCK, maybe
# trashy # better, but its zsh completion is broken

Expand Down
2 changes: 1 addition & 1 deletion profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"active": true,
"priority": 5,
"storePaths": [
"/nix/store/lndb6k43xc67r373v22hck5j58w4ln1j-home-manager-path"
"/nix/store/nwbyv3qmvabr8w65v6j7y1cbk752693y-home-manager-path"
]
}
},
Expand Down

0 comments on commit 41c10ac

Please sign in to comment.