status-update-november-2021.html 7.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!DOCTYPE html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /><meta name="keywords" content="GNU, Emacs, Libre Software, Hurd, Guile, Guix" /><meta name="description" content="GNUcode.me is a website focusing on libre software projects, especially the GNU project." /><link type="application/atom+xml" rel="alternate" title="GNUcode.me -- Feed" href="/feed.xml" /><a rel="me" href="https://fosstodon.org/@thegnuguy"></a><link type="text/css" href="css/footer.min.css" rel="stylesheet"></link><link type="text/css" href="css/header.min.css" rel="stylesheet"></link><link type="text/css" href="css/main.min.css" rel="stylesheet"></link><title>Status Update November 2021 — GNUcode.me</title></head><body><header><nav><ul><li><a href="index.html">GNUcode.me</a></li><li><a href="services.html">Services</a></li><li><a href="about.html">About</a></li><li><a href="business-ideas.html">Business-ideas</a></li></ul></nav></header><h1>Status Update November 2021</h1><main><section class="basic-section-padding"><article><h3>by Joshua Branson — December 01, 2021</h3><div><p>It has been a fun November! You may have noticed that this blog lost the <code>https</code>
  2. connectivity for a few days! As a reminder, Guix system renews certificates for
  3. domains via</p><pre><code>sudo /var/lib/certbot/renew-certificates</code></pre><p>The above script is called automatically, but I figured that a good start would
  4. be to manually try to run this script and see what happens. So I <code>sshed</code> into
  5. the server to give it a try. I got this error message:</p><pre><code>Certbot failed to authenticate some domains (authenticator: webroot).
  6. The Certificate Authority reported these problems:
  7. Domain: mail.gnucode.me
  8. Type: dns
  9. Detail: DNS problem: NXDOMAIN looking up A for mail.gnucode.me
  10. - check that a DNS record exists for this domain
  11. Domain: wireguard.gnucode.me
  12. Type: dns
  13. Detail: DNS problem: NXDOMAIN looking up A for wireguard.gnucode.me
  14. - check that a DNS record exists for this domain</code></pre><p>To fix it I just removed the subdomains “mail.gnucode.me”, and
  15. “wireguard.gnucode.me”, from the <a href="https://notabug.org/jbranso/linode-guix-system-configuration/src/master/linode-locke-lamora-current-config.scm">config file for this website.</a></p><p>Then re-running certbot totally worked. While we are talking about certbot. I
  16. am glad that guix has support for it. They use the python acme client, which
  17. certainly works, but I have recently discovered that the OpenBSD folks have made
  18. <a href="https://man.openbsd.org/acme-client.1">their own acme client</a>. It looks like their client might be dependent on their
  19. httpd daemon, which is potentially why Guix System doesn’t use it. Anywho…</p><p>In other news, I have still been working on my opensmtpd service using guix
  20. records. I made the decision to tweak the records that I am using for my
  21. opensmtpd service. Before I had set up the configuration to follow nckx’s advice
  22. from <code>#guix</code> irc channel:</p><pre><code>&quot;...as I think Guix services ought to faithfully wrap the native syntax whenever
  23. possible (implement alternative simple APIs on top of that — fine).&quot;</code></pre><p>To follow this advice, I avoided trying to develop something like this:</p><pre><code>(service email-service-type
  24. (email-configuration
  25. (domains (list &quot;gnucode.me&quot; &quot;gnu-hurd.com&quot;))
  26. (use-letsencrypt #t)))</code></pre><p>Instead I originally tried this type of service configuration, where I had
  27. several lists of records of <code>includes</code>, <code>tables</code>, <code>pkis</code>, etc. Other records
  28. like the filters, which may have <code>tables</code>, would refer to the <code>table</code> record via
  29. a string. This could cause issues where the user mispelled the <code>table</code> name.</p><pre><code>(service opensmtpd-service
  30. (opensmtpd-configuration
  31. (includes ...)
  32. (tables ...)
  33. (pkis ...)
  34. (filters ...)
  35. (listen-on ...)
  36. (actions ...)
  37. (matches ...)))</code></pre><p>I also thought of other annoyances. Why would have a list of <code>actions</code>, and then
  38. have the <code>match</code> record have a fieldname <code>action</code> that accepts a string of the
  39. <code>action</code> name. It would be more robust if instead it accepted an
  40. <code>&lt;opensmtpd-action-configuration&gt;</code> record. Well when you start to think like
  41. this, the resulting example config may turn into:</p><pre><code>(service opensmtpd-service-type
  42. (opensmtpd-configuration
  43. (listen-ons
  44. (list (opensmtpd-listen-on
  45. (interface &quot;eth0&quot;)
  46. (filter
  47. (opensmtpd-filter-chain-configuration
  48. (list
  49. (opensmtpd-filter-phase ...)
  50. (opensmtpd-filter-phase ...))))
  51. (hostnames (opensmtpd-table-configuration
  52. (values &quot;gnucode.me&quot; &quot;gnu-hurd.com&quot;)))
  53. (ca
  54. (opensmtpd-ca-configuration ...))
  55. (pkis
  56. (list
  57. (opensmtpd-pki-configuration ...)
  58. (opensmtpd-pki-configuration ...))))))
  59. (matches
  60. (list
  61. (opensmtpd-match
  62. (options
  63. (list
  64. (opensmtpd-match-options-configuration
  65. (table
  66. (opensmtpd-table ...)))
  67. (opensmtpd-match-options-configuration ...)))
  68. (action
  69. (opensmtpd-action
  70. (opensmtpd-local-delivery-configuration
  71. (method
  72. (opensmtpd-maildir-configuration ...))
  73. (alias (opensmtpd-table ...))))))))))</code></pre><p>I believe this change will fix various mispelling errors and should make the
  74. service more robust.</p><p>Tweaking the datastructure has helped me to find other things that
  75. could be simpler. One example is the <code>&lt;opensmtpd-action&gt;</code> record. I used to have
  76. the datastructure be the <code>&lt;opensmtpd-action&gt;</code>, which included a fieldname that
  77. has as its value either a <code>&lt;opensmtpd-local-delivery-configuration&gt;</code> or a <code>&lt;opensmtpd-relay-configuration&gt;</code>
  78. like this:</p><pre><code> &lt;opensmtpd-action&gt;
  79. opensmtpd-action-name
  80. opensmtpd-action-method
  81. |
  82. / \
  83. / \
  84. / \
  85. / \
  86. / \
  87. &lt;opensmtpd-local-delivery-configuration&gt; &lt;opensmtpd-relay-configuration&gt;</code></pre><p>It is actually simpler to delete the <code>&lt;opensmtpd-action&gt;</code> record, and replace it with
  88. two records: <code>&lt;opensmtpd-local-delivery-action&gt;</code> and
  89. <code>&lt;opensmtpd-relay-configuration-action&gt;</code></p><p>Of course when you tweak datastructures, then you have to deal with tweaking the
  90. code to work with the new datastructures. That is interesting. Most of the
  91. TODO items I have for this project are in my <a href="https://notabug.org/jbranso/linode-guix-system-configuration/src/master/opensmtpd.org">opensmtpd.org</a> file.</p><p>Thanks for reading!</p></div></article></section></main><footer><p>© 2020 Joshua Branson. The text on this site is free culture under the Creative Commons Attribution Share-Alike 4.0 International license.</p><p>This website is build with Haunt, a static site generator written in Guile Scheme. Source code is <a href="https://notabug.org/jbranso/gnucode.me">available.</a></p><p>The color theme of this website is based off of the famous <a href="#3f3f3f" target="_blank">zenburn</a> theme.</p></footer></body>