I’ve added a new module for sops, but building the system configuration results in an error (I’m new to Guix)
ice-9/eval.scm:223:20: In procedure proc:
error: %sops-service: unbound variable
My GUILE_LOAD_PATH is correct because other modules work. I’m not sure what’s so special about this one. Tried renaming exported variable name, but the same error occurred.
Consider
services/sops.scm
(define-module (services sops)
#:use-module (sops secrets)
#:use-module (sops services sops))
(define common.yaml
(local-file "../secrets/common.yaml"))
(define secrets
(list (sops-secret (key '("github" "token"))
(file common.yaml)
(user "danylo")
(permissions 256))))
(define-public %sops-service
(service sops-secrets-service-type
(sops-service-configuration (generate-key? #t)
(secrets secrets))))
and
systems/guixbox.scm
(define-module (systems guixbox)
#:use-module (services sops) ; <------------------- import
#:use-module (gnu)
; ...
)
(define %my-services
(list (service plasma-desktop-service-type)
%sops-service ; <----------------------------- here I need to use it
; ...
(set-xorg-configuration
(xorg-configuration (keyboard-layout %keyboard-layout)))))
See https://codeberg.org/knightpp/guixos/commit/1aebaf7ddafba0676b8da9af4ef246d0bb3199a2