Files
nix-config/outputs/x86_64-linux/tests/hostname/expected.nix
2024-09-03 00:06:34 +08:00

16 lines
477 B
Nix

{
lib,
outputs,
}: let
specialExpected = {
"ai-hyprland" = "ai";
"shoukei-hyprland" = "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)