Skip to content

Commit e7f5b81

Browse files
committed
Version 0.9 → 0.10
1 parent e6cfbe6 commit e7f5b81

7 files changed

+13
-13
lines changed

manuscript/Containers.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ More generally, in this chapter we're going to cover container management in the
2121
The most Docker-native approach is to fetch a container from the Docker registry and to illustrate that we're going to begin from the previous chapter's example integration test:
2222
2323
```bash
24-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9#integration-test'
24+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10#integration-test'
2525
```
2626
2727
… but this time instead of using the NixOS `postgres` module:
@@ -244,7 +244,7 @@ We'll delete the old `postgrest` service and instead use this `streamLayeredImag
244244
You can also clone an example containing all changes up to this point by running:
245245

246246
```bash
247-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9#docker'
247+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10#docker'
248248
```
249249

250250
This creates a new `postgrest` container that doesn't depend on the Docker registry at all. Note that the Docker registry *does host* an official `postgrest` image but we're not going to use that image. Instead, we're using a `postgrest` Docker image built entirely using Nix.
@@ -262,7 +262,7 @@ NixOS actually supports a more NixOS-native alternative to Docker, known as [Nix
262262
The easiest way to illustrate how NixOS containers work is to redo our `postgrest` example to put both Postgres and PostgREST in separate NixOS containers. We're going to begin by resetting our example back to the non-container example from the previous chapter:
263263

264264
```bash
265-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9#integration-test'
265+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10#integration-test'
266266
```
267267

268268
… and then we'll make two changes. First, instead of running Postgres on the host machine like this:

manuscript/ContinuousIntegrationDeployment.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ This exercise will build upon the same example as the [previous chapter on Terra
5151
```bash
5252
$ mkdir todo-app
5353
$ cd todo-app
54-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9#terraform'
54+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10#terraform'
5555
```
5656

5757
… or you can skip straight to the final result (minus the secrets file) by running:
5858

5959
```bash
60-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9#continuous-deployment'
60+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10#continuous-deployment'
6161
```
6262

6363
garnix requires the use of Nix flakes in order to support [efficient evaluation caching](https://www.tweag.io/blog/2020-06-25-eval-cache/) and the good news is that we can already build our NixOS system without any changes to our flake, but it might not be obvious how at first glance.

manuscript/Flakes.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ The Nix command-line interface provides several commands that are flake-aware, a
507507
We'll be using the following flake as the running example for our commands:
508508

509509
```bash
510-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9?dir=templates/cowsay'
510+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10?dir=templates/cowsay'
511511
```
512512

513513
… which will have this structure:
@@ -670,7 +670,7 @@ $ nix build 'github:NixOS/nixpkgs/23.11#cowsay' # Exact same result
670670
In fact, we don't even need to create a local copy of the `cowsay` template flake. We could also have run the flake directly from the GitHub repository where it's hosted:
671671

672672
```bash
673-
$ nix build 'github:Gabriella439/nixos-in-production/0.9?dir=templates/cowsay'
673+
$ nix build 'github:Gabriella439/nixos-in-production/0.10?dir=templates/cowsay'
674674
```
675675

676676
This works because flakes support GitHub URIs, so all of the flake operations in this chapter work directly on the GitHub repository without having to clone or template the repository locally. However, for simplicity all of the following examples will still assume you templated the flake locally.
@@ -997,7 +997,7 @@ You can template a project using `nix flake init`, which we've already used a fe
997997
… so earlier when we ran:
998998

999999
```bash
1000-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9?dir=templates/cowsay'
1000+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10?dir=templates/cowsay'
10011001
```
10021002

10031003
… that copied the directory pointed to by the `templates.default.path` flake output to our local directory.

manuscript/IntegrationTesting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Specifically, we're going to be testing the [PostgREST tutorial](https://postgre
8383
You can clone the equivalent NixOS test by running:
8484

8585
```bash
86-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9#integration-test'
86+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10#integration-test'
8787
```
8888

8989
One of the included files is `setup.sql` file which includes the database commands from the tutorial verbatim:

manuscript/Setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ If you are using Linux (including NixOS or the Windows Subsystem for Linux) you
200200
Run the following command to generate your first project:
201201

202202
```bash
203-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9#setup'
203+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10#setup'
204204
```
205205

206206
… that will generate the following `flake.nix` file:

manuscript/Terraform.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ the list of [AWS service endpoints](https://docs.aws.amazon.com/general/latest/g
4848
Now run the following command to bootstrap our first Terraform project:
4949

5050
```bash
51-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9#terraform'
51+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10#terraform'
5252
```
5353

5454
… which will generate the following files:

manuscript/WebServer.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Now that we can build and run a local NixOS virtual machine we can create our fi
88
We'll begin from the template project from "Setting up your development environment". You can either begin from the previous chapter by running the following command (if you haven't done so already):
99

1010
```bash
11-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9#setup'
11+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10#setup'
1212
```
1313

1414
… or if you want to skip straight to the final result at the end of this chapter you can run:
1515

1616
```bash
17-
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.9#server'
17+
$ nix flake init --template 'github:Gabriella439/nixos-in-production/0.10#server'
1818
```
1919

2020
Let's modify `module.nix` to specify a machine that serves a simple static "Hello, world!" page on `http://localhost`:

0 commit comments

Comments
 (0)