From 6c534c590f5b3373c91a7e5567d3f73e63c76a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 19 Feb 2024 12:45:54 -0300 Subject: [PATCH] nix: keep flake inputs after garbage collection --- system/nix.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/system/nix.nix b/system/nix.nix index 9569e60..aec58cb 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -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}" ];