summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--krops.nix16
-rw-r--r--sources.json8
2 files changed, 20 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;
};
diff --git a/sources.json b/sources.json
new file mode 100644
index 00000000..7e0680df
--- /dev/null
+++ b/sources.json
@@ -0,0 +1,8 @@
+{
+ "crate2nix": {
+ "branch": "master",
+ "date": "2026-09-28T07:04:14Z",
+ "rev": "1cb60331b14f15dad145dbd4e207c1ec110e5675",
+ "url": "https://github.com/nix-community/crate2nix"
+ }
+}