Re: guix system reconfigure: Wrong type argument in position 1 (expecting struct)
Ricardo Wurmus writes: [...] > Pull out the modify-services expression, so that it becomes the second > argument to “append”. Thank you Ricardo, I applied the cons* solution suggested by Julien ...what an amazing community: two answers in a few hours, you make me feel home :-D Happy Guix! Gio'. -- Giovanni Biscuolo Xelera IT Infrastructures signature.asc Description: PGP signature
Re: guix system reconfigure: Wrong type argument in position 1 (expecting struct)
Hello Julien, thank you for your check! Julien Lepiller writes: [...] > The result of modify-services is a list, but reading your file, it > seems you add it to the end of the (list ...) thing, Ouch... now **I see**! ...and begin to understand the error message > which is not going > to work: you're ending up with a list of lists. You can either put the > modify-services form outside of that list: [...] > or replace the (append (list ...)) with a (cons* ...): I adopted the latter, it makes (services...) more readeable to me [...] Kudos. Gio' aka `Guix-Fu Panda` -- Giovanni Biscuolo Xelera IT Infrastructures signature.asc Description: PGP signature
Re: guix system reconfigure: Wrong type argument in position 1 (expecting struct)
Hi Giovanni, the problem is with your “services” field: (services (append (list … (modify-services %base-services (guix-service-type config => (guix-configuration (inherit config) (use-substitutes? #t) (authorized-keys %authorized-guix-keys))) Note the indentation: modify-services returns a list and in your config that’s inside of “list”. “append” here only has one argument: a list that contains a list of services (among others). Pull out the modify-services expression, so that it becomes the second argument to “append”. -- Ricardo
Re: guix system reconfigure: Wrong type argument in position 1 (expecting struct)
Le Tue, 18 Jun 2019 16:53:51 +0200, Giovanni Biscuolo a écrit : > Hello Guix, > > I'm trying to reconfigure but I get this error: > > Since everytime I try to purposely add a syntax error or miss to add a > module guix correctly point that out, I doubt it depends on some error > in my config.scm... or am I wrong? > > Anyway, this is my slightly obfuscated config.scm: > > --8<---cut here---start->8--- > ; This is batondor > > (use-modules (gnu)) > (use-service-modules networking ssh mcron virtualization) > (use-package-modules linux) > > (define %authorized-guix-keys > ;; List of authorized 'guix archive' keys. > (list (local-file "keys/guix/OMISSIS.pub") > (local-file "keys/guix/OMISSIS.pub"))) > > (define gc-job > ;; Run 'guix gc' at 3AM every day. > #~(job '(next-hour '(3)) "guix gc -F 50G")) > > (define btrfs-job > ;; Run 'btrfs balance' every three days to make free space. > #~(job (lambda (now) >(next-day-from now (range 1 31 3))) > (string-append #$btrfs-progs "/bin/btrfs balance " > "start -dusage=50 -musage=70 /"))) > > ;; The actual machine > > (operating-system > (locale "en_US.utf8") > (timezone "Europe/Rome") > (keyboard-layout > (keyboard-layout "it" "nodeadkeys")) > (bootloader > (bootloader-configuration >(bootloader grub-efi-bootloader) >(target "/boot/efi") >(keyboard-layout keyboard-layout))) > (file-systems > (cons* (file-system > (mount-point "/") > (device > (uuid "26bd54ec-4e74-4b3a-96ff-58f2f34e4a1a" >'btrfs)) > (type "btrfs")) >(file-system > (mount-point "/boot/efi") > (device (uuid "7A61-DB20" 'fat32)) > (type "vfat")) >%base-file-systems)) > (host-name "batondor") > (users (cons* (user-account > (name "x") > (comment "X") > (group "users") > (home-directory "/home/x") > (supplementary-groups >'("wheel" "kvm" "netdev" "audio" "video"))) > %base-user-accounts)) > (packages > (append >(list (specification->package "nss-certs")) >%base-packages)) > > (services > (append >(list (service openssh-service-type > (openssh-configuration > (port-number 22) > (authorized-keys > `(("x" ,(local-file "keys/ssh/x.pub")) > >(service dhcp-client-service-type) > >(service ntp-service-type) > >(service qemu-binfmt-service-type > (qemu-binfmt-configuration > (platforms (lookup-qemu-platforms "arm" "aarch64")) > (guix-support? #t))) > >(service mcron-service-type > (mcron-configuration > (jobs (list gc-job btrfs-job > >(modify-services %base-services > (guix-service-type config => >(guix-configuration > (inherit config) > (use-substitutes? #t) > (authorized-keys > %authorized-guix-keys > --8<---cut here---end--->8--- The result of modify-services is a list, but reading your file, it seems you add it to the end of the (list ...) thing, which is not going to work: you're ending up with a list of lists. You can either put the modify-services form outside of that list: (service mcron-service-type (mcron-configuration - (jobs (list gc-job btrfs-job + (jobs (list gc-job btrfs-job) (modify-services %base-services (guix-service-type config => (guix-configuration (inherit config) (use-substitutes? #t) (authorized-keys - %authorized-guix-keys + %authorized-guix-keys))) or replace the (append (list ...)) with a (cons* ...): (services - (append -(list (service openssh-service-type + (cons* (service openssh-service-type - %authorized-guix-keys + %authorized-guix-keys))) > > Am I missing something or did I found a bug? > > Thanks! Gio'. >
guix system reconfigure: Wrong type argument in position 1 (expecting struct)
Hello Guix, I'm trying to reconfigure but I get this error: --8<---cut here---start->8--- ~$ sudo -i guix system reconfigure /etc/config.scm Backtrace: 14 (primitive-load "/root/.config/guix/current/bin/guix") In guix/ui.scm: 1620:12 13 (run-guix-command _ . _) In ice-9/boot-9.scm: 829:9 12 (catch _ _ # …) 829:9 11 (catch _ _ # …) In guix/scripts/system.scm: 1325:8 10 (_) In guix/status.scm: 768:4 9 (call-with-status-report _ _) In guix/scripts/system.scm: 1181:4 8 (process-action _ _ _) In guix/store.scm: 623:10 7 (call-with-store _) 1800:24 6 (run-with-store _ _ #:guile-for-build _ #:system _ # _) In guix/scripts/system.scm: 1197:13 5 (_ _) 890:18 4 (perform-action reconfigure #< kerne…> …) In gnu/system.scm: 865:19 3 (operating-system-derivation _) In gnu/services.scm: 738:6 2 (instantiate-missing-services _) In srfi/srfi-1.scm: 466:18 1 (fold # …) In gnu/services.scm: 739:27 0 (_ (#< type: #…> …) …) gnu/services.scm:739:27: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): (#< type: # value: #< motd: #< name: "motd" content: "This is the GNU operating system, welcome!\n\n" references: ()> allow-empty-passwords?: #t>> #< type: # value: #t> #< type: # value: (("tty1" . "LatGrkCyr-8x16") ("tty2" . "LatGrkCyr-8x16") ("tty3" . "LatGrkCyr-8x16") ("tty4" . "LatGrkCyr-8x16") ("tty5" . "LatGrkCyr-8x16") ("tty6" . "LatGrkCyr-8x16"))> #< type: # value: #< agetty: # tty: #f term: "vt100" baud-rate: #f auto-login: #f login-program: # "/bin/login"> login-pause?: #f eight-bits?: #f no-reset?: #f remote?: #f flow-control?: #f host: #f no-issue?: #f init-string: #f no-clear?: #f local-line: #f extract-baud?: #f skip-login?: #f no-newline?: #f login-options: #f chroot: #f hangup?: #f keep-baud?: #f timeout: #f detect-case?: #f wait-cr?: #f no-hints?: #f no-hostname?: #f long-hostname?: #f erase-characters: #f kill-characters: #f chdir: #f delay: #f nice: #f extra-options: ("-L")>> #< type: # value: #< mingetty: # tty: "tty1" auto-login: #f login-program: #f login-pause?: #f>> #< type: # value: #< mingetty: # tty: "tty2" auto-login: #f login-program: #f login-pause?: #f>> #< type: # value: #< mingetty: # tty: "tty3" auto-login: #f login-program: #f login-pause?: #f>> #< type: # value: #< mingetty: # tty: "tty4" auto-login: #f login-program: #f login-pause?: #f>> #< type: # value: #< mingetty: # tty: "tty5" auto-login: #f login-program: #f login-pause?: #f>> #< type: # value: #< mingetty: # tty: "tty6" auto-login: #f login-program: #f login-pause?: #f>> #< type: # value: (#< interface: "lo" ip: "127.0.0.1" netmask: #f gateway: #f provision: (loopback) requirement: () name-servers: ()>)> #< type: # value: #< syslogd: # "/libexec/syslogd"> config-file: #< name: "syslog.conf" content: "\n # Log all error messages, authentication messages of\n # level notice or higher and anything of level err or\n # higher to the console.\n # Don't log private authentication messages!\n *.alert;auth.notice;authpriv.none /dev/console\n\n # Log anything (except mail) of level info or higher.\n # Don't log private authentication messages!\n *.info;mail.none;authpriv.none /var/log/messages\n\n # Like /var/log/messages, but also including \"debug\"-level logs.\n *.debug;mail.none;authpriv.none /var/log/debug\n\n # Same, in a different place.\n *.info;mail.none;authpriv.none /dev/tty12\n\n # The authpriv file has restricted access.\n authpriv.* /var/log/secure\n\n # Log all the mail messages in one place.\n mail.* /var/log/maillog\n" references: ()>>> #< type: # value: #f> #< type: # value: #< guix: # build-group: "guixbuild" build-accounts: 10 authorize-key?: #t authorized-keys: (#< file: "keys/guix/roquette.mug.biscuolo.net.pub" absolute: #> name: "roquette.mug.biscuolo.net.pub" recursive?: #f select?: #> #< file: "keys/guix/renaissanceFIXME.mug.biscuolo.net.pub" absolute: #> name: "renaissanceFIXME.mug.biscuolo.net.pub" recursive?: #f select?: #>) use-substitutes?: #t substitute-urls: ("https://ci.guix.gnu.org;) chroot-directories: () max-silent-time: 0 timeout: 0 log-compression: bzip2 extra-options: () log-file: "/var/log/guix-daemon.log&qu
Re: Wrong type argument in position 1 (expecting struct): #
On 5/9/19 2:55 PM, zna...@disroot.org wrote: > Hello! I try to reconfigure system with Gnome, sddm and wayland. > I also use sddm-configuration to define use wayland for greeter, but get the > error for my misconfiguration: > > # cat config.scm > ... > (services (cons* > ;(service xfce-desktop-service-type) > (service gnome-desktop-service-type) > (service dhcp-client-service-type) > (service sddm-service > (sddm-configuration > (display-server "wayland"))) > ... > ) > > # guix system reconfigure config.scm > Backtrace: > 14 (primitive-load "/root/.config/guix/current/bin/guix") > In guix/ui.scm: > 1734:12 13 (run-guix-command _ . _) > In ice-9/boot-9.scm: > 829:9 12 (catch _ _ # …) > 829:9 11 (catch _ _ # …) > In guix/scripts/system.scm: > 1301:8 10 (_) > In guix/status.scm: > 768:4 9 (call-with-status-report _ _) > In guix/scripts/system.scm: > 1159:4 8 (process-action _ _ _) > In guix/store.scm: > 623:10 7 (call-with-store _) > 1794:24 6 (run-with-store _ _ #:guile-for-build _ #:system _ # _) > In guix/scripts/system.scm: > 1175:13 5 (_ _) > 882:18 4 (perform-action reconfigure #< kerne…> …) > In gnu/system.scm: > 851:19 3 (operating-system-derivation _) > In gnu/services.scm: > 743:6 2 (instantiate-missing-services _) > In guix/combinators.scm: > 45:26 1 (fold2 # …) > In gnu/services.scm: > 733:11 0 (adjust-service-list _ (#< type: # …) …) > > gnu/services.scm:733:11: In procedure adjust-service-list: > In procedure struct_vtable: Wrong type argument in position 1 (expecting > struct): # > Please, let me know how to understand such errors. Here, I saw the same > structure > https://www.gnu.org/software/guix/manual/en/guix.html#index-sddm_002dservice (sddm-service ...) returns a service instance so you don't need to wrap it in (service ...). I think the key point to notice is it's `sddm-service` and not `sddm-service-type` - service types go in `(service ...)` as the second parameter but `service-*` functions replace the `(service ...)` call entirely. I'm not sure if there's more information you can get from the backtrace, but where it says: position 1 (expecting struct): # it's saying it wanted a struct but got `sddm-service` which is a `procedure` (function). And the last line of the trace has: 733:11 0 (adjust-service-list _ (#< type: # …) …) -- all the things make me think that it's probably looking for a struct of type . If you change it from `(service sddm-service)` to `(sddm-service (sddm-configuration))` it should work (although you might want to specify some values in sdm-configuration.
Wrong type argument in position 1 (expecting struct): #
Hello! I try to reconfigure system with Gnome, sddm and wayland. I also use sddm-configuration to define use wayland for greeter, but get the error for my misconfiguration: # cat config.scm ... (services (cons* ;(service xfce-desktop-service-type) (service gnome-desktop-service-type) (service dhcp-client-service-type) (service sddm-service (sddm-configuration (display-server "wayland"))) ... ) # guix system reconfigure config.scm Backtrace: 14 (primitive-load "/root/.config/guix/current/bin/guix") In guix/ui.scm: 1734:12 13 (run-guix-command _ . _) In ice-9/boot-9.scm: 829:9 12 (catch _ _ # …) 829:9 11 (catch _ _ # …) In guix/scripts/system.scm: 1301:8 10 (_) In guix/status.scm: 768:4 9 (call-with-status-report _ _) In guix/scripts/system.scm: 1159:4 8 (process-action _ _ _) In guix/store.scm: 623:10 7 (call-with-store _) 1794:24 6 (run-with-store _ _ #:guile-for-build _ #:system _ # _) In guix/scripts/system.scm: 1175:13 5 (_ _) 882:18 4 (perform-action reconfigure #< kerne…> …) In gnu/system.scm: 851:19 3 (operating-system-derivation _) In gnu/services.scm: 743:6 2 (instantiate-missing-services _) In guix/combinators.scm: 45:26 1 (fold2 # …) In gnu/services.scm: 733:11 0 (adjust-service-list _ (#< type: # …) …) gnu/services.scm:733:11: In procedure adjust-service-list: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): # Please, let me know how to understand such errors. Here, I saw the same structure https://www.gnu.org/software/guix/manual/en/guix.html#index-sddm_002dservice config-znavko-gnome.scm Description: Binary data