lib: init, add timeTravel
This commit is contained in:
parent
600756b494
commit
a5c945b247
3 changed files with 24 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
|||
./modules/part.nix
|
||||
./packages/part.nix
|
||||
./jobs/part.nix
|
||||
./lib/part.nix
|
||||
];
|
||||
};
|
||||
|
||||
|
|
5
lib/part.nix
Normal file
5
lib/part.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./time-travel.nix
|
||||
];
|
||||
}
|
18
lib/time-travel.nix
Normal file
18
lib/time-travel.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue