feat: unit tests

This commit is contained in:
Ryan Yin
2024-03-13 14:47:36 +08:00
parent be963c0642
commit fff6ad6bff
17 changed files with 142 additions and 59 deletions

View File

@@ -0,0 +1,17 @@
{
lib,
outputs,
}: let
specialExpected = {
"ai-hyprland" = "ai";
"ai-i3" = "ai";
"shoukei-hyprland" = "shoukei";
"shoukei-i3" = "shoukei";
};
specialHostNames = builtins.attrNames specialExpected;
otherHosts = builtins.removeAttrs outputs.nixosConfigurations specialHostNames;
otherHostsNames = builtins.attrNames otherHosts;
# other hosts's hostName is the same as the nixosConfigurations name
otherExpected = lib.genAttrs otherHostsNames (name: name);
in (specialExpected // otherExpected)