Replies: 2 comments 1 reply
|
I don't think you're missing anything. I think this is inherently a challenge of this space, and flakes in general. As you've observed, injecting it from the source via closures works but isn't the most graceful. Realistically you've probably found the best workaround available right now. I think we need to rethink the namespace design and build a more proper registry system and support registry scoped injection values for arguments like self' and inputs'. I'll give that a deep think this week; but if you have ideas please share them! :) |
|
A perhaps related request if a new namespace design is on the table, is to allow sharing of other den-primitives such as quirks, pipes etc.. Once I started using these, sharing aspects (I mainly want to use the namespace imports for splitting up my huge config) has become quite impossible.. |
Uh oh!
There was an error while loading. Please reload this page.
Hi, I'm a new
denuser and I am struggling to use namespaces to share aspects that depend on inputs and local packages.My config is at https://github.com/anders130/dotfiles and I'm trying to share parts of it with a friend.
What I want to do
Include the namespace:
And then consume it.
Problem (
self')One of my aspects (kitty) depends on a wrapped package that lives in my flake:
But the namespace can't resolve
self', because 1. the battery that providesself'is not included in the namespace, and 2. if it is,self'is the consumer's flake and not my dotfiles flake.Workaround
This works but its super ugly.
Problem (
inputs')Some aspects depend on outputs of some of my flake inputs, that I use like this:
This has the same problem as
self'. It depends on the battery that providesinputs'and if included, where the namespace is used, it will again be referencing the consumer's flake inputs, rather than mine.Problem (
inputs)Another aspect (hyprland) depends on inputs that come from my flake.
When consuming the namespace, this will of course also fail, because
inputswill again refer to the consumer's flake and not mine.I guess, that input problem is probably a limitation of the namespaces and i would need to build some wrapper around
flake-filewith aflake-partsmodule.So essentially, I'm asking for a (non-ugly) way to share aspects that depend on inputs and local packages. Maybe I'm missing something, or maybe den can be extended to solve my problem? I'm happy to contribute.
All reactions