{"id":14967937,"url":"https://github.com/determinatesystems/zero-to-nix","last_synced_at":"2025-05-14T19:05:58.872Z","repository":{"id":65442193,"uuid":"563020534","full_name":"DeterminateSystems/zero-to-nix","owner":"DeterminateSystems","description":"Zero to Nix is your guide to learning Nix and flakes. Created by Determinate Systems.","archived":false,"fork":false,"pushed_at":"2025-04-12T15:36:31.000Z","size":3494,"stargazers_count":1011,"open_issues_count":41,"forks_count":74,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-12T16:40:50.467Z","etag":null,"topics":["documentation","flakes","nix","nixlang","nixos"],"latest_commit_sha":null,"homepage":"https://zero-to-nix.com","language":"MDX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeterminateSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2022-11-07T18:38:33.000Z","updated_at":"2025-04-12T15:36:35.000Z","dependencies_parsed_at":"2023-02-17T10:45:56.968Z","dependency_job_id":"5b37c90e-cf0b-481a-bc3c-c70bdb116412","html_url":"https://github.com/DeterminateSystems/zero-to-nix","commit_stats":{"total_commits":932,"total_committers":47,"mean_commits":"19.829787234042552","dds":"0.16309012875536477","last_synced_commit":"0aeacea0a7504be15b9ef91d32cd6ac06235860b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fzero-to-nix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fzero-to-nix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fzero-to-nix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeterminateSystems%2Fzero-to-nix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeterminateSystems","download_url":"https://codeload.github.com/DeterminateSystems/zero-to-nix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248754192,"owners_count":21156388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["documentation","flakes","nix","nixlang","nixos"],"created_at":"2024-09-24T13:38:56.168Z","updated_at":"2025-05-14T19:05:57.625Z","avatar_url":"https://github.com/DeterminateSystems.png","language":"MDX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zero to Nix\n\n[![FlakeHub](https://img.shields.io/endpoint?url=https://flakehub.com/f/DeterminateSystems/zero-to-nix/badge)](https://flakehub.com/flake/DeterminateSystems/zero-to-nix)\n\n[Zero to Nix][site] is your guide to learning [Nix] and [flakes].\nIt was created and is maintained by [Determinate Systems][detsys].\n\n## Setup\n\nMake sure that you have Nix and [direnv] installed, then:\n\n```shell\n# Activate Nix development environment\ndirenv allow\n\n# Recommended\nalias npm=pnpm\n```\n\n## Developing the site\n\n### Run locally\n\nTo run the site in development mode (with live reload when you make changes):\n\n```shell\ndev\n```\n\nTo run the site in preview mode (with a static web server and no live reload):\n\n```shell\npreview\n\n# Alternatively\nnix run\n```\n\nThen open your browser to http://localhost:3000.\n\n### Run checks locally\n\nThe site has some [CI checks][ci] that run in [GitHub Actions][gha], like link checking.\nTo run the whole CI suite locally:\n\n```shell\nci\n```\n\n### Build locally\n\nTo ensure that the site can build properly in response to changes:\n\n```shell\nbuild\n```\n\nAs an alternative, you can [run the whole CI suite](#run-checks-locally), which also builds the site.\n\n### Format code\n\nTo ensure that everything is properly formatted:\n\n```shell\nformat\n```\n\n## Publishing\n\nThe Zero to Nix site is automatically published on [Vercel], which also provides deploy previews for pull requests.\n\n## Technologies\n\nZero to Nix's \"stack\" 🥞:\n\n- [îles][iles] for content management and site generation\n- [Vue] for templating\n- [MDX] for content\n- [Tailwind] for CSS\n\n## MDX components\n\nThe site uses a number of custom [MDX] components to spice up the usual Markdown content.\n\n| Component                                                                | What it does                                                                                                                           |\n| :----------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------- |\n| [`Admonition`](./src/components/mdx/Admonition.vue)                      | An admonition block of type `danger`, `info`, `success`, or `warning`.\u003cbr /\u003e\u003cbr /\u003eAdding an `id` makes it a stateful callout dropdown. |\n| [`Concept`](./src/components/mdx/concepts/Concept.vue)                   | Add a hoverable tool tip for a concept                                                                                                 |\n| [`Language`](./src/components/mdx/stateful/Language.vue)                 | Displays which (programming) language the user has selected                                                                            |\n| [`Languages`](./src/components/mdx/stateful/Languages.vue)               | Provides a (programming) language selector                                                                                             |\n| [`NixStorePath`](./src/components/concepts/NixStorePath.vue)             | Provides a colorful visualization of Nix store path components                                                                         |\n| [`Shell`](./src/components/code/Shell.vue)                               | Provides language- and system-specific shell commands                                                                                  |\n| [`SpecificLanguage`](./src/components/mdx/stateful/SpecificLanguage.vue) | Displays the enclosed content only if the user has selected a specific language                                                        |\n| [`System`](./src/components/mdx/stateful/System.vue)                     | Displays the currently selected system (Linux vs. macOS)                                                                               |\n| [`Systems`](./src/components/stateful/Systems.vue)                       | Provides a system selector (Linux vs. macOS)                                                                                           |\n\n## Directory structure\n\n| Directory                             | What it contains                                                               |\n| :------------------------------------ | :----------------------------------------------------------------------------- |\n| [`src/assets`](./src/assets/)         | Assets to be processed (only CSS for now)                                      |\n| [`src/components`](./src/components/) | [Vue] components used throughout the site                                      |\n| [`src/layouts`](./src/layouts/)       | [Vue] layouts for specific page types                                          |\n| [`src/logic`](./src/logic/)           | TypeScript helper stuff for state and content management                       |\n| [`src/pages`](./src/pages/)           | The content of the site (all [MDX]) plus some Vue templates for specific pages |\n| [`public`](./public/)                 | Assets that won't be processed (favicon, etc.)                                 |\n\n## Page metadata\n\nFor [quick start pages](./src/pages/start/):\n\n- `title`\n- `summary` (an array of things that the user will accomplish in the guide)\n- `order` (ascending)\n\nFor [concept pages](./src/pages/concepts/):\n\n- `title`\n- `snippet` (a brief explanation of the concept that appears in pop-ups)\n- `related` (an array of IDs representing concept pages, like `flakes` or `nix-store`)\n- `externalSources` (an array of links to external sources, such as official docs)\n\n## Site logic\n\nThere are a few other important files you should be aware of when working on the site:\n\n- [`src/app.ts`](./src/app.ts) defines global page metadata\n- [`src/site.ts`](./src/site.ts) defines site-level values, like the title, description, navbar links, and more.\n- [`src/logic/content.ts`](./src/logic/content.ts) provides the content management logic for the site (type-safe page frontmatter, functions to fetch and sort documents, and more)\n- [`src/logic/state.ts`](./src/logic/state.ts) defines all stateful logic using the [nanostores] library\n- [`src/logic/theme.ts`](./src/logic/theme.ts) provides logic for the light/dark theme switcher\n\n## Suggested VS Code settings\n\nIf you happen to use VS Code as your editor, we recommend adding these extensions:\n\n- [`Vue.volar`][vsc-vue]\n- [`unifiedjs.vscode-mdx`][vsc-mdx]\n- [`bradlc.vscode-tailwindcss`][vsc-tailwind]\n- [`esbenp.prettier-vscode`][vsc-prettier]\n- [`vscode.vscode-typescript-next`][vsc-tsc]\n\nWe also recommend adding these settings to your local `.vscode/settings.json`:\n\n```jsonc\n{\n  \"[mdx]\": {\n    // By default, this extension overwrites our one-sentence-per-line policy\n    \"editor.formatOnSave\": false,\n    // This is a nice helper for longer sentences\n    \"editor.wordWrapColumn\": 100,\n    \"editor.wordWrap\": \"wordWrapColumn\",\n  },\n  // Format everything using the Prettier config\n  \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n  // Keep junk out of your search results\n  \"search.exclude\": {\n    \"**/.direnv\": true,\n    \"**/.git\": true,\n    \"**/node_modules\": true,\n    \"dist\": true,\n    \"pnpm-lock.yaml\": true,\n    \"*.d.ts\": true,\n    \"tmp\": true,\n  },\n}\n```\n\n[ci]: ./.github/workflows/test.yml\n[client-load]: https://iles.pages.dev/guide/hydration#clientload\n[detsys]: https://determinate.systems\n[direnv]: https://direnv.net\n[flakes]: https://zero-to-nix.com/concepts/flakes\n[gha]: https://github.com/features/actions\n[hydration]: https://iles.pages.dev/guide/hydration#hydration-directives\n[iles]: https://github.com/elMassimo/iles\n[mdx]: https://mdxjs.com\n[nanostores]: https://github.com/nanostores/nanostores\n[nix]: https://nixos.org\n[site]: https://zero-to-nix.com/\n[tailwind]: https://tailwindcss.com\n[vercel]: https://vercel.com\n[vsc-mdx]: https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx\n[vsc-prettier]: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode\n[vsc-tailwind]: https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss\n[vsc-tsc]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-next\n[vsc-vue]: https://marketplace.visualstudio.com/items?itemName=Vue.volar\n[vue]: https://vuejs.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeterminatesystems%2Fzero-to-nix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeterminatesystems%2Fzero-to-nix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeterminatesystems%2Fzero-to-nix/lists"}