8 Oct 2025 |
Niclas Overby Ⓝ | Some another questions :)
Other than populating the src attribute and detecting the nixDir directory, is ./. used for anything else?
Could it potentially be made optional?
| 11:42:45 |
Niclas Overby Ⓝ | * Is there a reason, that the ./. argument is separate from the following attributeset?
Why this:
outputs = inputs:
inputs.flakelight ./. {
inherit inputs;
And not this:
outputs = inputs:
inputs.flakelight {
inherit inputs;
src = ./.;
I guess the first is a little shorter, but are there any other reason?
| 11:43:46 |
accelbread | Redacted or Malformed Event | 15:19:14 |
accelbread | I had attempted that syntax initially but it led to a bunch of infinite recursions | 15:23:32 |
accelbread | also I couldn't make the flake root a default value of src | 15:24:22 |
accelbread | its used for src , nixDir , default package description pulled from flake description, loading default inputs fron your flake.lock, preparing the file tree for flake checks, the formatting check, enabling editorconfig support | 15:31:40 |
| zxfsee joined the room. | 22:31:33 |
9 Oct 2025 |
Niclas Overby Ⓝ | If it is possible, would you change how lib is exposed? | 09:01:30 |
Niclas Overby Ⓝ | Yeah, it only seems to work with nixDir and flakelight.editorconfig disabled:
{
inputs = flakelight.url = "github:accelbread/flakelight";
outputs =
inputs@{
flakelight,
self,
...
}:
flakelight self {
inherit inputs;
nixDir = null;
flakelight.editorconfig = false;
packages.hello = pkgs: pkgs.hello;
};
}
| 11:36:07 |
Niclas Overby Ⓝ | * Yeah, it only seems to work with nixDir and flakelight.editorconfig disabled:
{
inputs.flakelight.url = "github:accelbread/flakelight";
outputs =
inputs@{
flakelight,
self,
...
}:
flakelight self {
inherit inputs;
nixDir = null;
flakelight.editorconfig = false;
packages.hello = pkgs: pkgs.hello;
};
}
| 12:21:26 |
10 Oct 2025 |
accelbread | yea, too easy to make self depend on itself if you use its path | 04:09:47 |
13 Oct 2025 |
accelbread | yeah I don't think applying modifications to lib makes sense. If enabled, then the value of lib would be different when resolving imports vs config | 03:17:22 |
accelbread | I think it'd be confusing to have lib be different values during different parts of evaluation | 03:17:56 |
Niclas Overby Ⓝ | Fair, but it would be nice if Flakelight has a opinionated way to add helper functions, that will be made available everywhere like with packages.
It does not have to be by modifying lib, but I'm not sure what the alternative could be.
| 09:25:49 |