mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
72 lines
1.8 KiB
Nix
72 lines
1.8 KiB
Nix
import ../make-test-python.nix (
|
|
{ pkgs, lib, ... }:
|
|
|
|
{
|
|
name = "lxd-preseed";
|
|
|
|
nodes.machine =
|
|
{ lib, ... }:
|
|
{
|
|
virtualisation = {
|
|
diskSize = 4096;
|
|
|
|
lxc.lxcfs.enable = true;
|
|
lxd.enable = true;
|
|
|
|
lxd.preseed = {
|
|
networks = [
|
|
{
|
|
name = "nixostestbr0";
|
|
type = "bridge";
|
|
config = {
|
|
"ipv4.address" = "10.0.100.1/24";
|
|
"ipv4.nat" = "true";
|
|
};
|
|
}
|
|
];
|
|
profiles = [
|
|
{
|
|
name = "nixostest_default";
|
|
devices = {
|
|
eth0 = {
|
|
name = "eth0";
|
|
network = "nixostestbr0";
|
|
type = "nic";
|
|
};
|
|
root = {
|
|
path = "/";
|
|
pool = "default";
|
|
size = "35GiB";
|
|
type = "disk";
|
|
};
|
|
};
|
|
}
|
|
];
|
|
storage_pools = [
|
|
{
|
|
name = "nixostest_pool";
|
|
driver = "dir";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
def wait_for_preseed(_) -> bool:
|
|
_, output = machine.systemctl("is-active lxd-preseed.service")
|
|
return ("inactive" in output)
|
|
|
|
machine.wait_for_unit("sockets.target")
|
|
machine.wait_for_unit("lxd.service")
|
|
with machine.nested("Waiting for preseed to complete"):
|
|
retry(wait_for_preseed)
|
|
|
|
with subtest("Verify preseed resources created"):
|
|
machine.succeed("lxc profile show nixostest_default")
|
|
machine.succeed("lxc network info nixostestbr0")
|
|
machine.succeed("lxc storage show nixostest_pool")
|
|
'';
|
|
}
|
|
)
|