DeterminateSystems/zero-to-nix
关于
Zero to Nix 是学习 Nix 和 flakes 的指南,由 Determinate Systems 创建。
学习与教育实测星标增长
- 24小时
- 0
- 7天
- +3
- 15天
- +4
- 1个月
- +5
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Zero to Nix
Zero to Nix is your guide to learning Nix and flakes. It was created and is maintained by Determinate Systems.
Setup
Make sure that you have Nix and direnv installed, then:
# Activate Nix development environment
direnv allow
Developing the site
Run locally
To run the site in development mode (with live reload when you make changes):
dev
To run the site in preview mode (with a static web server and no live reload):
preview
# Alternatively
nix run
Then open your browser to http://localhost:3000.
Run checks locally
The site has some CI checks that run in GitHub Actions, like link checking. To run the whole CI suite locally:
ci
Build locally
To ensure that the site can build properly in response to changes:
build
As an alternative, you can run the whole CI suite, which also builds the site.
Format code
To ensure that everything is properly formatted:
format
Publishing
The Zero to Nix site is automatically published on Vercel, which also provides deploy previews for pull requests.
Technologies
Zero to Nix's "stack" 🥞:
Suggested VS Code settings
If you happen to use VS Code as your editor, we recommend adding these extensions:
astro-build.astro-vscodeunifiedjs.vscode-mdxbradlc.vscode-tailwindcssesbenp.prettier-vscodevscode.vscode-typescript-next
We also recommend adding these settings to your local .vscode/settings.json:
{
"[mdx]": {
// By default, this extension overwrites our one-sentence-per-line policy
"editor.formatOnSave": false,
// This is a nice helper for longer sentences
"editor.wordWrapColumn": 100,
"editor.wordWrap": "wordWrapColumn",
},
// Format everything using the Prettier config
"editor.defaultFormatter": "esbenp.prettier-vscode",
// Keep junk out of your search results
"search.exclude": {
"**/.direnv": true,
"**/.git": true,
"**/node_modules": true,
"dist": true,
"package-lock.json": true,
"*.d.ts": true,
"tmp": true,
},
}
探索相关项目
加载中…