From e9f735e0dd96dbbe76872eb4875a2a7349ada68b Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Wed, 5 Nov 2025 13:46:44 +1000 Subject: [PATCH] restructure files --- flake.nix | 33 +++------------------------------ nib/default.nix | 3 +++ nib/sys/default.nix | 27 +++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 nib/default.nix create mode 100644 nib/sys/default.nix diff --git a/flake.nix b/flake.nix index ca5cd41..d099017 100644 --- a/flake.nix +++ b/flake.nix @@ -4,41 +4,14 @@ inputs = { # # Externally extensible flake systems # # REF: https://github.com/nix-systems/nix-systems - systems = { - url = "github:nix-systems/default"; - flake = false; - }; + systems.url = "github:nix-systems/default"; }; outputs = { self, inputs, ... - } @ args: rec { - # REF: https://github.com/nix-systems/nix-systems - archs = { - x86_64 = "x86_64"; - aarch64 = "aarch64"; - riscv64 = "riscv64"; - }; - - osnames = { - linux = "linux"; - darwin = "darwin"; - }; - - systemName = arch: osname: "${arch}-${osname}"; - - systems = let - mkSystem = arch: osname: let x = systemName; in {x = x;}; - in - with archs; - with osnames; { - inherit (mkSystem x86_64 linux); - inherit (mkSystem x86_64 darwin); - inherit (mkSystem aarh64 linux); - inherit (mkSystem aarh64 darwin); - inherit (mkSystem riscv64 linux); - }; + } @ args: { + inherit (import ./nib {}); }; } diff --git a/nib/default.nix b/nib/default.nix new file mode 100644 index 0000000..1a21311 --- /dev/null +++ b/nib/default.nix @@ -0,0 +1,3 @@ +{...}: { + sys = import ./sys {}; +} diff --git a/nib/sys/default.nix b/nib/sys/default.nix new file mode 100644 index 0000000..d525ea0 --- /dev/null +++ b/nib/sys/default.nix @@ -0,0 +1,27 @@ +{...}: rec { + # REF: https://github.com/nix-systems/nix-systems + archs = { + x86_64 = "x86_64"; + aarch64 = "aarch64"; + riscv64 = "riscv64"; + }; + + osnames = { + linux = "linux"; + darwin = "darwin"; + }; + + systemName = arch: osname: "${arch}-${osname}"; + + systems = let + mkSystem = arch: osname: let x = systemName arch osname; in {x = x;}; + in + with archs; + with osnames; { + inherit (mkSystem x86_64 linux); + inherit (mkSystem x86_64 darwin); + inherit (mkSystem aarch64 linux); + inherit (mkSystem aarch64 darwin); + inherit (mkSystem riscv64 linux); + }; +}