I’m not a programmer and am very new to NixOS. Please be gentle.
I recently installed this configuration by Frost Phoenix and have fallen in love with it. I’ve adapted it to my needs. It’s the latest unstable version. However, there is one problem I cannot figure out a solution.
I get an error every time I try to add a new nix file or directory, despite adding it to my imports. For instance, say I created and added libinput.nix into my home directory. I would import it through /nixos-config/modules/home/default.nix as follows:
{inputs, username, host, ...}: {
imports =
[(import ./bat.nix)]
++ [(import ./libinput.nix)]
...
++ [(import ./zsh.nix)];
}
I then run this command:
sudo nixos-rebuild switch --flake /home/neo/nixos-config#desktop --option show-trace true --fast
And then get this error:
at /nix/store/rs4fjbnw4qx7ns2hzzrz2iz52va7vs5z-source/lib/modules.nix:349:12:
348| loadModule = args: fallbackFile: fallbackKey: m:
349| if isFunction m then
| ^
350| unifyModuleSyntax fallbackFile fallbackKey (applyModuleArgs fallbackKey m args)
… while calling 'isFunction'
at /nix/store/rs4fjbnw4qx7ns2hzzrz2iz52va7vs5z-source/lib/trivial.nix:991:16:
990| */
991| isFunction = f: builtins.isFunction f ||
| ^
992| (f ? __functor && isFunction (f.__functor f));
error: getting status of '/nix/store/fl33dws0knxzfa8yjn4pg6qhw5l02jn2-source/modules/home/libinput.nix': No such file or directory
Again, it does this with any .nix file I try to create and import. I’ve tried importing it in my desktop config and editing my flake.nix but no luck. The workaround is adding my code to a pre-existing .nix file, but this is far from perfect and only a temporary bandaid. Your help is greatly appreciated!