wiki/structured/lang.nix.org
Gabriel Arazas edc686c25c Update wiki on various topics
This update is too large, I made too many notes on stuff. Nonetheless,
it is very nice to see progress. I've made note revisions on the
following topics:

- Learning
- Writing
- Various Linux-related stuff

I've yet to start learning illustration but I'll be starting tomorrow
for an update how do I keep in mind with those writings. There are still
a lot of things to be processed from the backlog with yet more notes on
learning but I keep having those perspectives whenever I practice so
ehhh... Better have those than nothing?

Furthermore, I've also updated the timestamp format. It is pretty simple
to update all of the notes with a couple of `sed` calls.

Aaaand, I've also changed the way how the assets stored with the folders
only leaving it up for the generated files instead of enforcing it on
every note. I create more visual aids and managing them is a pain for
each note. This restructuring frees me of that burden.
2021-07-20 19:52:43 +08:00

41 lines
1.4 KiB
Org Mode

:PROPERTIES:
:ID: a57e63a7-6daa-4639-910d-c6648df156a3
:END:
#+title: Nix language
#+date: "2021-06-30 13:30:19 +08:00"
#+date_modified: "2021-07-19 11:30:52 +08:00"
#+language: en
Nix can be aptly described as JSON but with functions.
While you can make Nix work with basic configurations, you need to know the details if you're creating packages.
You can actively play with the language by running ~nix repl~.
This is just a personal reference note, the recommended resource for learning the language is the beloved [[https://nixos.org/guides/nix-pills/][Nix pills]].
* What is it for?
- most importantly, writing packages
- mostly used for configuring [[https://nixos.org/manual/nixos/stable/][operating systems]] and create servers quickly with its variety of services
- configuring [[id:3b3fdcbf-eb40-4c89-81f3-9d937a0be53c][Nix package manager]]
* Derivations
- [[id:8f23f862-a19a-4a13-8d8f-69c280a8e072][Nix derivations]] are one of the central components of the package manager
- =mkDerivation=
- derivations are more verbose than necessary, most of the packaging process are done with the =nixpkgs= which contains a standard library to easily create derivations with different setups from programming languages and frameworks
* TODO Standard library
- nixpkgs has a standard library that comes with functions mitigating against the verbosity for packaging or simply convenience
* TODO Imports