From 469225f30920cfd0e97a1039740e0c9c2354b588 Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Wed, 12 Jun 2024 17:05:07 +0200 Subject: [PATCH] add documentation regarding adding specifications --- .../2024-06-11-deploying-cuirass-on-guixsd.md | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/content/blog/2024-06-11-deploying-cuirass-on-guixsd.md b/content/blog/2024-06-11-deploying-cuirass-on-guixsd.md index 953617f..0b50aa4 100644 --- a/content/blog/2024-06-11-deploying-cuirass-on-guixsd.md +++ b/content/blog/2024-06-11-deploying-cuirass-on-guixsd.md @@ -77,6 +77,8 @@ interesting than an empty list but whatever I tried ended up with 'invalid field specifier' errors. But I get that too for nginx configuration parts so that is probably a skill issue on my part. +Edit: definitely skill issue. I did not see that I defined them in the `operating-system` expression instead of on toplevel because it starts several screens up and down. Duh. Moving the define of the specifications to toplevel and using them here works just fine. + With a bit of luck we'll see: xyz@foo ~/.config/dotfiles/guix [env]$ sudo herd status cuirass @@ -262,7 +264,7 @@ Once that is setup the commented out section can be activated. -# Submitting jobs +# Interactivele Submitting jobs For some reason I do not understand yet, the specification file must be in the loadpath of the cuirass program. @@ -302,7 +304,8 @@ folder in the home folder of the **cuirass** user This actually starts the scheduler and it just keeps running (unless we also give the –one-shot flag) but the side effect is to add the -specification to the database. +specification to the database. It also allows to see immediately if there are syntax +errors or similar. When satisfied Ctrl-C out of it. From now on the channel will be checked and build any updated packages. @@ -310,7 +313,36 @@ packages. -## TODO Figure out a more elegant way to submit jobs +## Permanently add the job -There has to be a more elegant way +Once vetted the specification can be added to the system configuration. +Define the specifications on the toplevel of the system config file. (Be careful, I lost a lot of time because I did not see it was actually in the *operating-system* expression) + + ;; cuirass specifications + (define %cuirass-specifications + #~(list + (specification + (name "hello") + (build 'hello)) + (specification + (name 'snamguix) + (build '(channels . (snamguix))) + (channels + (cons (channel + (name 'snamguix) + (url "https://forge.snamellit.com/pti/snamguix.git") + (branch "main")) + %default-channels))))) + + +then replace the empty list in the *cuirass-service* : + + + (service cuirass-service-type + (cuirass-configuration + (specifications %cuirass-specifications))) + +reconfigure your system and restart *cuirass* with `sudo herd restart cuirass`. + +It is not *really* needed as it was already added to the database, but this will be useful when the CI server need to be repaved.