Put your function in a loop until the cycle (pun intended) breaks
gleam
1{
2 inputs = {
3 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4 flakelight.url = "github:nix-community/flakelight";
5 flakelight-treefmt.url = "github:m15a/flakelight-treefmt";
6
7 flakelight.inputs.nixpkgs.follows = "nixpkgs";
8 flakelight-treefmt.inputs.flakelight.follows = "flakelight";
9 };
10 outputs =
11 { flakelight, ... }@inputs:
12 flakelight ./. {
13 inherit inputs;
14
15 imports = with inputs; [
16 flakelight-treefmt.flakelightModules.default
17 ];
18
19 devShell.packages =
20 pkgs: with pkgs; [
21 gleam
22 erlang
23 ];
24
25 treefmtConfig =
26 { ... }:
27 {
28 programs.nixfmt.enable = true;
29 programs.gleam.enable = true;
30 };
31 };
32}