summaryrefslogtreecommitdiff
path: root/Basic building blocks of Nix.md
diff options
context:
space:
mode:
authorJasper Ras <jaspert.ras@gmail.com>2025-04-26 13:13:58 +0200
committerJasper Ras <jaspert.ras@gmail.com>2025-04-26 13:13:58 +0200
commitf0a7d563a385663513f24aecad92219ecfc83bd8 (patch)
treed3b201241bd8934a63646d26a94c9b2730775ca0 /Basic building blocks of Nix.md
parent80325cced8485df9d87c1b5d9f5d123d85b01336 (diff)
vault backup: 2025-04-26 13:13:58
Diffstat (limited to 'Basic building blocks of Nix.md')
-rw-r--r--Basic building blocks of Nix.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/Basic building blocks of Nix.md b/Basic building blocks of Nix.md
new file mode 100644
index 0000000..17f3ea0
--- /dev/null
+++ b/Basic building blocks of Nix.md
@@ -0,0 +1,21 @@
+---
+tags:
+ - nix
+---
+It's easy to forget the basic building blocks of [[Nix]], because mostly time is spent configuring settings that make it feel like it's just some kind of JSON.
+
+Then, what are those building blocks?
+- Derivations
+- Store derivation (.drv)
+- Store
+- The language
+
+Derivation = Description of how to build a package, specifying its exact inputs. Following this recipe should result in exactly the same package no matter when we run it.
+
+Derivation -> instantiate -> Store derivation. (`nix derivation show`)
+
+
+### Flake
+Armed with this knowledge it should be easier to recognize what a Flake actually is. We can specify inputs that we can use to build stuff which we specify in outputs.
+
+The outputs thus have to be derivations. These can be tested as described in [[A nice way to test flake output]]. \ No newline at end of file