mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 10:18:37 +02:00
feat: unit tests
This commit is contained in:
17
outputs/x86_64-linux/tests/hostname/expected.nix
Normal file
17
outputs/x86_64-linux/tests/hostname/expected.nix
Normal 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)
|
||||
Reference in New Issue
Block a user