nt/nib/sys/default.nix

41 lines
1.2 KiB
Nix
Raw Normal View History

{nib, ...}:
with nib.types; let
# === Internal Helper Functions ===
toSystemName = arch: platform: "${arch}-${platform}";
listsToSystemNames = archs: platforms:
crossLists (arch: platform: toSystemName arch platform)
[
(builtins.attrValues archs)
(builtins.attrValues platforms)
];
2025-11-05 16:29:40 +10:00
in rec {
2025-11-05 13:46:44 +10:00
# REF: https://github.com/nix-systems/nix-systems
archs = identityAttrsList [
2025-11-05 16:29:40 +10:00
"x86_64"
"aarch64"
"riscv64"
];
# REF: https://github.com/nix-systems/nix-systems
platforms = identityAttrsList [
2025-11-05 16:29:40 +10:00
"linux"
"darwin"
];
# Nix System Identifier Lists - Default Supported Systems
2025-12-13 11:05:18 +10:00
# systems = systemsDefault;
systems.default = systems.x86_64 // systems.aarch64;
2025-11-05 13:46:44 +10:00
2025-11-05 16:29:40 +10:00
# Nix System Identifier Lists - All Potential Systems
2025-12-13 11:05:18 +10:00
systems.all = listsToSystemNames archs platforms;
2025-11-05 13:46:44 +10:00
2025-11-05 16:29:40 +10:00
# Nix System Identifier Lists - Platform Specific
2025-12-13 11:05:18 +10:00
systems.linux = listsToSystemNames archs [platforms.linux];
systems.darwin = listsToSystemNames archs [platforms.darwin];
2025-11-05 13:46:44 +10:00
2025-11-05 16:29:40 +10:00
# Nix System Identifier Lists - Architecture Specific
2025-12-13 11:05:18 +10:00
systems.x86_64 = listsToSystemNames [archs.x86_64] platforms;
systems.aarch64 = listsToSystemNames [archs.aarch64] platforms;
systems.riscv64 = listsToSystemNames [archs.riscv64] platforms;
2025-11-05 13:46:44 +10:00
}