Skip to content

feat(wrapperModules.hyfetch): init#419

Merged
BirdeeHub merged 1 commit intoBirdeeHub:mainfrom
ricardomaps:add-hyfetch
Apr 11, 2026
Merged

feat(wrapperModules.hyfetch): init#419
BirdeeHub merged 1 commit intoBirdeeHub:mainfrom
ricardomaps:add-hyfetch

Conversation

@ricardomaps
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Owner

@BirdeeHub BirdeeHub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like hyfetch can write to its own config file.

We may want to give an explicit path option that allows them to point it out of the store at first if they wish.

We dont need to allow them to pass raw json file content, they can builtins.fromJSON, json doesnt append well anyway, so just the path is fine

Comment thread wrapperModules/h/hyfetch/module.nix
Comment thread wrapperModules/h/hyfetch/module.nix Outdated
relPath = "${config.binName}-settings.json";
content = builtins.toJSON config.settings;
};
flags."--config-file" = config.constructFiles.generatedConfig.path;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
flags."--config-file" = config.constructFiles.generatedConfig.path;
flags."--config-file" = config.configFile;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed the changes. That's actually pretty cool, but it only works if i pass an absolute path as a string, is that right?

Copy link
Copy Markdown
Owner

@BirdeeHub BirdeeHub Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could

configFile = "~/wherever";

Or if you wanted to take it a bit further:

flags."--config-file" = _: { esc-fn = x: x; };

And then

configFile = "\"$HOME/wherever\"";

But that only works when wrapperImplementation = "nix";, the default, in the other 2 backends, variables either expand at build time or are fully escaped, which would obviously make that not work.

@BirdeeHub BirdeeHub merged commit 4c7a13d into BirdeeHub:main Apr 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants