summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-14 04:25:34 +0000
committertv <tv@krebsco.de>2026-11-14 05:43:09 +0100
commit730812efd713989c783d6ec0d699cd2be1f1160b (patch)
tree34b7be4ed518e41bb5842d5a66858e228d871323
parent8fe5b9a7790236be60f6fbb86d1e6dfbb444060b (diff)
krops.nix: read nixpkgs and target from systems/*/spec.nix
-rw-r--r--krops.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/krops.nix b/krops.nix
index 81445ad..6681007 100644
--- a/krops.nix
+++ b/krops.nix
@@ -8,9 +8,14 @@
, pkgs ? import ~/sync/src/krops/pkgs {}
, name
, target ? null
-}: rec {
+}@args: rec {
- target = "root@${name}.r/var/src";
+ spec = {
+ nixpkgs = "nixos-26.05";
+ target = "root@${name}.r/var/src";
+ } // import ./systems/${name}/spec.nix;
+
+ target = if args.target or null != null then args.target else spec.target;
source = lib.evalSource [
{
@@ -21,7 +26,7 @@
target = "hrm/systems/${name}/config.nix";
};
nixpkgs.git = {
- ref = (lib.importJSON ./nixpkgs.json)."nixos-26.05".rev;
+ ref = (lib.importJSON ./nixpkgs.json).${spec.nixpkgs}.rev;
url = "https://github.com/NixOS/nixpkgs";
};
secrets.passage = {