Mentions légales du service

Skip to content
Snippets Groups Projects

[nxc init] now can also use the nix flake templates

Merged QUENTIN Guilloteau requested to merge init_templates into master

Add some cli args to use the templates instead of copying the folders in /examples:

nxc init -t [template]
# or
nxc init --template [template]

ex:

nxc init -t webserver

there is also a flag to either fetch the template locally. by default we fetch the template from the flake on master on gitlab.

to use the local templates:

nxc init -t websever --use-local-templates

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • requested review from @orichard

  • added 1 commit

    • 0f14b1c7 - [nxc init] list available templates

    Compare with previous version

  • can now also list the available templates:

    $ nxc init --list-templates-json --use-local-templates
    {
        "basic": "Minimal example",
        "basic-flake-only": "Basic example with nix dir via flake",
        "basic-nur": "Basic example using a NUR",
        "kernel": "Example with different Linux Kernels",
        "multi-composistions": "A multi-compositions example",
        "spark": "Spark example",
        "webserver": "A nginx example"
    }

    I added a derivation able to generate a json file with the information about the templates. the nxc init command calls nix build to get the json file. this allows us to be able to fetch the templates on the git and also locally

  • actually there might be some issues with the fetching of the git's templates. maybe templates of the git will differ in version compared to the local install of nxc the best thing would be in actually install the flake locally and then call it

    nix registry add nxc git+https://gitlab.inria.fr/nixos-compose/nixos-compose
  • RICHARD Olivier mentioned in commit 8244c07c

    mentioned in commit 8244c07c

Please register or sign in to reply
Loading