diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/LICENSE | 427 | ||||
-rw-r--r-- | content/_index.md | 6 | ||||
-rw-r--r-- | content/post/_index.md | 6 | ||||
-rw-r--r-- | content/post/homesteading.md | 13 | ||||
-rw-r--r-- | content/post/nixos-on-nanopi-r5s.md | 142 | ||||
-rw-r--r-- | content/post/now-on-three-continents.md | 25 | ||||
-rw-r--r-- | content/post/repository-management-with-ghq.md | 6 | ||||
-rw-r--r-- | content/post/self-hosted-git.md | 2 |
8 files changed, 613 insertions, 14 deletions
diff --git a/content/LICENSE b/content/LICENSE new file mode 100644 index 0000000..cc3e245 --- /dev/null +++ b/content/LICENSE | |||
@@ -0,0 +1,427 @@ | |||
1 | Attribution-ShareAlike 4.0 International | ||
2 | |||
3 | ======================================================================= | ||
4 | |||
5 | Creative Commons Corporation ("Creative Commons") is not a law firm and | ||
6 | does not provide legal services or legal advice. Distribution of | ||
7 | Creative Commons public licenses does not create a lawyer-client or | ||
8 | other relationship. Creative Commons makes its licenses and related | ||
9 | information available on an "as-is" basis. Creative Commons gives no | ||
10 | warranties regarding its licenses, any material licensed under their | ||
11 | terms and conditions, or any related information. Creative Commons | ||
12 | disclaims all liability for damages resulting from their use to the | ||
13 | fullest extent possible. | ||
14 | |||
15 | Using Creative Commons Public Licenses | ||
16 | |||
17 | Creative Commons public licenses provide a standard set of terms and | ||
18 | conditions that creators and other rights holders may use to share | ||
19 | original works of authorship and other material subject to copyright | ||
20 | and certain other rights specified in the public license below. The | ||
21 | following considerations are for informational purposes only, are not | ||
22 | exhaustive, and do not form part of our licenses. | ||
23 | |||
24 | Considerations for licensors: Our public licenses are | ||
25 | intended for use by those authorized to give the public | ||
26 | permission to use material in ways otherwise restricted by | ||
27 | copyright and certain other rights. Our licenses are | ||
28 | irrevocable. Licensors should read and understand the terms | ||
29 | and conditions of the license they choose before applying it. | ||
30 | Licensors should also secure all rights necessary before | ||
31 | applying our licenses so that the public can reuse the | ||
32 | material as expected. Licensors should clearly mark any | ||
33 | material not subject to the license. This includes other CC- | ||
34 | licensed material, or material used under an exception or | ||
35 | limitation to copyright. More considerations for licensors: | ||
36 | wiki.creativecommons.org/Considerations_for_licensors | ||
37 | |||
38 | Considerations for the public: By using one of our public | ||
39 | licenses, a licensor grants the public permission to use the | ||
40 | licensed material under specified terms and conditions. If | ||
41 | the licensor's permission is not necessary for any reason--for | ||
42 | example, because of any applicable exception or limitation to | ||
43 | copyright--then that use is not regulated by the license. Our | ||
44 | licenses grant only permissions under copyright and certain | ||
45 | other rights that a licensor has authority to grant. Use of | ||
46 | the licensed material may still be restricted for other | ||
47 | reasons, including because others have copyright or other | ||
48 | rights in the material. A licensor may make special requests, | ||
49 | such as asking that all changes be marked or described. | ||
50 | Although not required by our licenses, you are encouraged to | ||
51 | respect those requests where reasonable. More considerations | ||
52 | for the public: | ||
53 | wiki.creativecommons.org/Considerations_for_licensees | ||
54 | |||
55 | ======================================================================= | ||
56 | |||
57 | Creative Commons Attribution-ShareAlike 4.0 International Public | ||
58 | License | ||
59 | |||
60 | By exercising the Licensed Rights (defined below), You accept and agree | ||
61 | to be bound by the terms and conditions of this Creative Commons | ||
62 | Attribution-ShareAlike 4.0 International Public License ("Public | ||
63 | License"). To the extent this Public License may be interpreted as a | ||
64 | contract, You are granted the Licensed Rights in consideration of Your | ||
65 | acceptance of these terms and conditions, and the Licensor grants You | ||
66 | such rights in consideration of benefits the Licensor receives from | ||
67 | making the Licensed Material available under these terms and | ||
68 | conditions. | ||
69 | |||
70 | |||
71 | Section 1 -- Definitions. | ||
72 | |||
73 | a. Adapted Material means material subject to Copyright and Similar | ||
74 | Rights that is derived from or based upon the Licensed Material | ||
75 | and in which the Licensed Material is translated, altered, | ||
76 | arranged, transformed, or otherwise modified in a manner requiring | ||
77 | permission under the Copyright and Similar Rights held by the | ||
78 | Licensor. For purposes of this Public License, where the Licensed | ||
79 | Material is a musical work, performance, or sound recording, | ||
80 | Adapted Material is always produced where the Licensed Material is | ||
81 | synched in timed relation with a moving image. | ||
82 | |||
83 | b. Adapter's License means the license You apply to Your Copyright | ||
84 | and Similar Rights in Your contributions to Adapted Material in | ||
85 | accordance with the terms and conditions of this Public License. | ||
86 | |||
87 | c. BY-SA Compatible License means a license listed at | ||
88 | creativecommons.org/compatiblelicenses, approved by Creative | ||
89 | Commons as essentially the equivalent of this Public License. | ||
90 | |||
91 | d. Copyright and Similar Rights means copyright and/or similar rights | ||
92 | closely related to copyright including, without limitation, | ||
93 | performance, broadcast, sound recording, and Sui Generis Database | ||
94 | Rights, without regard to how the rights are labeled or | ||
95 | categorized. For purposes of this Public License, the rights | ||
96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar | ||
97 | Rights. | ||
98 | |||
99 | e. Effective Technological Measures means those measures that, in the | ||
100 | absence of proper authority, may not be circumvented under laws | ||
101 | fulfilling obligations under Article 11 of the WIPO Copyright | ||
102 | Treaty adopted on December 20, 1996, and/or similar international | ||
103 | agreements. | ||
104 | |||
105 | f. Exceptions and Limitations means fair use, fair dealing, and/or | ||
106 | any other exception or limitation to Copyright and Similar Rights | ||
107 | that applies to Your use of the Licensed Material. | ||
108 | |||
109 | g. License Elements means the license attributes listed in the name | ||
110 | of a Creative Commons Public License. The License Elements of this | ||
111 | Public License are Attribution and ShareAlike. | ||
112 | |||
113 | h. Licensed Material means the artistic or literary work, database, | ||
114 | or other material to which the Licensor applied this Public | ||
115 | License. | ||
116 | |||
117 | i. Licensed Rights means the rights granted to You subject to the | ||
118 | terms and conditions of this Public License, which are limited to | ||
119 | all Copyright and Similar Rights that apply to Your use of the | ||
120 | Licensed Material and that the Licensor has authority to license. | ||
121 | |||
122 | j. Licensor means the individual(s) or entity(ies) granting rights | ||
123 | under this Public License. | ||
124 | |||
125 | k. Share means to provide material to the public by any means or | ||
126 | process that requires permission under the Licensed Rights, such | ||
127 | as reproduction, public display, public performance, distribution, | ||
128 | dissemination, communication, or importation, and to make material | ||
129 | available to the public including in ways that members of the | ||
130 | public may access the material from a place and at a time | ||
131 | individually chosen by them. | ||
132 | |||
133 | l. Sui Generis Database Rights means rights other than copyright | ||
134 | resulting from Directive 96/9/EC of the European Parliament and of | ||
135 | the Council of 11 March 1996 on the legal protection of databases, | ||
136 | as amended and/or succeeded, as well as other essentially | ||
137 | equivalent rights anywhere in the world. | ||
138 | |||
139 | m. You means the individual or entity exercising the Licensed Rights | ||
140 | under this Public License. Your has a corresponding meaning. | ||
141 | |||
142 | |||
143 | Section 2 -- Scope. | ||
144 | |||
145 | a. License grant. | ||
146 | |||
147 | 1. Subject to the terms and conditions of this Public License, | ||
148 | the Licensor hereby grants You a worldwide, royalty-free, | ||
149 | non-sublicensable, non-exclusive, irrevocable license to | ||
150 | exercise the Licensed Rights in the Licensed Material to: | ||
151 | |||
152 | a. reproduce and Share the Licensed Material, in whole or | ||
153 | in part; and | ||
154 | |||
155 | b. produce, reproduce, and Share Adapted Material. | ||
156 | |||
157 | 2. Exceptions and Limitations. For the avoidance of doubt, where | ||
158 | Exceptions and Limitations apply to Your use, this Public | ||
159 | License does not apply, and You do not need to comply with | ||
160 | its terms and conditions. | ||
161 | |||
162 | 3. Term. The term of this Public License is specified in Section | ||
163 | 6(a). | ||
164 | |||
165 | 4. Media and formats; technical modifications allowed. The | ||
166 | Licensor authorizes You to exercise the Licensed Rights in | ||
167 | all media and formats whether now known or hereafter created, | ||
168 | and to make technical modifications necessary to do so. The | ||
169 | Licensor waives and/or agrees not to assert any right or | ||
170 | authority to forbid You from making technical modifications | ||
171 | necessary to exercise the Licensed Rights, including | ||
172 | technical modifications necessary to circumvent Effective | ||
173 | Technological Measures. For purposes of this Public License, | ||
174 | simply making modifications authorized by this Section 2(a) | ||
175 | (4) never produces Adapted Material. | ||
176 | |||
177 | 5. Downstream recipients. | ||
178 | |||
179 | a. Offer from the Licensor -- Licensed Material. Every | ||
180 | recipient of the Licensed Material automatically | ||
181 | receives an offer from the Licensor to exercise the | ||
182 | Licensed Rights under the terms and conditions of this | ||
183 | Public License. | ||
184 | |||
185 | b. Additional offer from the Licensor -- Adapted Material. | ||
186 | Every recipient of Adapted Material from You | ||
187 | automatically receives an offer from the Licensor to | ||
188 | exercise the Licensed Rights in the Adapted Material | ||
189 | under the conditions of the Adapter's License You apply. | ||
190 | |||
191 | c. No downstream restrictions. You may not offer or impose | ||
192 | any additional or different terms or conditions on, or | ||
193 | apply any Effective Technological Measures to, the | ||
194 | Licensed Material if doing so restricts exercise of the | ||
195 | Licensed Rights by any recipient of the Licensed | ||
196 | Material. | ||
197 | |||
198 | 6. No endorsement. Nothing in this Public License constitutes or | ||
199 | may be construed as permission to assert or imply that You | ||
200 | are, or that Your use of the Licensed Material is, connected | ||
201 | with, or sponsored, endorsed, or granted official status by, | ||
202 | the Licensor or others designated to receive attribution as | ||
203 | provided in Section 3(a)(1)(A)(i). | ||
204 | |||
205 | b. Other rights. | ||
206 | |||
207 | 1. Moral rights, such as the right of integrity, are not | ||
208 | licensed under this Public License, nor are publicity, | ||
209 | privacy, and/or other similar personality rights; however, to | ||
210 | the extent possible, the Licensor waives and/or agrees not to | ||
211 | assert any such rights held by the Licensor to the limited | ||
212 | extent necessary to allow You to exercise the Licensed | ||
213 | Rights, but not otherwise. | ||
214 | |||
215 | 2. Patent and trademark rights are not licensed under this | ||
216 | Public License. | ||
217 | |||
218 | 3. To the extent possible, the Licensor waives any right to | ||
219 | collect royalties from You for the exercise of the Licensed | ||
220 | Rights, whether directly or through a collecting society | ||
221 | under any voluntary or waivable statutory or compulsory | ||
222 | licensing scheme. In all other cases the Licensor expressly | ||
223 | reserves any right to collect such royalties. | ||
224 | |||
225 | |||
226 | Section 3 -- License Conditions. | ||
227 | |||
228 | Your exercise of the Licensed Rights is expressly made subject to the | ||
229 | following conditions. | ||
230 | |||
231 | a. Attribution. | ||
232 | |||
233 | 1. If You Share the Licensed Material (including in modified | ||
234 | form), You must: | ||
235 | |||
236 | a. retain the following if it is supplied by the Licensor | ||
237 | with the Licensed Material: | ||
238 | |||
239 | i. identification of the creator(s) of the Licensed | ||
240 | Material and any others designated to receive | ||
241 | attribution, in any reasonable manner requested by | ||
242 | the Licensor (including by pseudonym if | ||
243 | designated); | ||
244 | |||
245 | ii. a copyright notice; | ||
246 | |||
247 | iii. a notice that refers to this Public License; | ||
248 | |||
249 | iv. a notice that refers to the disclaimer of | ||
250 | warranties; | ||
251 | |||
252 | v. a URI or hyperlink to the Licensed Material to the | ||
253 | extent reasonably practicable; | ||
254 | |||
255 | b. indicate if You modified the Licensed Material and | ||
256 | retain an indication of any previous modifications; and | ||
257 | |||
258 | c. indicate the Licensed Material is licensed under this | ||
259 | Public License, and include the text of, or the URI or | ||
260 | hyperlink to, this Public License. | ||
261 | |||
262 | 2. You may satisfy the conditions in Section 3(a)(1) in any | ||
263 | reasonable manner based on the medium, means, and context in | ||
264 | which You Share the Licensed Material. For example, it may be | ||
265 | reasonable to satisfy the conditions by providing a URI or | ||
266 | hyperlink to a resource that includes the required | ||
267 | information. | ||
268 | |||
269 | 3. If requested by the Licensor, You must remove any of the | ||
270 | information required by Section 3(a)(1)(A) to the extent | ||
271 | reasonably practicable. | ||
272 | |||
273 | b. ShareAlike. | ||
274 | |||
275 | In addition to the conditions in Section 3(a), if You Share | ||
276 | Adapted Material You produce, the following conditions also apply. | ||
277 | |||
278 | 1. The Adapter's License You apply must be a Creative Commons | ||
279 | license with the same License Elements, this version or | ||
280 | later, or a BY-SA Compatible License. | ||
281 | |||
282 | 2. You must include the text of, or the URI or hyperlink to, the | ||
283 | Adapter's License You apply. You may satisfy this condition | ||
284 | in any reasonable manner based on the medium, means, and | ||
285 | context in which You Share Adapted Material. | ||
286 | |||
287 | 3. You may not offer or impose any additional or different terms | ||
288 | or conditions on, or apply any Effective Technological | ||
289 | Measures to, Adapted Material that restrict exercise of the | ||
290 | rights granted under the Adapter's License You apply. | ||
291 | |||
292 | |||
293 | Section 4 -- Sui Generis Database Rights. | ||
294 | |||
295 | Where the Licensed Rights include Sui Generis Database Rights that | ||
296 | apply to Your use of the Licensed Material: | ||
297 | |||
298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right | ||
299 | to extract, reuse, reproduce, and Share all or a substantial | ||
300 | portion of the contents of the database; | ||
301 | |||
302 | b. if You include all or a substantial portion of the database | ||
303 | contents in a database in which You have Sui Generis Database | ||
304 | Rights, then the database in which You have Sui Generis Database | ||
305 | Rights (but not its individual contents) is Adapted Material, | ||
306 | |||
307 | including for purposes of Section 3(b); and | ||
308 | c. You must comply with the conditions in Section 3(a) if You Share | ||
309 | all or a substantial portion of the contents of the database. | ||
310 | |||
311 | For the avoidance of doubt, this Section 4 supplements and does not | ||
312 | replace Your obligations under this Public License where the Licensed | ||
313 | Rights include other Copyright and Similar Rights. | ||
314 | |||
315 | |||
316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. | ||
317 | |||
318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE | ||
319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS | ||
320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF | ||
321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, | ||
322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, | ||
323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, | ||
325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT | ||
326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT | ||
327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. | ||
328 | |||
329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE | ||
330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, | ||
331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, | ||
332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, | ||
333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR | ||
334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN | ||
335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR | ||
336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR | ||
337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. | ||
338 | |||
339 | c. The disclaimer of warranties and limitation of liability provided | ||
340 | above shall be interpreted in a manner that, to the extent | ||
341 | possible, most closely approximates an absolute disclaimer and | ||
342 | waiver of all liability. | ||
343 | |||
344 | |||
345 | Section 6 -- Term and Termination. | ||
346 | |||
347 | a. This Public License applies for the term of the Copyright and | ||
348 | Similar Rights licensed here. However, if You fail to comply with | ||
349 | this Public License, then Your rights under this Public License | ||
350 | terminate automatically. | ||
351 | |||
352 | b. Where Your right to use the Licensed Material has terminated under | ||
353 | Section 6(a), it reinstates: | ||
354 | |||
355 | 1. automatically as of the date the violation is cured, provided | ||
356 | it is cured within 30 days of Your discovery of the | ||
357 | violation; or | ||
358 | |||
359 | 2. upon express reinstatement by the Licensor. | ||
360 | |||
361 | For the avoidance of doubt, this Section 6(b) does not affect any | ||
362 | right the Licensor may have to seek remedies for Your violations | ||
363 | of this Public License. | ||
364 | |||
365 | c. For the avoidance of doubt, the Licensor may also offer the | ||
366 | Licensed Material under separate terms or conditions or stop | ||
367 | distributing the Licensed Material at any time; however, doing so | ||
368 | will not terminate this Public License. | ||
369 | |||
370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public | ||
371 | License. | ||
372 | |||
373 | |||
374 | Section 7 -- Other Terms and Conditions. | ||
375 | |||
376 | a. The Licensor shall not be bound by any additional or different | ||
377 | terms or conditions communicated by You unless expressly agreed. | ||
378 | |||
379 | b. Any arrangements, understandings, or agreements regarding the | ||
380 | Licensed Material not stated herein are separate from and | ||
381 | independent of the terms and conditions of this Public License. | ||
382 | |||
383 | |||
384 | Section 8 -- Interpretation. | ||
385 | |||
386 | a. For the avoidance of doubt, this Public License does not, and | ||
387 | shall not be interpreted to, reduce, limit, restrict, or impose | ||
388 | conditions on any use of the Licensed Material that could lawfully | ||
389 | be made without permission under this Public License. | ||
390 | |||
391 | b. To the extent possible, if any provision of this Public License is | ||
392 | deemed unenforceable, it shall be automatically reformed to the | ||
393 | minimum extent necessary to make it enforceable. If the provision | ||
394 | cannot be reformed, it shall be severed from this Public License | ||
395 | without affecting the enforceability of the remaining terms and | ||
396 | conditions. | ||
397 | |||
398 | c. No term or condition of this Public License will be waived and no | ||
399 | failure to comply consented to unless expressly agreed to by the | ||
400 | Licensor. | ||
401 | |||
402 | d. Nothing in this Public License constitutes or may be interpreted | ||
403 | as a limitation upon, or waiver of, any privileges and immunities | ||
404 | that apply to the Licensor or You, including from the legal | ||
405 | processes of any jurisdiction or authority. | ||
406 | |||
407 | |||
408 | ======================================================================= | ||
409 | |||
410 | Creative Commons is not a party to its public | ||
411 | licenses. Notwithstanding, Creative Commons may elect to apply one of | ||
412 | its public licenses to material it publishes and in those instances | ||
413 | will be considered the “Licensor.” The text of the Creative Commons | ||
414 | public licenses is dedicated to the public domain under the CC0 Public | ||
415 | Domain Dedication. Except for the limited purpose of indicating that | ||
416 | material is shared under a Creative Commons public license or as | ||
417 | otherwise permitted by the Creative Commons policies published at | ||
418 | creativecommons.org/policies, Creative Commons does not authorize the | ||
419 | use of the trademark "Creative Commons" or any other trademark or logo | ||
420 | of Creative Commons without its prior written consent including, | ||
421 | without limitation, in connection with any unauthorized modifications | ||
422 | to any of its public licenses or any other arrangements, | ||
423 | understandings, or agreements concerning use of licensed material. For | ||
424 | the avoidance of doubt, this paragraph does not form part of the | ||
425 | public licenses. | ||
426 | |||
427 | Creative Commons may be contacted at creativecommons.org. | ||
diff --git a/content/_index.md b/content/_index.md index add1ca4..7239667 100644 --- a/content/_index.md +++ b/content/_index.md | |||
@@ -1,9 +1,7 @@ | |||
1 | +++ | 1 | +++ |
2 | title = "Home" | 2 | title = "Home" |
3 | sort_by = "date" | ||
4 | paginate_reversed = true | ||
5 | +++ | 3 | +++ |
6 | <p class="p-note"> | 4 | <p class="p-note note"> |
7 | I work as a Full-stack Developer in Berlin. I occasionally write about Emacs and | 5 | I work as a back-end and infrastructure developer in Berlin. I occasionally write about Emacs and |
8 | development-related topics. | 6 | development-related topics. |
9 | </p> | 7 | </p> |
diff --git a/content/post/_index.md b/content/post/_index.md deleted file mode 100644 index e0d2523..0000000 --- a/content/post/_index.md +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | +++ | ||
2 | title = "Posts" | ||
3 | sort_by = "date" | ||
4 | paginate_reversed = true | ||
5 | transparent = true | ||
6 | +++ | ||
diff --git a/content/post/homesteading.md b/content/post/homesteading.md new file mode 100644 index 0000000..52ce713 --- /dev/null +++ b/content/post/homesteading.md | |||
@@ -0,0 +1,13 @@ | |||
1 | +++ | ||
2 | title = "Homesteading" | ||
3 | description = "Running my own code" | ||
4 | date = 2023-09-22T10:09:22.141Z | ||
5 | [taxonomies] | ||
6 | tags = ["website"] | ||
7 | +++ | ||
8 | |||
9 | I switched away from [Zola](https://www.getzola.org/) and made my own [static site builder](https://git.alanpearce.eu/website/tree) that uses only HTML templates. I've been wanting to do this since at least 2017, when I started to work on a [homestead project](https://git.alanpearce.eu/homestead/tree/src?h=2017), which I didn't quite finish. | ||
10 | |||
11 | The recent release of [Bun](https://bun.sh/), which touts itself as an "all-in-one JavaScript toolkit" encouraged me to play around with it. I have to say, I am surprised by how energising it was; an antidote to the "JavaScript fatigue" I've read about and definitely experienced. | ||
12 | |||
13 | I decided that I'd start by serving my site using Bun's web server, then I added site generation later. I have been intrigued by the idea of DOM templating ever since I read about it on [Camen Design](https://camendesign.com/dom_templating) [in 2012](https://camendesign.com/code/dom_templating/domtemplate_v4.rem) and I've enjoyed putting it into practice. | ||
diff --git a/content/post/nixos-on-nanopi-r5s.md b/content/post/nixos-on-nanopi-r5s.md new file mode 100644 index 0000000..825d6b4 --- /dev/null +++ b/content/post/nixos-on-nanopi-r5s.md | |||
@@ -0,0 +1,142 @@ | |||
1 | +++ | ||
2 | title = "Running NixOS on a NanoPi R5S" | ||
3 | date = 2023-07-30T08:51:46Z | ||
4 | [taxonomies] | ||
5 | tags = ["NixOS", "home-networking", "infrastructure"] | ||
6 | +++ | ||
7 | |||
8 | I managed to get [NixOS](https://nixos.org) running on my [NanoPi R5S](https://www.friendlyelec.com/index.php?route=product/product&product_id=287) ([FriendlyElec Wiki](https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R5S)). | ||
9 | |||
10 | Firstly, I flashed a pre-built stock Debian image from [inindev](https://github.com/inindev/nanopi-r5) to an SD card. This can be used as a rescue system later on. | ||
11 | |||
12 | From that SD card, I then flashed the same system onto the internal <abbr title="embedded MultiMediaCard">eMMC</abbr> Storage. I only really needed to this to ensure UBoot was correctly installed; I think there will be an easier way to do it. | ||
13 | |||
14 | I had nix already installed on the <abbr title="Non-Volatile Memory Express">NVMe</abbr> <abbr title="Solid-State Drive">SSD</abbr> along with a home directory. I bind-mounted `/nix` and `/home` following the fstab I had previously set up: | ||
15 | |||
16 | ```conf | ||
17 | UUID=replaceme /mnt ext4 relatime,lazytime 0 2 | ||
18 | /mnt/nix /nix none defaults,bind 0 0 | ||
19 | /mnt/srv /srv none defaults,bind 0 0 | ||
20 | /mnt/home /home none defaults,bind 0 0 | ||
21 | ``` | ||
22 | |||
23 | I then created a user for myself using that home directory, I had full access to nix in the new Debian environment. This meant I had access to `nixos-install`. | ||
24 | |||
25 | I wanted to use the [extlinux support in UBoot](https://u-boot.readthedocs.io/en/latest/develop/distro.html#boot-configuration-files), so I made `/mnt/boot` point to `/boot` on the <abbr>eMMC</abbr>: | ||
26 | |||
27 | ```sh | ||
28 | mkdir /mnt/{emmc,boot} | ||
29 | mount LABEL=rootfs /mnt/emmc | ||
30 | mount --bind /mnt/emmc /mnt/boot | ||
31 | ``` | ||
32 | |||
33 | <aside> | ||
34 | One could <em>probably</em> delete everything else on the <abbr>eMMC</abbr> and move the contents of <code>/mnt/emmc/boot</code> to <code>/mnt/emmc</code>, thus obviating the need to bind-mount <code>/boot</code> | ||
35 | </aside> | ||
36 | |||
37 | I ran `nixos-generate-config` as usual, which set up the mount points in `hardware-configuration.nix` correctly. `configuration.nix` needed a bit of tweaking. My first booting configuration was something like this, mostly borrowed from [Artem Boldariev's comment](https://github.com/inindev/nanopi-r5/issues/11#issue-1789308883): | ||
38 | |||
39 | ```nix | ||
40 | { config | ||
41 | , pkgs | ||
42 | , lib | ||
43 | , ... | ||
44 | }: | ||
45 | let | ||
46 | fsTypes = [ "f2fs" "ext" "exfat" "vfat" ]; | ||
47 | in | ||
48 | { | ||
49 | imports = [ ./hardware-configuration.nix ]; | ||
50 | boot = { | ||
51 | kernelPackages = pkgs.linuxKernel.packages.linux_6_4; | ||
52 | |||
53 | # partial Rockchip related changes from Debian 12 kernel version 6.1 | ||
54 | # Also, see here: | ||
55 | # https://discourse.nixos.org/t/how-to-provide-missing-headers-to-a-kernel-build/11422/3 | ||
56 | kernelPatches = [ | ||
57 | { | ||
58 | name = "rockchip-config.patch"; | ||
59 | patch = null; | ||
60 | extraConfig = '' | ||
61 | PHY_ROCKCHIP_PCIE Y | ||
62 | PCIE_ROCKCHIP_EP y | ||
63 | PCIE_ROCKCHIP_DW_HOST y | ||
64 | ROCKCHIP_VOP2 y | ||
65 | ''; | ||
66 | } | ||
67 | { | ||
68 | name = "status-leds.patch"; | ||
69 | patch = null; | ||
70 | # old: | ||
71 | # LEDS_TRIGGER_NETDEV y | ||
72 | extraConfig = '' | ||
73 | LED_TRIGGER_PHY y | ||
74 | USB_LED_TRIG y | ||
75 | LEDS_BRIGHTNESS_HW_CHANGED y | ||
76 | LEDS_TRIGGER_MTD y | ||
77 | ''; | ||
78 | } | ||
79 | ]; | ||
80 | |||
81 | supportedFilesystems = fsTypes; | ||
82 | initrd.supportedFilesystems = fsTypes; | ||
83 | |||
84 | initrd.availableKernelModules = [ | ||
85 | ## Rockchip | ||
86 | ## Storage | ||
87 | "sdhci_of_dwcmshc" | ||
88 | "dw_mmc_rockchip" | ||
89 | |||
90 | "analogix_dp" | ||
91 | "io-domain" | ||
92 | "rockchip_saradc" | ||
93 | "rockchip_thermal" | ||
94 | "rockchipdrm" | ||
95 | "rockchip-rga" | ||
96 | "pcie_rockchip_host" | ||
97 | "phy-rockchip-pcie" | ||
98 | "phy_rockchip_snps_pcie3" | ||
99 | "phy_rockchip_naneng_combphy" | ||
100 | "phy_rockchip_inno_usb2" | ||
101 | "dwmac_rk" | ||
102 | "dw_wdt" | ||
103 | "dw_hdmi" | ||
104 | "dw_hdmi_cec" | ||
105 | "dw_hdmi_i2s_audio" | ||
106 | "dw_mipi_dsi" | ||
107 | ]; | ||
108 | loader = { | ||
109 | timeout = 3; | ||
110 | grub.enable = false; | ||
111 | generic-extlinux-compatible = { | ||
112 | enable = true; | ||
113 | useGenerationDeviceTree = true; | ||
114 | }; | ||
115 | }; | ||
116 | }; | ||
117 | # this file is from debian and should be in /boot/ | ||
118 | hardware.deviceTree.name = "../../rk3568-nanopi-r5s.dtb"; | ||
119 | # Most Rockchip CPUs (especially with hybrid cores) work best with "schedutil" | ||
120 | powerManagement.cpuFreqGovernor = "schedutil"; | ||
121 | |||
122 | boot.kernelParams = [ | ||
123 | "console=tty1" | ||
124 | "console=ttyS2,1500000" | ||
125 | "earlycon=uart8250,mmio32,0xfe660000" | ||
126 | ]; | ||
127 | # Let's blacklist the Rockchips RTC module so that the | ||
128 | # battery-powered HYM8563 (rtc_hym8563 kernel module) will be used | ||
129 | # by default | ||
130 | boot.blacklistedKernelModules = [ "rtc_rk808" ]; | ||
131 | |||
132 | # ... typical config omitted for brevity | ||
133 | } | ||
134 | ``` | ||
135 | |||
136 | Due to the custom kernel configuration, building takes a while. I set up a [distributed build](https://nixos.org/manual/nix/stable/advanced-topics/distributed-builds.html) to speed things up, using a [Hetzner Cloud](https://www.hetzner.com/cloud) CAX21 ARM64 instance (although I could have used an x86_64 system with one of the methods mentioned on the [NixOS on ARM NixOS wiki page](https://nixos.wiki/wiki/NixOS_on_ARM#Build_your_own_image_natively)). This made for a very long `nixos-install` command line: | ||
137 | |||
138 | ```sh | ||
139 | sudo env PATH=$PATH =nixos-install --root /mnt --no-channel-copy --channel https://nixos.org/channels/nixos-23.05 --option builders'ssh://my-host aarch64-linux /root/.ssh/id_pappel_nixpkgs 4 2 big-parallel' --option builders-use-substitutes true --max-jobs 0 | ||
140 | ``` | ||
141 | |||
142 | I added `setenv bootmeths "extlinux"` to `/boot/boot.txt` and ran `/boot/mkscr.sh` as root to ensure that UBoot would search for the `extlinux.conf` file | ||
diff --git a/content/post/now-on-three-continents.md b/content/post/now-on-three-continents.md new file mode 100644 index 0000000..1a2828a --- /dev/null +++ b/content/post/now-on-three-continents.md | |||
@@ -0,0 +1,25 @@ | |||
1 | +++ | ||
2 | title = "Now on three continents" | ||
3 | description = "This website is now hosted on three continents" | ||
4 | date = 2023-07-02T07:55:35Z | ||
5 | [taxonomies] | ||
6 | tags = ["website", "infrastructure"] | ||
7 | +++ | ||
8 | |||
9 | This website is now hosted on three continents. | ||
10 | |||
11 | I recently changed the hosting for this site to [fly](http://fly.io), since I was rather intrigued by the idea of being able to run three small <abbr>VMs</abbr> (<dfn id="VMs">Virtual Machines</dfn>) worldwide for free. I would gladly have paid a small amount for their services. If they didn't have a free allowance for <abbr>VMs</abbr> then it would only be around $6 a month, so I'm not worried about them removing the free allowance. | ||
12 | |||
13 | Previously it was running on one [Hetzner](https://www.hetzner.com) <abbr title="Virtual Machine">VM</abbr> in Nuremberg, Germany that I set up and maintained myself. The maintenance wasn't a problem for me, but rather the idea of slow loading times for anyone reading this outside of Europe. | ||
14 | |||
15 | American visitors should notice a definite speedup now, as there's a server on the west coast and for the few visitors in the Asia-Pacific region, there's also a server in Australia. I kept track of the response time before and after the change using the [Online or not](https://onlineornot.com/) [Do I need a CDN?](https://onlineornot.com/do-i-need-a-cdn) tool, which you can see in the table below (measured in <abbr title="milliseconds">ms</abbr>) | ||
16 | |||
17 | | Region | Before | After | | ||
18 | |-------------------------|--------|-------| | ||
19 | | Europe (Frankfurt) | 62 | 32 | | ||
20 | | US East (N. Virginia) | 348 | 185 | | ||
21 | | US West (N. California) | 503 | 61 | | ||
22 | | Asia Pacific (Tokyo) | 732 | 251 | | ||
23 | | Asia Pacific (Sydney) | 1114 | 76 | | ||
24 | |||
25 | I do find it rather amusing that I spend more time tinkering with the site than actually posting anything, but, for once, tinkering has actually led to me posting something (this post). I would like to think that this might encourage me to post more in the future, but only time will tell. | ||
diff --git a/content/post/repository-management-with-ghq.md b/content/post/repository-management-with-ghq.md index c225ace..dd21db9 100644 --- a/content/post/repository-management-with-ghq.md +++ b/content/post/repository-management-with-ghq.md | |||
@@ -67,10 +67,10 @@ sequence: | |||
67 | bindkey '\es' cd-project-widget | 67 | bindkey '\es' cd-project-widget |
68 | ``` | 68 | ``` |
69 | 69 | ||
70 | Now I can press `M-s` in a shell, start typing "dotfiles" and press enter to `cd` | 70 | Now I can press `M-s` in a shell, start typing "nixfiles" and press enter to `cd` |
71 | to my [dotfiles][] project. Pretty neat! | 71 | to my [nixfiles][] project. Pretty neat! |
72 | 72 | ||
73 | [ghq]:https://github.com/motemen/ghq | 73 | [ghq]:https://github.com/motemen/ghq |
74 | [fzf]:https://github.com/junegunn/fzf | 74 | [fzf]:https://github.com/junegunn/fzf |
75 | [fzf-cd-widget]:https://github.com/junegunn/fzf/blob/337cdbb37c1efc49b09b4cacc6e9ee1369c7d76d/shell/key-bindings.zsh#L40-L54 | 75 | [fzf-cd-widget]:https://github.com/junegunn/fzf/blob/337cdbb37c1efc49b09b4cacc6e9ee1369c7d76d/shell/key-bindings.zsh#L40-L54 |
76 | [dotfiles]:https://git.alanpearce.eu/dotfiles | 76 | [nixfiles]:https://git.alanpearce.eu/dotfiles |
diff --git a/content/post/self-hosted-git.md b/content/post/self-hosted-git.md index 3bdbffb..d0ac370 100644 --- a/content/post/self-hosted-git.md +++ b/content/post/self-hosted-git.md | |||
@@ -144,4 +144,4 @@ I want, without consuming many system resources with daemons. | |||
144 | [dotfiles-github]:https://github.com/alanpearce/dotfiles | 144 | [dotfiles-github]:https://github.com/alanpearce/dotfiles |
145 | [wildrepos]:http://gitolite.com/gitolite/wild/ | 145 | [wildrepos]:http://gitolite.com/gitolite/wild/ |
146 | [ghq]:https://github.com/motemen/ghq | 146 | [ghq]:https://github.com/motemen/ghq |
147 | [using-ghq]:{{< relref "/post/repository-management-with-ghq.md" >}} "Repository management with ghq" | 147 | [using-ghq]:@/post/repository-management-with-ghq.md "Repository management with ghq" |