@@ -22,10 +22,13 @@ Conservatively, a x86_64 machine with:
22
22
23
23
## Setup
24
24
25
- ** If you're just testing this out, you can use the
25
+ ### Installing Guix
26
+
27
+ If you're just testing this out, you can use the
26
28
[ Dockerfile] [ fanquake/guix-docker ] for convenience. It automatically speeds up
27
29
your builds by [ using substitutes] ( #speeding-up-builds-with-substitute-servers ) .
28
- Should you choose to use the Dockerfile, you can skip this section.**
30
+ If you don't want this behaviour, refer to the [ next
31
+ section] ( #choosing-your-security-model ) .
29
32
30
33
Otherwise, follow the [ Guix installation guide] [ guix/bin-install ] .
31
34
@@ -34,10 +37,32 @@ Otherwise, follow the [Guix installation guide][guix/bin-install].
34
37
> manager/existing setup. It _ only_ touches ` /var/guix ` , ` /gnu ` , and
35
38
> ` ~/.config/guix ` .
36
39
40
+ ### Choosing your security model
41
+
42
+ Guix allows us to achieve better binary security by using our CPU time to build
43
+ everything from scratch. However, it doesn't sacrifice user choice in pursuit of
44
+ this: users can decide whether or not to bootstrap and to use substitutes.
45
+
37
46
After installation, you may want to consider [ adding substitute
38
47
servers] ( #speeding-up-builds-with-substitute-servers ) to speed up your build if
39
- that fits your security model. (skippable if you're using the
40
- [ Dockerfile] [ fanquake/guix-docker ] )
48
+ that fits your security model (say, if you're just testing that this works).
49
+ This is skippable if you're using the [ Dockerfile] [ fanquake/guix-docker ] .
50
+
51
+ If you prefer not to use any substitutes, make sure to set
52
+ ` ADDITIONAL_GUIX_ENVIRONMENT_FLAGS ` like the following snippet. The first build
53
+ will take a while, but the resulting packages will be cached for future builds.
54
+
55
+ ``` sh
56
+ export ADDITIONAL_GUIX_ENVIRONMENT_FLAGS=' --no-substitutes'
57
+ ```
58
+
59
+ Likewise, to perform a bootstrapped build (takes even longer):
60
+
61
+ ``` sh
62
+ export ADDITIONAL_GUIX_ENVIRONMENT_FLAGS=' --bootstrap --no-substitutes'
63
+ ```
64
+
65
+ ### Using the right Guix
41
66
42
67
Once Guix is installed, deploy our patched version into your current Guix
43
68
profile. The changes there are slowly being upstreamed.
@@ -55,7 +80,7 @@ at the end of the `guix pull`)
55
80
export PATH=" ${HOME} /.config/guix/current/bin${PATH: +: } $PATH "
56
81
```
57
82
58
- > Note: There is ongoing work to eliminate this ` guix pull ` step using Guix
83
+ > Note: There is ongoing work to eliminate this entire section using Guix
59
84
> [ inferiors] [ guix/inferiors ] and [ channels] [ guix/channels ] .
60
85
61
86
## Usage
@@ -123,7 +148,8 @@ find output/ -type f -print0 | sort -z | xargs -r0 sha256sum
123
148
* _ ** ADDITIONAL_GUIX_ENVIRONMENT_FLAGS** _
124
149
125
150
Additional flags to be passed to ` guix environment ` . For a fully-bootstrapped
126
- build, set this to ` --bootstrap --no-substitutes ` . Note that a
151
+ build, set this to ` --bootstrap --no-substitutes ` (refer to the [ security
152
+ model section] ( #choosing-your-security-model ) for more details). Note that a
127
153
fully-bootstrapped build will take quite a long time on the first run.
128
154
129
155
## Tips and Tricks
0 commit comments