The nixos-hardware readme gives an example how to import it using builtins.fetchGit
: nixos-hardware/README.md at 58b52b0dd191af70f538c707c66c682331cfdffc · NixOS/nixos-hardware · GitHub - "${builtins.fetchGit { url = "https://github.com/NixOS/nixos-hardware.git"; }}/lenovo/thinkpad/x220"
If I use pkgs.fetchFromGitHub
instead, I run into an error when executing nixos-rebuild switch
:
error:
… while evaluating the attribute 'config'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: infinite recursion encountered
Who has an idea why I cannot use those interchangeably?