Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.86 KB

File metadata and controls

34 lines (25 loc) · 1.86 KB

Features

Core Functionality

  • Command Line Interface: flakeup provides a robust CLI for managing templates.
    • flakeup i[nit] <template>: flakeup uses the flake specified in the following precedence: --flake > $FLAKEUP_FLAKE > $FLAKE > ~/.nixconfig.
    • flakeup i[init] --flake <FLAKE> <template>: Specify the flake template source via --flake flag.
    • flakeup s[how]: Shows the list of flakeup templates.
  • Reads Custom Flake Outputs: Reads the flakeup custom flake outputs.

init Subcommand

  • Copies files from flake to target directory.
  • When a conflict occurs, follow precedence rules (conflict: "prepend", "append", "overwrite", "ignore", "ask").
  • --dry-run: Only show summary.
  • --no-confirm: Ask to apply template by default. When --no-confirm is passed, automatically apply after summary.
  • -d --conflict-default [prepend|append|overwrite|ignore]: Do not ask on conflicting files without rules/ with "ask" rule, automatically use passed response.
  • flakeup.defaultFlags.<subcommand>: Default flags for each subcommand.

show Subcommand

  • Without argument, show list of template names with description.
  • With argument <template>, show rules for <template>.

Planned Enhancements

  • [/] flakeup output may specify specific arguments per template(ARG1,ARG2,...) with their defaults. These would substitute their values in any file of the template that contains @@ARG1@@,@@ARG2@@,....

  • When arbitrary flags like --ARG1 somevalue are passed, it will override the replacement string for ALL matching substitutes.

  • --no-substitute: Do not ask for parameter values. Do not do substitution entirely.

  • Nix package.

  • Nixpkgs package.

  • Proper error outputs

    • when nix getFlakeOutput fails, pipe stderr so user knows what went wrong