forked from lix-project/lix
Merge pull request #9631 from cole-h/fixup-check-warnings
Fix warnings when running checks
This commit is contained in:
commit
75e10e42f3
|
@ -144,7 +144,7 @@ in
|
||||||
virtualisation.memorySize = 4096;
|
virtualisation.memorySize = 4096;
|
||||||
nix.settings.substituters = lib.mkForce [ ];
|
nix.settings.substituters = lib.mkForce [ ];
|
||||||
nix.extraOptions = "experimental-features = nix-command flakes";
|
nix.extraOptions = "experimental-features = nix-command flakes";
|
||||||
networking.hosts.${(builtins.head nodes.github.config.networking.interfaces.eth1.ipv4.addresses).address} =
|
networking.hosts.${(builtins.head nodes.github.networking.interfaces.eth1.ipv4.addresses).address} =
|
||||||
[ "channels.nixos.org" "api.github.com" "github.com" ];
|
[ "channels.nixos.org" "api.github.com" "github.com" ];
|
||||||
security.pki.certificateFiles = [ "${cert}/ca.crt" ];
|
security.pki.certificateFiles = [ "${cert}/ca.crt" ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,7 +36,7 @@ in {
|
||||||
server =
|
server =
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{ services.openssh.enable = true;
|
{ services.openssh.enable = true;
|
||||||
services.openssh.permitRootLogin = "yes";
|
services.openssh.settings.PermitRootLogin = "yes";
|
||||||
users.users.root.password = "foobar";
|
users.users.root.password = "foobar";
|
||||||
virtualisation.writableStore = true;
|
virtualisation.writableStore = true;
|
||||||
virtualisation.additionalPaths = [ pkgB pkgC ];
|
virtualisation.additionalPaths = [ pkgB pkgC ];
|
||||||
|
|
|
@ -84,8 +84,8 @@ in
|
||||||
client = { lib, nodes, pkgs, ... }: {
|
client = { lib, nodes, pkgs, ... }: {
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
networking.nameservers = [
|
networking.nameservers = [
|
||||||
(lib.head nodes.http_dns.config.networking.interfaces.eth1.ipv6.addresses).address
|
(lib.head nodes.http_dns.networking.interfaces.eth1.ipv6.addresses).address
|
||||||
(lib.head nodes.http_dns.config.networking.interfaces.eth1.ipv4.addresses).address
|
(lib.head nodes.http_dns.networking.interfaces.eth1.ipv4.addresses).address
|
||||||
];
|
];
|
||||||
networking.interfaces.eth1.ipv6.addresses = [
|
networking.interfaces.eth1.ipv6.addresses = [
|
||||||
{ address = "fd21::10"; prefixLength = 64; }
|
{ address = "fd21::10"; prefixLength = 64; }
|
||||||
|
|
|
@ -81,7 +81,7 @@ in
|
||||||
client.succeed(f"ssh -o StrictHostKeyChecking=no {builder.name} 'echo hello world'")
|
client.succeed(f"ssh -o StrictHostKeyChecking=no {builder.name} 'echo hello world'")
|
||||||
|
|
||||||
# Perform a build
|
# Perform a build
|
||||||
out = client.succeed("nix-build ${expr nodes.client.config 1} 2> build-output")
|
out = client.succeed("nix-build ${expr nodes.client 1} 2> build-output")
|
||||||
|
|
||||||
# Verify that the build was done on the builder
|
# Verify that the build was done on the builder
|
||||||
builder.succeed(f"test -e {out.strip()}")
|
builder.succeed(f"test -e {out.strip()}")
|
||||||
|
|
|
@ -90,22 +90,22 @@ in
|
||||||
|
|
||||||
# Perform a build and check that it was performed on the builder.
|
# Perform a build and check that it was performed on the builder.
|
||||||
out = client.succeed(
|
out = client.succeed(
|
||||||
"nix-build ${expr nodes.client.config 1} 2> build-output",
|
"nix-build ${expr nodes.client 1} 2> build-output",
|
||||||
"grep -q Hello build-output"
|
"grep -q Hello build-output"
|
||||||
)
|
)
|
||||||
builder1.succeed(f"test -e {out}")
|
builder1.succeed(f"test -e {out}")
|
||||||
|
|
||||||
# And a parallel build.
|
# And a parallel build.
|
||||||
paths = client.succeed(r'nix-store -r $(nix-instantiate ${expr nodes.client.config 2})\!out $(nix-instantiate ${expr nodes.client.config 3})\!out')
|
paths = client.succeed(r'nix-store -r $(nix-instantiate ${expr nodes.client 2})\!out $(nix-instantiate ${expr nodes.client 3})\!out')
|
||||||
out1, out2 = paths.split()
|
out1, out2 = paths.split()
|
||||||
builder1.succeed(f"test -e {out1} -o -e {out2}")
|
builder1.succeed(f"test -e {out1} -o -e {out2}")
|
||||||
builder2.succeed(f"test -e {out1} -o -e {out2}")
|
builder2.succeed(f"test -e {out1} -o -e {out2}")
|
||||||
|
|
||||||
# And a failing build.
|
# And a failing build.
|
||||||
client.fail("nix-build ${expr nodes.client.config 5}")
|
client.fail("nix-build ${expr nodes.client 5}")
|
||||||
|
|
||||||
# Test whether the build hook automatically skips unavailable builders.
|
# Test whether the build hook automatically skips unavailable builders.
|
||||||
builder1.block()
|
builder1.block()
|
||||||
client.succeed("nix-build ${expr nodes.client.config 4}")
|
client.succeed("nix-build ${expr nodes.client 4}")
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ in
|
||||||
flake-registry = https://git.sr.ht/~NixOS/flake-registry/blob/master/flake-registry.json
|
flake-registry = https://git.sr.ht/~NixOS/flake-registry/blob/master/flake-registry.json
|
||||||
'';
|
'';
|
||||||
environment.systemPackages = [ pkgs.jq ];
|
environment.systemPackages = [ pkgs.jq ];
|
||||||
networking.hosts.${(builtins.head nodes.sourcehut.config.networking.interfaces.eth1.ipv4.addresses).address} =
|
networking.hosts.${(builtins.head nodes.sourcehut.networking.interfaces.eth1.ipv4.addresses).address} =
|
||||||
[ "git.sr.ht" ];
|
[ "git.sr.ht" ];
|
||||||
security.pki.certificateFiles = [ "${cert}/ca.crt" ];
|
security.pki.certificateFiles = [ "${cert}/ca.crt" ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue