oliverdavies.uk/content/node.162f9233-5734-41ea-b84b-4b7f9bf23ce2.json
2025-05-11 20:02:13 +01:00

100 lines
No EOL
5.6 KiB
JSON

{
"uuid": [
{
"value": "162f9233-5734-41ea-b84b-4b7f9bf23ce2"
}
],
"langcode": [
{
"value": "en"
}
],
"type": [
{
"target_id": "daily_email",
"target_type": "node_type",
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
}
],
"revision_timestamp": [
{
"value": "2025-04-21T01:21:23+00:00"
}
],
"revision_uid": [
{
"target_type": "user",
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
}
],
"revision_log": [],
"status": [
{
"value": true
}
],
"uid": [
{
"target_type": "user",
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
}
],
"title": [
{
"value": "The Nix language"
}
],
"created": [
{
"value": "2024-11-26T00:00:00+00:00"
}
],
"changed": [
{
"value": "2025-04-21T01:21:23+00:00"
}
],
"promote": [
{
"value": false
}
],
"sticky": [
{
"value": false
}
],
"default_langcode": [
{
"value": true
}
],
"revision_translation_affected": [
{
"value": true
}
],
"path": [
{
"alias": "\/daily\/2024\/11\/26\/the-nix-language",
"langcode": null
}
],
"body": [
{
"value": "\n <p>Yesterday, I wrote about <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2024\/11\/25\/nix-the-package-manager\">Nix the package manager<\/a>.<\/p>\n\n<p>To use it, you need to write code in the Nix language in .nix files.<\/p>\n\n<p>To see an example, you can see <a href=\"https:\/\/github.com\/opdavies\/dotfiles\/tree\/main\/nix\">my dotfiles on GitHub<\/a> as well as lots of other people's that they've published.<\/p>\n\n<p>It's a functional language so some of the concepts were new to me, but I picked it up fairly quickly and learned some of the paradigms and conventions.<\/p>\n\n<p>This is the code that installs Nginx on my server:<\/p>\n\n<pre><code class=\"nix\">services.nginx = {\n enable = true;\n serverNamesHashBucketSize = 256;\n};\n<\/code><\/pre>\n\n<p>These are some of the packages I have installed on my laptop:<\/p>\n\n<pre><code class=\"nix\">environment.systemPackages = with pkgs: {\n devenv\n dog\n git\n go\n jq\n php\n phpPackages.composer\n pv\n tldr\n}\n<\/code><\/pre>\n\n<p>And this is how to configure processes <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2024\/11\/11\/could-nix-and-devenv-replace-docker-compose\">in a devenv configuration<\/a>, which is built with Nix:<\/p>\n\n<pre><code class=\"nix\">processes = {\n tailwind.exec = ''\n cd ${drupal.theme.path}\n watchexec --exts css,twig tailwindcss --config assets\/tailwind.config.ts \\\n --output dist\/tailwind.css\n '';\n};\n<\/code><\/pre>\n\n<p>Once you have written the configuration, you can run it and install what you've specified, and it will do it the same way every time.<\/p>\n\n<p>For a crash course in the Nix language, take a look at <a href=\"https:\/\/zero-to-nix.com\/concepts\/nix-language\">https:\/\/zero-to-nix.com\/concepts\/nix-language<\/a> or one of the many open-sourced configurations on GitHub.<\/p>\n\n ",
"format": "full_html",
"processed": "\n <p>Yesterday, I wrote about <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2024\/11\/25\/nix-the-package-manager\">Nix the package manager<\/a>.<\/p>\n\n<p>To use it, you need to write code in the Nix language in .nix files.<\/p>\n\n<p>To see an example, you can see <a href=\"https:\/\/github.com\/opdavies\/dotfiles\/tree\/main\/nix\">my dotfiles on GitHub<\/a> as well as lots of other people's that they've published.<\/p>\n\n<p>It's a functional language so some of the concepts were new to me, but I picked it up fairly quickly and learned some of the paradigms and conventions.<\/p>\n\n<p>This is the code that installs Nginx on my server:<\/p>\n\n<pre><code class=\"nix\">services.nginx = {\n enable = true;\n serverNamesHashBucketSize = 256;\n};\n<\/code><\/pre>\n\n<p>These are some of the packages I have installed on my laptop:<\/p>\n\n<pre><code class=\"nix\">environment.systemPackages = with pkgs: {\n devenv\n dog\n git\n go\n jq\n php\n phpPackages.composer\n pv\n tldr\n}\n<\/code><\/pre>\n\n<p>And this is how to configure processes <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2024\/11\/11\/could-nix-and-devenv-replace-docker-compose\">in a devenv configuration<\/a>, which is built with Nix:<\/p>\n\n<pre><code class=\"nix\">processes = {\n tailwind.exec = ''\n cd ${drupal.theme.path}\n watchexec --exts css,twig tailwindcss --config assets\/tailwind.config.ts \\\n --output dist\/tailwind.css\n '';\n};\n<\/code><\/pre>\n\n<p>Once you have written the configuration, you can run it and install what you've specified, and it will do it the same way every time.<\/p>\n\n<p>For a crash course in the Nix language, take a look at <a href=\"https:\/\/zero-to-nix.com\/concepts\/nix-language\">https:\/\/zero-to-nix.com\/concepts\/nix-language<\/a> or one of the many open-sourced configurations on GitHub.<\/p>\n\n ",
"summary": null
}
],
"feeds_item": [
{
"imported": "2025-04-21T01:21:23+00:00",
"guid": null,
"hash": "7cd6f305207bb1a29052636f877e416e",
"target_type": "feeds_feed",
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
}
]
}