I'm trying to set a variable to the result of a function defined in an external file.
Within my nixos config I have something like:
let
phpFile = import ./tgsend.nix (pkgs);
in
{
...
}
Where phpFile = import ./tgsend.nix (pkgs); is the new line I added. Calling this function results in an error of:
error: anonymous function at /etc/nixos/tgsend.nix:1:1 called with unexpected argument 'system'
at /etc/nixos/services.nix:8:13: 7| myxmonad = import sources.XMonadLayouts {}; # 8| phpFile = import ./tgsend.nix (pkgs); | ^ 9| in (use '--show-trace' to show detailed location information)
What am I doing wrong?
The contents of tgsend.nix is:
{pkgs}: pkgs.writeText "test.php" "<?php echo 'hello world'; "