mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 09:28:27 +02:00
feat: remove x86_64-darwin, add new nixos host on macbook pro m2
This commit is contained in:
14
outputs/aarch64-linux/tests/hostname/expected.nix
Normal file
14
outputs/aarch64-linux/tests/hostname/expected.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
lib,
|
||||
outputs,
|
||||
}: let
|
||||
specialExpected = {
|
||||
"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)
|
||||
9
outputs/aarch64-linux/tests/hostname/expr.nix
Normal file
9
outputs/aarch64-linux/tests/hostname/expr.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
outputs,
|
||||
}:
|
||||
lib.genAttrs
|
||||
(builtins.attrNames outputs.nixosConfigurations)
|
||||
(
|
||||
name: outputs.nixosConfigurations.${name}.config.networking.hostName
|
||||
)
|
||||
Reference in New Issue
Block a user