Subject: LVM swap continuously fails guix system: error: service 'swap-/dev/mapper/guix-swap' requires 'device-mapping-guix-swap', which is not provided by any service

From: Shyam Saran <[email-masked]>
Date: Tue, 16 Feb 2021 15:41:49 +0530

Hi,

LVM/Device Mapper swap continuously fails for os configuration

with

  guix system: error: service 'swap-/dev/mapper/guix-swap' requires
'device-mapping-guix-swap', which is not provided by any service

which originates from code

(define swap-service-type
  (shepherd-service-type
   'swap
   (lambda (device)
     (define requirement
       (if (and (string? device)
                (string-prefix? "/dev/mapper/" device))
           (list (symbol-append 'device-mapping-
                                (string->symbol (basename device))))
           '()))

at
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/base.scm#n2171

Thanks
/shyam