add regression test for macOS evaluation

This commit is contained in:
Jörg Thalheim
2025-06-29 23:50:17 +02:00
parent 37611d2477
commit 14226d222e
4 changed files with 19 additions and 3 deletions

View File

@@ -67,6 +67,9 @@ in
lib.mapAttrs' ( lib.mapAttrs' (
name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel
) (lib.filterAttrs (n: _: !lib.hasPrefix "test-" n) self.nixosConfigurations) ) (lib.filterAttrs (n: _: !lib.hasPrefix "test-" n) self.nixosConfigurations)
// lib.mapAttrs' (
name: config: lib.nameValuePair "darwin-${name}" config.config.system.build.toplevel
) (self.darwinConfigurations or { })
// lib.mapAttrs' (n: lib.nameValuePair "package-${n}") packagesToBuild // lib.mapAttrs' (n: lib.nameValuePair "package-${n}") packagesToBuild
// lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells // lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells
// lib.mapAttrs' (name: config: lib.nameValuePair "home-manager-${name}" config.activation-script) ( // lib.mapAttrs' (name: config: lib.nameValuePair "home-manager-${name}" config.activation-script) (

View File

@@ -62,6 +62,14 @@
{ {
clan = { clan = {
meta.name = "clan-core"; meta.name = "clan-core";
inventory = {
services = { };
machines = {
"test-darwin-machine" = {
machineClass = "darwin";
};
};
};
}; };
systems = import systems; systems = import systems;
imports = imports =

View File

@@ -51,9 +51,7 @@ let
allMachines = config.clanInternals.inventoryClass.machines; # <- inventory.machines <- clan.machines allMachines = config.clanInternals.inventoryClass.machines; # <- inventory.machines <- clan.machines
machineClasses = lib.mapAttrs ( machineClasses = lib.mapAttrs (name: _: inventory.machines.${name}.machineClass) allMachines;
name: _: inventory.machines.${name}.machineClass
) allMachines;
configurations = lib.mapAttrs ( configurations = lib.mapAttrs (
name: _: name: _:

View File

@@ -0,0 +1,7 @@
{
# Basic system configuration
system.stateVersion = 5;
# Set the nixpkgs system
nixpkgs.hostPlatform = "aarch64-darwin";
}