summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-12-09 09:56:59 -0500
committerFreya Murphy <freya@freyacat.org>2024-12-09 09:56:59 -0500
commit5c9d1553881a09a26636e611b8e63040604b07b1 (patch)
tree802c6d3c8ebade5dd0e4e1bb0fddd3b5b4bb18dd
parentrefactor keys/certs into new `files` folder (diff)
downloaddotfiles-guix-5c9d1553881a09a26636e611b8e63040604b07b1.tar.gz
dotfiles-guix-5c9d1553881a09a26636e611b8e63040604b07b1.tar.bz2
dotfiles-guix-5c9d1553881a09a26636e611b8e63040604b07b1.zip
add index.html file for substitutes server
-rw-r--r--files/index.html82
-rw-r--r--systems/cuirass.scm4
2 files changed, 86 insertions, 0 deletions
diff --git a/files/index.html b/files/index.html
new file mode 100644
index 0000000..00acfe9
--- /dev/null
+++ b/files/index.html
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html lang="en">
+ <!-- index.html file hosted at https://substitutes.freya.cat -->
+ <head>
+ <title>Sakura substitute server</title>
+ <meta charset="utf-8">
+ <meta name="author" content="freya">
+ <meta name="color-scheme" content="#181818">
+ </head>
+ <body>
+ <style>
+* {
+ box-sizing: border-box;
+}
+
+html, body {
+ margin: 0;
+ padding: 0;
+ background: #181818;
+ color: #fff;
+ font-family: DejaVu Sans, sans-serif;
+}
+
+body {
+ padding: 10px;
+ margin: auto;
+ max-width: 800px;
+}
+
+a, a:visited {
+ text-decoration: none;
+ color: #fcd1d7;
+}
+
+a:hover, a:focus {
+ text-decoration: underline;
+}
+
+pre {
+ background: #fff;
+ color: #562135;
+ margin: 10px;
+ padding: 10px;
+ border-radius: 2px;
+}
+ </style>
+ <h1>🌸 Sakura Guix Channel</h1>
+ <h2>substitutes.freya.cat</h2>
+ <hr>
+ <p>Sakua is a guix channel that packages things that you may want but guix dosen't have.</p>
+ <p>View the git repository on <a href="https://g.freya.cat/freya/sakura">forgejo</a>.</p>
+ <h3>Channel</h3>
+ <p>To add sakura to your guix channels, use the following specification.</p>
+ <pre><code>(channel
+ (name 'sakura)
+ (url "https://g.freya.cat/freya/sakura")
+ (branch "main")
+ (introduction
+ (make-channel-introduction
+ "8fb2f9c2fa414754c41c1c73665e3e73e12693ab"
+ (openpgp-fingerprint
+ "3CD3 65F0 373C EB13 853A F568 9FBC 6FFD 6D2D BF17"))))</code></pre>
+ <h3>Substitutes</h3>
+ <p>Sakura hosts a substitute server at <a href="#">substitutes.freya.cat</a> with the cuirass server running at <a href="https://cuirass.freya.cat">cuirass.freya.cat</a>. You can modify your guix-service-type with the following specification to enable the sakura substitute server.</p>
+ <pre><code>(service guix-service-type
+ (guix-configuration
+ (inherit config)
+ (substitute-urls
+ (append (list "https://substitutes.freya.cat")
+ %default-substitute-urls))
+ (authorized-keys
+ (append (list (local-file ".../sakura.pub"))
+ %default-authorized-guix-keys)))))))</pre></code>
+ <p>... where sakura.pub is a path to a file holding the following signing key.</p>
+ <pre><code>(public-key
+ (ecc
+ (curve Ed25519)
+ (q #3E9614FD06AF20F9534DA0DE64FB9004878789744F26FFF2FF381E2EED1DEAC9#)
+ )
+ )</pre></code>
+ </body>
+</html>
diff --git a/systems/cuirass.scm b/systems/cuirass.scm
index 39cf3a4..2804619 100644
--- a/systems/cuirass.scm
+++ b/systems/cuirass.scm
@@ -2,6 +2,7 @@
(ice-9 match)
(gnu packages ci)
(gnu packages databases)
+ (gnu services)
(gnu services cuirass)
(gnu services avahi)
(gnu services mcron)
@@ -71,6 +72,9 @@
(cache "/var/cache/publish")
(compression '(("zstd" 19)))
(port 8080)))
+ ; guix publish index.html
+ (extra-special-file "/srv/http/index.html"
+ (local-file "../files/index.html"))
; postgresql
(service postgresql-service-type
(postgresql-configuration