Nix files

From wikinotes

imports

imports bind all of the let variables defined within a file to a set.

# ./foo.nix

let
  a = "A"
  fn = x: x
# ./bar.nix

foo = import ./foo.nix {};   # foo expects a hash argument, we provide it

foo         # { a="a"; fn=lambda }
foo.a       # returns attribute 'a' 
foo.fn "B"  # invokes method 'fn' with argument "B"