diff --git a/flake.nix b/flake.nix index 6232845..d099017 100644 --- a/flake.nix +++ b/flake.nix @@ -1,10 +1,17 @@ { description = "MyNib - My Nix Library"; + inputs = { + # # Externally extensible flake systems + # # REF: https://github.com/nix-systems/nix-systems + systems.url = "github:nix-systems/default"; + }; + outputs = { self, - systems, + inputs, ... - } @ inputs: - import ./nib {}; + } @ args: { + inherit (import ./nib {}); + }; } diff --git a/nib/sys/default.nix b/nib/sys/default.nix index 060b838..539d403 100644 --- a/nib/sys/default.nix +++ b/nib/sys/default.nix @@ -8,33 +8,35 @@ values); in rec { # REF: https://github.com/nix-systems/nix-systems - archs = listToTrivialAttrs [ + archs = listToTrivialAttrs arch; + arch = [ "x86_64" "aarch64" "riscv64" ]; # REF: https://github.com/nix-systems/nix-systems - platforms = listToTrivialAttrs [ + platforms = listToTrivialAttrs platform; + platform = [ "linux" "darwin" ]; # Nix System Identifier Lists - Default Supported Systems - # systems = systemsDefault; - systems.default = systems.x86_64 // systems.aarch64; + systems = systemsDefault; + systemsDefault = systemsX86_64 // systemsAArch64; # Nix System Identifier Lists - All Potential Systems - systems.all = listsToSystemNames archs platforms; + systemsAll = listsToSystemNames archs platforms; # Nix System Identifier Lists - Platform Specific - systems.linux = listsToSystemNames archs [platforms.linux]; - systems.darwin = listsToSystemNames archs [platforms.darwin]; + systemsLinux = listsToSystemNames archs [platform.linux]; + systemsDarwin = listsToSystemNames archs [platform.darwin]; # Nix System Identifier Lists - Architecture Specific - systems.x86_64 = listsToSystemNames [archs.x86_64] platforms; - systems.aarch64 = listsToSystemNames [archs.aarch64] platforms; - systems.riscv64 = listsToSystemNames [archs.riscv64] platforms; + systemsX86_64 = listsToSystemNames [arch.x86_64] platforms; + systemsAArch64 = listsToSystemNames [arch.aarch64] platforms; + systemsRiscV64 = listsToSystemNames [arch.riscv64] platforms; # === Internal Helper Functions === toSystemName = arch: platform: "${arch}-${platform}";