-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathtest-nixos-configuration.nix
61 lines (54 loc) · 1.76 KB
/
test-nixos-configuration.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ config, modulesPath, pkgs, cardano-configurations, ogmios, kupo, ... }:
{
imports = [ "${modulesPath}/virtualisation/qemu-vm.nix" ];
virtualisation = {
memorySize = 8192;
diskSize = 100000;
restrictNetwork = false;
forwardPorts = [
# SSH
{ from = "host"; host.port = 2222; guest.port = 22; }
# Ogmios
{ from = "host"; host.port = 1337; guest.port = 1337; }
# Kupo
{ from = "host"; host.port = 1442; guest.port = 1442; }
];
};
# WARNING: root access with empty password for debugging via console and ssh
networking.firewall.enable = false;
services.getty.autologinUser = "root";
services.openssh.enable = true;
services.openssh.permitRootLogin = "yes";
users.extraUsers.root.password = "";
users.mutableUsers = false;
environment.systemPackages = with pkgs; [
lsof
];
# services
services.cardano-node = {
enable = true;
hostAddr = "0.0.0.0";
socketPath = "/var/run/cardano-node/node.socket";
systemdSocketActivation = false;
nodeConfigFile = "${cardano-configurations}/network/preview/cardano-node/config.json";
topology = "${cardano-configurations}/network/preview/cardano-node/topology.json";
};
services.ogmios = {
enable = true;
package = ogmios;
host = "0.0.0.0";
user = "cardano-node";
group = "cardano-node";
nodeSocketPath = "/var/run/cardano-node/node.socket";
nodeConfigPath = "${cardano-configurations}/network/preview/cardano-node/config.json";
};
services.kupo = {
enable = true;
package = kupo;
user = "cardano-node";
group = "cardano-node";
host = "0.0.0.0";
nodeSocketPath = "/var/run/cardano-node/node.socket";
nodeConfigPath = "${cardano-configurations}/network/preview/cardano-node/config.json";
};
}