summaryrefslogtreecommitdiffstats
path: root/krops.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-29 14:12:15 +0000
committertv <tv@krebsco.de>2026-11-29 14:12:15 +0000
commit2288b3aaddb2a8c7cefb0af76fd1f2002f1e1b8b (patch)
treec9221888dafd490f4ada57e7a967f71e7a857e3c /krops.nix
parente03b0348a621e81f15a7644a72862192a0817b62 (diff)
krops.nix: pin crate2nix in sources.json
One file for the pins of the git sources, so a tool can update them. An entry has url, rev and date, and branch if it follows one.
Diffstat (limited to 'krops.nix')
-rw-r--r--krops.nix16
1 files changed, 12 insertions, 4 deletions
diff --git a/krops.nix b/krops.nix
index b06b87ec..003b2908 100644
--- a/krops.nix
+++ b/krops.nix
@@ -53,6 +53,17 @@
assert builtins.elem switch [ "switch" "boot" "test" ];
+let
+ # A source pinned in sources.json, fetched with git.
+ gitSource = source: let
+ entry = (lib.importJSON ./sources.json).${source};
+ in {
+ git = {
+ ref = entry.rev;
+ url = entry.url;
+ };
+ };
+in
rec {
spec = {
@@ -66,10 +77,7 @@ rec {
target = if args.target or null != null then args.target else spec.target;
sources = {
- crate2nix.git = {
- ref = "1cb60331b14f15dad145dbd4e207c1ec110e5675"; # master Mon Sep 28 09:04:14 2026 +0200
- url = "https://github.com/nix-community/crate2nix";
- };
+ crate2nix = gitSource "crate2nix";
hrm.file = {
path = toString ~/sync/src/hrm;
};