2026-02-12 09:20:55 +03:00
|
|
|
# Consumer devenv.nix example
|
|
|
|
|
# Add josh-sync as a flake input in your devenv.yaml or flake.nix,
|
|
|
|
|
# then import the module here.
|
|
|
|
|
#
|
|
|
|
|
# In devenv.yaml:
|
|
|
|
|
# inputs:
|
|
|
|
|
# josh-sync:
|
2026-02-14 21:28:40 +03:00
|
|
|
# url: git+https://your-gitea.example.com/org/josh-sync?ref=refs/tags/v1.2
|
2026-02-12 09:20:55 +03:00
|
|
|
# flake: true
|
|
|
|
|
#
|
|
|
|
|
# Or in flake.nix:
|
|
|
|
|
# inputs.josh-sync = {
|
2026-02-14 21:28:40 +03:00
|
|
|
# url = "git+https://your-gitea.example.com/org/josh-sync?ref=refs/tags/v1.2";
|
2026-02-12 09:20:55 +03:00
|
|
|
# inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
# };
|
|
|
|
|
|
|
|
|
|
{ inputs, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports = [ inputs.josh-sync.devenvModules.default ];
|
|
|
|
|
|
|
|
|
|
# josh-sync CLI is now available in the shell.
|
|
|
|
|
# Commands:
|
2026-02-14 21:28:40 +03:00
|
|
|
# josh-sync sync --forward Forward sync (mono → subrepo)
|
|
|
|
|
# josh-sync sync --reverse Reverse sync (subrepo → mono)
|
|
|
|
|
# josh-sync preflight Validate config and connectivity
|
|
|
|
|
# josh-sync import <target> Initial import from subrepo
|
|
|
|
|
# josh-sync reset <target> Reset subrepo to josh-filtered view
|
|
|
|
|
# josh-sync onboard <target> Interactive import + reset workflow
|
|
|
|
|
# josh-sync migrate-pr <target> Migrate PRs from archived repo
|
|
|
|
|
# josh-sync status Show target config and sync state
|
|
|
|
|
# josh-sync state show <t> [b] Show state JSON
|
|
|
|
|
# josh-sync state reset <t> [b] Reset state
|
2026-02-12 09:20:55 +03:00
|
|
|
|
|
|
|
|
enterShell = ''
|
|
|
|
|
echo "Josh Sync available — run 'josh-sync --help' for commands"
|
|
|
|
|
'';
|
|
|
|
|
}
|