nix: keep flake inputs after garbage collection

This commit is contained in:
Leonardo Eugênio 2024-02-19 12:45:54 -03:00
parent e7d0121d46
commit 6c534c590f

View file

@ -1,4 +1,11 @@
{ config, pkgs, inputs, ... }: {
{ lib, config, pkgs, inputs, ... }:
let
collectFlakeInputs = input:
[ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { }));
in
{
system.extraDependencies = collectFlakeInputs inputs.self;
nix.registry.nixpkgs.flake = inputs.nixpkgs;
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];