summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSeth Flynn <[email protected]>2025-03-11 16:31:03 -0400
committerSeth Flynn <[email protected]>2025-03-11 17:57:46 -0400
commit336dc00a94e39337c64decd6d0f4f6e4a4d43187 (patch)
tree7e5cb2b56913e398afab4de495bed0401a16493f /README.md
initial commitHEADmain
Diffstat (limited to 'README.md')
-rw-r--r--README.md43
1 files changed, 43 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..d1b8f49
--- /dev/null
+++ b/README.md
@@ -0,0 +1,43 @@
+# cores
+
+> [!WARNING]
+> I made this on a whim in an afternoon. It's not production ready and may never be. Here be dragons! 🐲
+
+Your Nix code, in ~~modules~~ cores!
+
+## What does it do?
+
+`cores` brings the module system from NixOS right into your stable Nix code. This comes with a few big advantages, like:
+
+- No more manual importing of files
+- Improved re-usability of code
+- Self documenting interfaces
+- Less boilerplate
+- A lot of composability!
+
+## Usage
+
+`cores` is best used with tools like [`npins`](https://github.com/andir/npins) and [`niv`](https://github.com/nmattia/niv). In this example, we'll use the former:
+
+```console
+$ npins init
+$ npins add github --branch main getchoo cores
+```
+
+Then create a `default.nix`:
+
+```nix
+let
+ sources = import ./npins;
+in
+
+import sources.cores { inherit sources; } {
+ outputs = {
+ hello = "this is cores!";
+ };
+}
+```
+
+## Why?
+
+As someone who primarily uses Flakes, one of my favorite parts of them for a while has been [flake-parts](https://github.com/hercules-ci/flake-parts). There isn't much of an equivalent in stable Nix for it's functions though, so after a couple [social media](https://hachyderm.io/@jakehamilton/114126394605099447) [posts](https://wetdry.world/@getchoo/114129209075883077) and taking inspiration from [previous work I've done](https://github.com/getchoo/borealis/blob/90c094cb3dfd4a68bd04202695373500394ee5f4/secrets/secrets.nix), I came up with this