Help with a lack of logic #20
Replies: 12 comments
-
|
Looks like you are missing this flake-parts installation step, which enables the |
Beta Was this translation helpful? Give feedback.
-
I enabled them here. |
Beta Was this translation helpful? Give feedback.
-
|
"You are absolutely Right!"(tm) Your flake.nix looks fine, and it should be picking that file of yours and Just a heads-up, in sandbox/default.nix you have flake.modules.nixos = {
hosts.sandbox = {
networking = ...
# existing codeI'm not sure about what you are trying to achieve here, but I am almost sure that should be This is not related to your |
Beta Was this translation helpful? Give feedback.
-
|
My goal is set up a host as a module, like I saw in many configs, and call it through the easy-hosts library or similar way. I want the host machine as a module and import another configuration modules inside it without fall in infinite recursion error. |
Beta Was this translation helpful? Give feedback.
-
|
I'm not familiar with (again, don't trust me, I know nothing of easy-hosts) Assuming # this is a flake-parts module.
{
easyhosts.hosts.sandbox.modules = [
# nixos modules according to the docs, please follow the docs not me.
];
}If you are using plain flake-parts, then {
flake.modules.nixos.sandbox = {
# this is a NixOS module, place configurations like networking... here.
};
# instead of what you have currently:
# flake.modules.nixos.hosts.sandbox =
# In your code, that `hosts` is the name of the nixos module, and `sandbox` is a nixos option
# and that IS an error.
} |
Beta Was this translation helpful? Give feedback.
-
|
were you able to fix the error ? did the docs help / what was causing it ? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
I think the source of the error above is in the /hosts/sandbox/hardware-configuration.nix. If I remove the flake.modules implementation, I get the infinite recursion error. |
Beta Was this translation helpful? Give feedback.
-
|
I'm passing pkgs as a parameter when I need it, but the modules aren't reckonizing. If I remove all my pkgs parameters in a host implementation I don' t have any errors. |
Beta Was this translation helpful? Give feedback.
-
|
Access pkgs like this: |
Beta Was this translation helpful? Give feedback.
-
I already tried it but it didn't work. But I removed the pkgs call in the host definition file and retried your suggestion. And it worked! XD Why do I need to change the pkgs scope this way? Now I will adjust the modules structure to not install specific packages by host like I was doing before. Thank you for the support and the patience. Functional programming isn't my strong spot and my English is not very fluent yet to easily understand the flake-parts concepts. Best regards from Brazil! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I'm trying to migrate my configs to a dendritic pattern, but I'm having some troubles.
The way it is currently, I'm having the error "The option 'flake' does not exist" in the /modules/nixos/hosts/sandbox/default.nix file.
I want to set up the modules calling them without importing the files, like many of you get it, but I didn't find the way yet. I know my modules hasn't a pattern yet.
Help me, please! I'm feeling I'm close to solve this.
The repo's link is here!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions