{ "uuid": [ { "value": "1a1d86f0-93c7-4b10-9db2-e8d745e2553a" } ], "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:54+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": "Docker or Nix?\n" } ], "created": [ { "value": "2023-07-02T00:00:00+00:00" } ], "changed": [ { "value": "2025-04-21T01:21:54+00:00" } ], "promote": [ { "value": false } ], "sticky": [ { "value": false } ], "default_langcode": [ { "value": true } ], "revision_translation_affected": [ { "value": true } ], "path": [ { "alias": "\/daily\/2023\/07\/02\/docker-or-nix", "langcode": null } ], "body": [ { "value": "\n
I've been a Nix user for about a year, starting with its package manager on my previously installed Linux distribution.<\/p>\n\n
I started to use Home Manager for my user configuration and dotfiles and later switched to the NixOS operating system.<\/p>\n\n
I've also been using Nix Flakes for per-project configuration.<\/p>\n\n
A Flake file is a simple file written in the Nix language that defines the project's dependencies and installs them from the Nix package manager.<\/p>\n\n
Here is an example Flake for a PHP CLI application:<\/p>\n\n
{\n\u00a0 inputs.nixpkgs.url = \"github:NixOS\/nixpkgs\/nixos-unstable\";\n\n\u00a0 outputs = inputs@{ flake-parts, ... }:\n\u00a0 \u00a0 flake-parts.lib.mkFlake { inherit inputs; } {\n\u00a0 \u00a0 \u00a0 systems = [ \"x86_64-linux\" ];\n\n\u00a0 \u00a0 \u00a0 perSystem = { config, self', inputs', pkgs, system, ... }: {\n\u00a0 \u00a0 \u00a0 \u00a0 devShells = {\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 default = pkgs.mkShell {\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 buildInputs = with pkgs; [ php82 php82Packages.composer ];\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 };\n\u00a0 \u00a0 \u00a0 \u00a0 };\n\u00a0 \u00a0 \u00a0 };\n\u00a0 \u00a0 };\n}\n<\/code><\/pre>\n\nIt declares that PHP 8.2 and Composer are available, even if I have different versions installed globally.<\/p>\n\n
Will Nix replace Docker?<\/h2>\n\n
Nix and Flakes have replaced Docker for me on some projects.<\/p>\n\n
If I have a simple setup and need a specific version of PHP or Node and some additional programs, I can get those from the Flake.<\/p>\n\n
I don't know if it'll replace Docker for me completely and work on more complex projects, but it's working well for me where I'm using it.<\/p>\n\n ",
"format": "full_html",
"processed": "\n
I've been a Nix user for about a year, starting with its package manager on my previously installed Linux distribution.<\/p>\n\n
I started to use Home Manager for my user configuration and dotfiles and later switched to the NixOS operating system.<\/p>\n\n
Using Nix for software development<\/h2>\n\n
I've also been using Nix Flakes for per-project configuration.<\/p>\n\n
A Flake file is a simple file written in the Nix language that defines the project's dependencies and installs them from the Nix package manager.<\/p>\n\n
Here is an example Flake for a PHP CLI application:<\/p>\n\n
{\n inputs.nixpkgs.url = \"github:NixOS\/nixpkgs\/nixos-unstable\";\n\n outputs = inputs@{ flake-parts, ... }:\n flake-parts.lib.mkFlake { inherit inputs; } {\n systems = [ \"x86_64-linux\" ];\n\n perSystem = { config, self', inputs', pkgs, system, ... }: {\n devShells = {\n default = pkgs.mkShell {\n buildInputs = with pkgs; [ php82 php82Packages.composer ];\n };\n };\n };\n };\n}\n<\/code><\/pre>\n\nIt declares that PHP 8.2 and Composer are available, even if I have different versions installed globally.<\/p>\n\n
Will Nix replace Docker?<\/h2>\n\n
Nix and Flakes have replaced Docker for me on some projects.<\/p>\n\n
If I have a simple setup and need a specific version of PHP or Node and some additional programs, I can get those from the Flake.<\/p>\n\n
I don't know if it'll replace Docker for me completely and work on more complex projects, but it's working well for me where I'm using it.<\/p>\n\n ",
"summary": null
}
],
"feeds_item": [
{
"imported": "2025-04-21T01:21:54+00:00",
"guid": null,
"hash": "7f55d425fa5b0836f5c8d0f6980cc54e",
"target_type": "feeds_feed",
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
}
]
}