WIP: feat/automated-account-deletion #174

Draft
b12f wants to merge 23 commits from feat/automated-account-deletion into main
3 changed files with 30 additions and 8 deletions
Showing only changes of commit f96b31a8a9 - Show all commits

View file

@ -65,6 +65,7 @@
system,
pkgs,
config,
lib,
...
}:
{
@ -77,6 +78,16 @@
unstable = import inputs.unstable { inherit system; };
master = import inputs.master { inherit system; };
};
packages = let
nixos-lib = import (inputs.nixpkgs + "/nixos/lib") { };
in builtins.listToAttrs (
map (x: {
name = "test-${lib.strings.removeSuffix ".nix" x}";
value = nixos-lib.runTest (import (./tests + "/${x}") { inherit self; inherit pkgs; inherit lib; inherit config; });
}) (builtins.attrNames (builtins.readDir ./tests))
);
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
deploy-rs

View file

@ -6,7 +6,9 @@
...
}:
{
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ ];
nixpkgs.config = lib.mkDefault {
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ ];
};
nix = {
# Use default version alias for nix package

View file

@ -8,17 +8,26 @@
{
name = "website";
nodes.nachtigall-test = self.nixosConfigurations.nachtigall-test;
node.specialArgs = self.outputs.nixosConfigurations.nachtigall._module.specialArgs;
hostPkgs = pkgs;
node.pkgs = pkgs;
node.specialArgs = self.outputs.nixosConfigurations.nachtigall._module.specialArgs;
nodes.nachtigall-test = {
imports = [
self.nixosModules.home-manager
self.nixosModules.core
self.nixosModules.nginx
self.nixosModules.nginx-website
];
};
enableOCR = true;
testScript = ''
machine.wait_for_unit("system.slice")
machine.succeed("ping 127.0.0.1 -c 2")
machine.wait_for_unit("nginx.service")
machine.succeed("curl -H 'Host:pub.solar' http://127.0.0.1/")
nachtigall_test.wait_for_unit("system.slice")
nachtigall_test.succeed("ping 127.0.0.1 -c 2")
nachtigall_test.wait_for_unit("nginx.service")
nachtigall_test.succeed("curl -H 'Host:pub.solar' http://127.0.0.1/")
'';
}