summaryrefslogtreecommitdiff
path: root/Nix flake.md
diff options
context:
space:
mode:
authorJasper Ras <jaspert.ras@gmail.com>2025-04-26 13:14:25 +0200
committerJasper Ras <jaspert.ras@gmail.com>2025-04-26 13:14:25 +0200
commit89688082f4c85cbfcf045e1f85dac5c69285c23e (patch)
tree709be9a6f0c9a802e0487e92e81f4281f4ec345b /Nix flake.md
parentf0a7d563a385663513f24aecad92219ecfc83bd8 (diff)
parent468e33e7926897756acfe0d483633fb36949ebc5 (diff)
vault backup: 2025-04-26 13:14:25
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)