Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Upstream-Name: cardano.nix
Upstream-Contact: <legal@mlabs.city>
Source: https://github.com/mlabs-haskell/cardano.nix

Files: *.lock *.nix *.md *.css docs/mkdocs.yml .envrc .gitignore
Files: *.lock *.nix *.md *.css docs/mkdocs.yml .envrc .gitignore */.gitignore
Copyright: © 2023 MLabs LTD <legal@mlabs.city>
License: Apache-2.0

Files: docs/assets/favicon.png docs/assets/logo.svg
Copyright: © 2023 MLabs LTD <legal@mlabs.city>
License: LicenseRef-MLabs
License: LicenseRef-MLabs
6 changes: 6 additions & 0 deletions docs/getting-started/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ In order to access all the options available in `cardano.nix`, the [NixOS module

### Start new project with flake template

Before starting, follow the [installation instructions](installation.md).

An easy way to get started is to use the [flake template](https://zero-to-nix.com/concepts/flakes#templates) provided by this project. Here's how to start a new project using the template:

```
Expand All @@ -18,6 +20,10 @@ The default template provides a virtual machine configuration starting all the s

`nix run .#vm`

A virtual machine is started, with `cardano-cli` available to query the node:

`cardano-cli query tip --testnet-magic 2`

This machine is set up just like the one in [Run a VM](vm.md), but can be customized.

### Look around
Expand Down
4 changes: 3 additions & 1 deletion docs/render.nix
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ in {
'';
};

packages."${cfg.packageName}-serve" = config.packages.${cfg.packageName}.serve;

devshells.default = {
commands = let
category = "documentation";
Expand All @@ -245,7 +247,7 @@ in {
inherit category;
name = "docs-serve";
help = "serve documentation web page";
command = "nix run .#${cfg.packageName}.serve";
command = "nix run .#${cfg.packageName}-serve";
}
{
inherit category;
Expand Down
1 change: 1 addition & 0 deletions template/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.qcow2
6 changes: 3 additions & 3 deletions template/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
};
outputs = inputs @ {self, ...}: {
nixosConfigurations = {
server-vm = inputs.nixpkgs.lib.nixosSystem {
vm = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
inputs.cardano-nix.nixosModules.default
Expand All @@ -16,9 +16,9 @@
};
};
apps.x86_64-linux = {
server-vm = {
vm = {
type = "app";
program = "${self.nixosConfigurations.server-vm.config.system.build.vm}/bin/run-nixos-vm";
program = "${self.nixosConfigurations.vm.config.system.build.vm}/bin/run-nixos-vm";
};
};
};
Expand Down