-
Notifications
You must be signed in to change notification settings - Fork 3
/
test_runner_conf.nix
70 lines (59 loc) · 1.97 KB
/
test_runner_conf.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
62
63
64
65
66
67
68
69
70
{ self, config, lib, pkgs, inputs, ... }:
{
imports = [ <nixpkgs/nixos/modules/virtualisation/google-compute-image.nix> ];
networking.networkmanager.enable =
true; # Easiest to use and most distros use this by default.
services.automatic-timezoned.enable = true;
# Use flakes
nix.settings = { experimental-features = [ "nix-command" "flakes" ]; };
environment.systemPackages = [ pkgs.git self ];
virtualisation.docker.enable = true;
systemd.services.setup-env = let
setup = pkgs.writeShellScript "setup" ''
cp -r ${self} /root/env
'';
in {
enable = true;
wantedBy = [ "multi-user.target" ];
serviceConfig = { ExecStart = setup; };
unitConfig = { Type = "oneshot"; };
};
systemd.services.arbbot = {
enable = true;
wantedBy = [ "multi-user.target" ];
after = [ "setup-env.service" ];
serviceConfig = {
ExecStart =
"/run/current-system/sw/bin/nix develop --command python3 ${self}/main.py --base_denom untrn";
WorkingDirectory = "/root/env";
};
};
systemd.services.local-ic = {
enable = true;
wantedBy = [ "multi-user.target" ];
after = [ "arbbot.service" ];
serviceConfig = {
Environment = [
"HOME=/root/"
"PYTHONPATH=src:${self.packages.x86_64-linux.protobuf-client-code}/build/gen"
];
ExecStart =
"/run/current-system/sw/bin/nix run ../#local-ic -- start neutron_osmosis_gaia --api-port 42069";
WorkingDirectory = "/root/env/local-interchaintest";
};
};
systemd.services.local-interchaintest = {
enable = true;
wantedBy = [ "multi-user.target" ];
after = [ "local-ic.service" ];
serviceConfig = {
ExecStartPre = "/run/current-system/sw/bin/sleep 60";
ExecStart =
"/run/current-system/sw/bin/nix run ../#local-interchaintest";
WorkingDirectory = "/root/env/local-interchaintest";
};
};
# Enable the OpenSSH daemon.
services.openssh.enable = true;
system.stateVersion = "23.11";
}