diff --git a/docs/getting-started/vm.md b/docs/getting-started/vm.md index 2737255..ae7e260 100644 --- a/docs/getting-started/vm.md +++ b/docs/getting-started/vm.md @@ -4,11 +4,11 @@ This project provides a virtual machine configuration with all cardano services. A virtual machine will be started with the following services, and the following ports forwarded from the host to the VM. -| Service | Port | -| ------------ | ---- | -| cardano-node | 3001 | -| ogmios | 1337 | -| kupo | 1442 | +| Service | Port | +| ------------ | ---------------------------------------------- | +| cardano-node | 3001 | +| ogmios | [http://localhost:1337](http://localhost:1337) | +| kupo | [http://localhost:1442](http://localhost:1442) | You can log in with user `root`. The password is empty. In the virtual machine, `cardano-cli` is available to query the node. diff --git a/templates/cluster/configuration.nix b/templates/cluster/configuration.nix new file mode 100644 index 0000000..5d9cec2 --- /dev/null +++ b/templates/cluster/configuration.nix @@ -0,0 +1,10 @@ +{ + system.stateVersion = "24.11"; + + cardano = { + network = "preview"; + node.enable = true; + ogmios.enable = true; + kupo.enable = true; + }; +} diff --git a/templates/cluster/flake.nix b/templates/cluster/flake.nix index 990b524..2e07361 100644 --- a/templates/cluster/flake.nix +++ b/templates/cluster/flake.nix @@ -16,7 +16,7 @@ system = "x86_64-linux"; modules = [ { networking.hostName = "node1"; } - ./preview.nix + ./configuration.nix cardano-nix.nixosModules.default ]; }; @@ -24,7 +24,7 @@ system = "x86_64-linux"; modules = [ { networking.hostName = "node2"; } - ./preview.nix + ./configuration.nix cardano-nix.nixosModules.default ]; }; @@ -32,7 +32,7 @@ system = "x86_64-linux"; modules = [ { networking.hostName = "node3"; } - ./preview.nix + ./configuration.nix cardano-nix.nixosModules.default ]; }; @@ -57,9 +57,9 @@ name = "cluster"; imports = [ { - nodes.node1 = ./preview.nix; - nodes.node2 = ./preview.nix; - nodes.node3 = ./preview.nix; + nodes.node1 = ./configuration.nix; + nodes.node2 = ./configuration.nix; + nodes.node3 = ./configuration.nix; nodes.status = ./status.nix; nodes.proxy = ./proxy.nix; testScript = _: '' diff --git a/templates/cluster/preview.nix b/templates/cluster/preview.nix deleted file mode 100644 index cbb3f22..0000000 --- a/templates/cluster/preview.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, ... }: -{ - cardano = { - network = "preview"; - node.enable = true; - ogmios.enable = true; - kupo.enable = true; - }; - services.ogmios.host = "0.0.0.0"; - services.kupo.host = "0.0.0.0"; - networking.firewall.allowedTCPPorts = [ - config.services.ogmios.port - config.services.kupo.port - ]; -} diff --git a/templates/default/configuration.nix b/templates/default/configuration.nix index 82af316..e4b8973 100644 --- a/templates/default/configuration.nix +++ b/templates/default/configuration.nix @@ -1,4 +1,6 @@ { + system.stateVersion = "24.11"; + cardano = { network = "preview"; node.enable = true; diff --git a/templates/default/vm.nix b/templates/default/vm.nix index c6cc1fb..81f0c56 100644 --- a/templates/default/vm.nix +++ b/templates/default/vm.nix @@ -1,4 +1,5 @@ { + config, lib, modulesPath, ... @@ -21,6 +22,14 @@ users.users.root.password = ""; services.getty.autologinUser = "root"; + services.ogmios.host = "0.0.0.0"; + services.kupo.host = "0.0.0.0"; + + networking.firewall.allowedTCPPorts = [ + config.services.ogmios.port + config.services.kupo.port + ]; + virtualisation = { cores = 2; memorySize = lib.mkDefault 4096;