Files
nix-config-ryan4yin/outputs/x86_64-linux/tests/hostname/expected.nix

15 lines
441 B
Nix

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