depot/lib/time-travel.nix

19 lines
417 B
Nix
Raw Normal View History

2023-08-23 21:42:51 +03:00
{ config, lib, ... }:
let
timeTravel = rev: builtins.getFlake "github:privatevoid-net/depot/${rev}";
in
{
_module.args = { inherit timeTravel; };
perSystem = { system, ... }: {
_module.args.timeTravel' = rev: let
flake = timeTravel rev;
flake' = config.perInput system flake;
in flake' // {
inputs = lib.mapAttrs (_: input: config.perInput system input) flake.inputs;
};
};
}