help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unknown getter "operating-system-user-services"


From: edk
Subject: Unknown getter "operating-system-user-services"
Date: Sat, 01 Jan 2022 18:11:36 +0100
User-agent: mu4e 1.6.10; emacs 27.2

Dear all,

In order to programmatically define operating-systems, I use a
functional approach, where I edit the fields of the operating-system
structure using set-fields, like so:

https://gitlab.com/edouardklein/guix/-/blob/beaverlabs/beaver/system.scm#L106

#+begin_src scheme
(define* (add-something-to os)
  "Return a copy of OS (an operating-system) edited in such a way that some 
functionality is added to it."
  (set-fields os
              ((operating-system-user-services)
               (cons (simple-service "toto" some-service-type (list 
(some-service-conf)))
                     (operating-system-user-services os)))))
#+end_src

This allows for very nice OS declarations, for example my VPS is
declared like this, and it is immediately clear which services it provides:
#+begin_src scheme
(-> minimal-ovh
    (packages (list git))
    (denatting-webapp #:port 8000)
    (https-reverse-proxy
     #:from-host "denatting.beaver-labs.com"
     #:fullchain-path "/srv/ssl/certs/*.beaver-labs.com/fullchain.cer"
     #:privkey-path "/srv/ssl/certs/*.beaver-labs.com/private.key"
     #:to-port 8000
     #:raw-content '("client_max_body_size 1024M;"))
    (requisomatic-webapp #:port 8001)
    (https-reverse-proxy
     #:from-host "requisomatic.beaver-labs.com"
     #:fullchain-path "/srv/ssl/certs/*.beaver-labs.com/fullchain.cer"
     #:privkey-path "/srv/ssl/certs/*.beaver-labs.com/private.key"
     #:to-port 8001)
    (https-static-content
     #:from-host "dump.rdklein.fr"
     #:fullchain-path "/srv/ssl/certs/*.rdklein.fr/fullchain.cer"
     #:privkey-path "/srv/ssl/certs/*.rdklein.fr/private.key"
     #:to-dir "/srv/dump.rdklein.fr"
     #:allow-dir-listing #t)
    (https-static-content
     #:from-host "rdklein.fr"
     #:fullchain-path "/srv/ssl/certs/rdklein.fr/fullchain.cer"
     #:privkey-path "/srv/ssl/certs/rdklein.fr/private.key"
     #:to-dir "/srv/rdklein.fr"
     #:allow-dir-listing #f))
#+end_src

When I tried a guix pull today (after 18 days of not pulling), I got the
following error (with the above git repo being in my channels):

#+begin_src
(repl-version 0 1 1)
(exception syntax-error (value operating-system-user-services) (value "Wrong 
number of arguments") (value ((filename . 
"/gnu/store/xdvrkpldalcqjl9f10x9mlynkc8hb1bv-guix-45357d6/beaver/packages/python-xyz.scm")
 (line . 306) (column . 2))) (value (operating-system-user-services (%%on-error 
(unknown-getter (set-fields os ((operating-system-user-services) (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port)))) (operating-system-user-services os)))) 
operating-system-user-services)) %%type (((c-list)) ((c-same-type-check (quote 
(set-fields os ((operating-system-user-services) (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port)))) (operating-system-user-services os))))) (quote ()) (quote 
(operating-system-user-services))) (quote (let ((s os)) ((ck () ((@@ (srfi 
srfi-9) getter-copier) (quote operating-system-user-services) (quote 
(unknown-getter (set-fields os ((operating-system-user-services) (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port)))) (operating-system-user-services os)))) 
operating-system-user-services)))) #t s (operating-system-user-services 
(%set-fields #t (set-fields os ((operating-system-user-services) (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port)))) (operating-system-user-services os)))) 
(operating-system-user-services) (struct-ref s (ck () ((@@ (srfi srfi-9) 
getter-index) (quote operating-system-user-services) (quote (unknown-getter 
(set-fields os ((operating-system-user-services) (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port)))) (operating-system-user-services os)))) 
operating-system-user-services))))) (() (cons (service 
requisomatic-service-type (requisomatic-configuration (user user) (group group) 
(db-file db-file) (log-file log-file) (pid-file pid-file) (bind-to (format #f 
"~a:~a" ip port)))) (operating-system-user-services os)))))))))))) (value #f))
#+end_src

If you want to try, here is my channels.scm file:
#+begin_src
(cons*
 (channel
  (name 'beaverlabs)
  (url "https://gitlab.com/edouardklein/guix";)
  (branch "beaverlabs"))
 (channel
  (name 'guix-gaming-games)
  (url "https://gitlab.com/guix-gaming-channels/games.git";)
  ;; Enable signature verification:
  (introduction
   (make-channel-introduction
    "c23d64f1b8cc086659f8781b27ab6c7314c5cca5"
    (openpgp-fingerprint
     "50F3 3E2E 5B0C 3D90 0424  ABE8 9BDC F497 A4BB CC7F"))))
 %default-channels)
#+end_src

I'll dive into it sometimes later this week or the week after, but if
somebody know right of the bat what might cause this problem, I'd be
happy to know.

Thanks in advance,

Cheers,

Edouard.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]