i followed Trivial builders | nixpkgs and added to my configuration.nix:
writeShellScriptBin "test.sh"
''
echo "test"
'';
it returns error error: syntax error, unexpected '"', expecting '.' or '='
.
after advise from matrix i tried adding it to my packages:
environment.systemPackages with pkgs; [
writeShellScriptBin "test.sh"
''
echo "test"
'';
]
this returns
A definition for option `environment.systemPackages."[definition 1-entry 1]"' is not of type `package'. Definition values:
- In `/etc/nixos/packages.nix': <function>