{"id":15007254,"url":"https://github.com/tfc/philosophers-stone-nixos","last_synced_at":"2026-02-08T10:32:49.920Z","repository":{"id":43040514,"uuid":"395642592","full_name":"tfc/philosophers-stone-nixos","owner":"tfc","description":"NixOS example system composition and offline build material for live demo sessions","archived":false,"fork":false,"pushed_at":"2025-05-02T15:18:32.000Z","size":2973,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-26T07:44:54.983Z","etag":null,"topics":["build","integration-testing","integrity","linux-distribution","reproducibility"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tfc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-13T12:14:12.000Z","updated_at":"2024-09-27T06:41:41.000Z","dependencies_parsed_at":"2024-11-17T21:48:27.121Z","dependency_job_id":"016b7b44-66ca-4562-8b71-6f667dea179c","html_url":"https://github.com/tfc/philosophers-stone-nixos","commit_stats":{"total_commits":50,"total_committers":3,"mean_commits":"16.666666666666668","dds":"0.45999999999999996","last_synced_commit":"df072aff21b08fa008227522d2e4697a8dbd63fd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tfc/philosophers-stone-nixos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfc%2Fphilosophers-stone-nixos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfc%2Fphilosophers-stone-nixos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfc%2Fphilosophers-stone-nixos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfc%2Fphilosophers-stone-nixos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tfc","download_url":"https://codeload.github.com/tfc/philosophers-stone-nixos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfc%2Fphilosophers-stone-nixos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29227739,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T09:43:19.170Z","status":"ssl_error","status_checked_at":"2026-02-08T09:42:55.556Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","integration-testing","integrity","linux-distribution","reproducibility"],"created_at":"2024-09-24T19:06:54.513Z","updated_at":"2026-02-08T10:32:49.905Z","avatar_url":"https://github.com/tfc.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Philosopher's Stone\n\nWhat is the philosopher's stone?\nCiting [Wikipedia](https://en.wikipedia.org/wiki/Philosopher%27s_stone):\n\n\u003e The philosopher's stone, more properly philosophers' stone or stone of the\n\u003e philosophers, is a mythical alchemical substance capable of turning base\n\u003e metals such as mercury into gold or silver.\n\nThis is very similar to what we do when we transform source code to releasable\nimages for our customers, while trying to get the process as fast and\nreproducible as possible.\n\nIn order to create gold, the philosopher's stone is usually mixed with other\ningredients into a container that is then *hermetically sealed* for the duration\nof the process.\nThis is basically exactly what we do when we build software in containers.\n\n# Content\n\nThis repository contains:\n\n- some example package definitions in the `projects/` folder\n- Composable minimal NixOS example modules for different system configurations\n  in the `modules/` folder\n- [nixpkgs](https://github.com/nixos/nixpkgs) package database pin and an\n  example package database overlay in the `nix/` folder\n- example NixOS integration test for our example packages and NixOS service\n  definitions in the `integration-tests/` folder\n- scripts to demonstrate automatic binary- and source-closure calculation in\n  the `scripts/` folder\n\n# Live-Demo Sessions\n\nThis repository is used to demonstrate the following scenarios:\n\n- Message Server as typical C++ project\n    - nix-shell workflow (day-to-day incremental development)\n    - nix-build workflow (consumption/deployment)\n- Message Client as typical Rust Project\n    - nix-shell workflow\n    - nix-build workflow\n- GNU Hello Patching\n    - create patch from scratch\n    - show final derivation\n- Show nixpkgs integration\n    - `nix repl '\u003cnixpkgs\u003e'`\n    - showcase `overlay.nix` additions\n- Show how to compose a full system with such packages\n    - Go through modules\n    - Build \u0026 run VMs\n    - message server/client Demo\n    - RDP Demo\n- NixOS integration test (show \u0026 run code)\n- Demonstrate caching between machines\n- Demonstrate closure generation and transfer into offline machine\n    - show binary- and source-closure in action\n\nSome demo notes for replaying the more elaborate demo steps out at home:\n\n## Create the offline closure and build in an offline docker image\n\nCreate the offline closure of the image.\nPlease note that `closure.sh` creates a full source- and binary archive of all\nbuild products, while `source-closure.sh` only archives source tarballs and\nbootstrap tools.\n\n```sh\n$ ./scripts/closure.sh         # binary closure\n$ ./scripts/source-closure.sh  # sources-only closure\n```\n\nRun podman(/docker) image and import closure from file system\n\n```sh\n$ podman run -it --network=none -v /home/user/src/stone:/src nixos/nix\ndocker-shell # nix-store --import \u003c /src/stone-source.closure\n```\n\nBuild, Change, Rebuild on the offline machine\n\n```sh\n$ nix-build /src --option substituters \"\"\n\n# ...\n```\n\n## Little RDP Demo on NixOS VM\n\nBuild and run the RDP demo VM with forwarded ports for SSH (optional) and RDP.\n\n```sh\nexport QEMU_NET_OPTS=\"hostfwd=tcp::2221-:22,hostfwd=tcp::3389-:3389\"\nrm nixos.qcow2\n$(nix-build -A run-rdp-server-vm)/bin/run-nixos-vm\n```\n\nTo connect to the desktop session on the VM via RDP from the host, run:\n\n```sh\nnix-shell -p rdesktop --run \"rdesktop -u stone -p stone localhost:3389\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfc%2Fphilosophers-stone-nixos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftfc%2Fphilosophers-stone-nixos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfc%2Fphilosophers-stone-nixos/lists"}