Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into switch-to-open-tofu
Browse files Browse the repository at this point in the history
  • Loading branch information
lucperkins committed Nov 5, 2024
2 parents aba56d5 + fb7641c commit a1496c0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/pages/concepts/flakes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Reference | Description
`github:DeterminateSystems/zero-to-nix/d51c83a5d206e882a6f15a282e32b7079f5b6d76` | Commit [`d51c83a5d206e882a6f15a282e32b7079f5b6d76`][hash] on the [DeterminateSystems/zero-to-nix][gh-z2n] GitHub repository
`nixpkgs` | The most recent revision of the [`nixpkgs-unstable`][unstable] branch of [Nixpkgs] (an alias for `github:NixOS/nixpkgs`)
`nixpkgs/release-22.11` | The [`release-22.11`][22-11] branch of Nixpkgs
[`https://flakehub.com/f/NixOS/nixpkgs/0.2405.*.tar.gz`][fh-nixpkgs] | The most recent revision of the [`nixos-24.05`][branch] branch of [Nixpkgs] hosted on [FlakeHub]
[`https://flakehub.com/f/NixOS/nixpkgs/0.2405.*`][fh-nixpkgs] | The most recent revision of the [`nixos-24.05`][branch] branch of [Nixpkgs] hosted on [FlakeHub]


You can find a more systematic treatment of flake references in the [official documentation][refs-official].
Expand Down
24 changes: 21 additions & 3 deletions src/pages/concepts/nix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Nix
wip: true
snippet: |
A build tool, [package manager](/concepts/package-management), and [programming language](/concepts/nix-language)
A CLI, [package manager](/concepts/package-management), and [programming language](/concepts/nix-language)
related: ["nix-language", "nixos", "nixpkgs"]
externalSources: [
{
Expand Down Expand Up @@ -44,11 +44,22 @@ externalSources: [
]
---

*Nix* refers to a few different things:
[*Nix*][nix] can be a somewhat confusing term because it refers to multiple things:

1. The pure and functional [programming language][lang]
2. The [Nix CLI](#cli)
3. The overall Nix package management system
3. The overall Nix [package management system][package-management]

All of these are closely interrelated and should be thought of as a single tool.
In this document, we'll go over each of these three aspects of Nix.

<Admonition info open title="Nix and open source" id="nix-oss" client:load>
The Nix project is fully open source and largely developed within the [`NixOS`][nixos-org] organization on [GitHub].
It's licensed under [LGPL 2.1][license], which is generally quite permissive regarding commercial use.

We at Determinate Systems have actively contributed to Nix as an open source project in the past&mdash;alongside countless talented individuals&mdash;and will continue to do so as part of our [mission] to make Nix better.
We have also created [Determinate Nix][det-nix], a downstream distribution of Nix intended for enterprise.
</Admonition>

## The Nix CLI \{#cli}

Expand All @@ -75,10 +86,17 @@ The *original CLI* for Nix is still the official CLI but, as we mention above, n

The [Determinate Nix Installer][install] enables the [unified CLI](#unified-cli) by default, but leaves the tools from the original CLI accessible.

[det-nix]: https://docs.determinate.systems/determinate-nix
[ds]: https://determinate.systems
[env]: /concepts/dev-env
[flakes]: /concepts/flakes
[github]: https://github.com
[install]: /concepts/nix-installer
[lang]: /concepts/nix-language
[license]: https://github.com/nixOS/nix?tab=LGPL-2.1-1-ov-file
[mission]: https://determinate.systems/posts/we-want-to-make-nix-better
[nix]: https://nixos.org
[nixos-org]: https://github.com/NixOS
[packages]: /concepts/packages
[package-management]: /concepts/package-management
[store]: /concepts/nix-store
4 changes: 2 additions & 2 deletions src/pages/start/6.init-flake.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Turning your own projects into flakes can be somewhat tricky, so we at [Determin
You can run `fh init` using Nix:

```shell
nix run "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz#fh" -- init
nix run "https://flakehub.com/f/DeterminateSystems/fh/*" -- init
```

This will start up an interactive builder that asks you a series of questions and then writes a `flake.nix` file into the root of your project (plus some other files if you say yes to some of those questions).
Expand Down Expand Up @@ -62,7 +62,7 @@ We've created an example project that you can use to test out `fh init`:
```shell
git clone https://github.com/DeterminateSystems/fh-init-example-project
cd fh-init-example-project
nix run "https://flakehub.com/f/DeterminateSystems/fh/*.tar.gz" -- init
nix run "https://flakehub.com/f/DeterminateSystems/fh/*" -- init

# respond to the prompts

Expand Down

0 comments on commit a1496c0

Please sign in to comment.