summaryrefslogtreecommitdiff
path: root/Nix flake.md
diff options
context:
space:
mode:
Diffstat (limited to 'Nix flake.md')
-rw-r--r--Nix flake.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/Nix flake.md b/Nix flake.md
new file mode 100644
index 0000000..09b9b09
--- /dev/null
+++ b/Nix flake.md
@@ -0,0 +1,20 @@
+---
+tags:
+ - nix
+---
+Root directory contains flake.nix:
+Specifies inputs (other flakes) and outputs ([[Nix derivations]]). Allows pinning versions of inputs (dependencies) making it easier to write reproducable expressions.
+
+Avoid multiple nixpkgs by including a follows on the input:
+```
+inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/<branch name>";
+ hyprland = {
+ url = "github:hyprwm/Hyprland";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+};
+```
+
+Outputs:
+[Flake check](https://github.com/NixOS/nix/blob/master/src/nix/flake-check.md)