Integrate previously external templates into this repository #12

Manually merged
tlater merged 8 commits from tlater/integrated-templates into master 2022-10-05 12:39:33 +01:00
3 changed files with 49 additions and 0 deletions
Showing only changes of commit b88937af54 - Show all commits

View file

@ -64,5 +64,10 @@
]; ];
}; };
}; };
checks.${system} = import ./nix/checks {
inherit self system;
pkgs = nixpkgs.legacyPackages.${system};
};
}; };
} }

9
nix/checks/default.nix Normal file
View file

@ -0,0 +1,9 @@
{
pkgs,
self,
system,
}: let
callPackage = pkgs.lib.callPackageWith (pkgs // {inherit self;});
in {
openHomepage = callPackage ./open-homepage.nix {};
}

View file

@ -0,0 +1,35 @@
{
self,
nixosTest,
}:
nixosTest {
nodes = {
host = {
config,
lib,
pkgs,
...
}: {
imports = [self.nixosModules.default];
services.tlaternet-webserver = {
enable = true;
listen = {
addr = "0.0.0.0";
port = 8000;
};
};
networking.firewall.allowedTCPPorts = [8000];
};
client = {pkgs, ...}: {};
};
testScript = ''
start_all()
host.wait_for_unit("default.target")
client.succeed("curl --fail http://host:8000/ >&2")
'';
}