codchi module set

Modify a module of a code machine.

Synopsis

codchi module set -u|--url-y|--dont-prompt -N|--no-build-p|--use-nixpkgs -a|--auth-b|--branch -r|--tag-c|--commit -n|--new-name-m|--module-path -v|--verbose... -q|--quiet... --json -h|--help <MACHINE_NAME> <NAME>

Description

Change the upstream url, switch the git branch, rename the module, edit access information, switch between remote and local repositories or set which nixpkgs to use.

Options

  • -u, --url=URL
    HTTP(S) URL or file path to the repository of the module
  • -y, --dont-prompt
    Dont prompt for confirmation and accept all of Codchis defaults. Usefull for using Codchi in scripts
  • -N, --no-build
    Dont automatically build this machine after this command completes
  • -p, --use-nixpkgs=USE_NIXPKGS
    Whether to use Nixpkgs from the local Codchi installation or the remote URL. See the "Which nixpkgs should I use?" section of codchi init for more details.
    By default Codchi will use remote if defines a nixpkgs input in its flake. Otherwise it will use the local nixpkgs.
    *possible values: *local, remote
  • -a, --auth=AUTH
    Authorisation string for private repositories. Generally, the syntax is <user>:<token> or just <token>.
    GitHub for example has something like ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx whereas GitLab uses oauth2:glpat-xxxxxxxxxxxxxxxxxxxx.
  • -b, --branch=BRANCH
    The git branch to use for the code machine module
  • -r, --tag=TAG
    The git tag to use for the code machine module
  • -c, --commit=COMMIT
    The git commit to use for the code machine module
  • -n, --new-name=NEW_NAME
    The new name of the module => TODO mod rename command
  • -m, --module-path=MODULE_PATH
    The flake path to the NixOS module you whish to use. Currently supported: codchiModules. or nixosModules.
  • -v, --verbose
    Increase logging verbosity
  • -q, --quiet
    Decrease logging verbosity
  • --json
    Produce output in JSON format, suitable for consumption by another program
  • -h, --help
    Print help (see a summary with -h)
  • <MACHINE_NAME>
    Name of the code machine
  • <NAME>
    The name of the module to modify

Examples

Change the branch of :

codchi module set <MACHINE_NAME> <MODULE_NAME> --branch develop

Rename to

codchi module set <MACHINE_NAME> <MODULE_NAME> --new-name <NEW_NAME>

Switch the upstream URL:

codchi module set <MACHINE_NAME> <MODULE_NAME> --url https://github.com/my/new/repo

Switch to a module inside <CODE_MACHINE>

See the EXTRA section of codchi module for more information. Note that the (my-project-name) points to a git repository relative to $HOME inside and has no leading ~ or ./.

codchi module set <MACHINE_NAME> <MODULE_NAME> --url=my-project-name