diff --git a/base/services/auto-upgrade.nix b/base/services/auto-upgrade.nix index 7bfe0ab..7d515f7 100644 --- a/base/services/auto-upgrade.nix +++ b/base/services/auto-upgrade.nix @@ -12,4 +12,15 @@ "--no-write-lock-file" ]; }; -} \ No newline at end of file + + # workaround for https://github.com/NixOS/nix/issues/6895 + # via https://git.lix.systems/lix-project/lix/issues/400 + environment.etc."current-system-flake-inputs.json".source + = pkgs.writers.writeJSON "flake-inputs.json" ( + lib.flip lib.mapAttrs inputs (name: input: + # inputs.*.sourceInfo sans outPath, since writeJSON will otherwise serialize sourceInfo like a derivation + lib.filterAttrs (key: val: !builtins.elem key ["outPath"]) (input.sourceInfo or {}) + // { store-path = input.outPath; } # comment this line if you don't want to retain a store reference to the flake inputs + ) + ); +}