Re: this conf doesnt work. Why ?
2018-03-19 5:08 GMT+01:00 Chris Marusich: > Catonano writes: > > > (define %my-services > > (modify-services > >(cons* (gnome-desktop-service) > > (cons* > >(service agetty-service-type > > (agetty-configuration (tty "ttyS0"))) > >%desktop-services)) > >(slim-service-type config => > > (slim-configuration > >(inherit config) > >(startx (xorg-start-command > > #:configuration-file > > (xorg-configuration-file > > ;; Setup X to use a swiss german keyboard layout. > > #:extra-config > > '("Section \"InputClass\" > > Identifier \"keyboard-all\" > > Option \"XkbLayout\" \"ch\" ; <~ replace \"ch\" with \"it\" > > MatchIsKeyboard \"on\" > > EndSection" > > This looks wrong to me. If this works, I think it's only by accident. > Check out the docstring for modify-services in gnu/services.scm, which > says: > > Modify the services listed in SERVICES according to CLAUSES and return > the resulting list of services. Each clause must have the form: > > (TYPE VARIABLE => BODY) > > So, every clause after modify-services needs to have that form. This > may also be the reason why the length of your %my-services is the same > as %desktop-services. I think maybe the gnome-desktop-service and the > agetty-service-type service you've created are just being ignored > somehow. > > Does this make sense? > > -- > Chris > Yes, the version you are commenting is not current anymore ;-) I did read the manual and I wrote snippets that I experimented in a REPL The current version mostly works, my services aren't being ignored anymore The problem I'm having now is that Xorg doesn't like the configuration I'm providing it with But the Scheme code I wrote is working I'm not gonna delve into Xorg conf though. Not my thing, sorry I pasted an excerpt of the log it's giving me, anyway This is the version that is working right now (define %my-services (modify-services %desktop-services ;(slim-service-type config => ;(slim-configuration ; (inherit config) ; (startx (xorg-start-command ; #:configuration-file ; (xorg-configuration-file ;; Setup X to use a swiss german keyboard layout. ; #:extra-config ; '("Section \"InputClass\" ;Identifier \"keyboard-all\" ;Option \"XkbLayout\" \"ch\" ;MatchIsKeyboard \"on\" ;EndSection")) (gnome-desktop-service-type config => (gnome-desktop-configuration (inherit config))) (agetty-service-type config => (agetty-configuration (inherit config) (tty "ttyS0"))) (xfce-desktop-service-type config => (xfce-desktop-configuration (inherit config))) ))
Re: user password (which module ?)
2018-03-19 5:00 GMT+01:00 Chris Marusich: > Catonano writes: > > > ah crypt is in the user namespace, I mean the top level namespace, the > one > > the REPL is in when you launch it > > > > Ok, thanks anyway > > > > 2018-03-17 7:37 GMT+01:00 Catonano : > > > >> I'd like to define a password for my user in my conf.scm file > >> > >> Because I don't want to be bothered with using passwd every time > >> > >> In the manual I read that I have to use thhe Guile ""crypt" procedure > >> > >> Which module should I import in my conf file in order to se that > procedure > >> ? > >> > >> The guile manual doesn't mention it or at least I can see no mention > >> (see Top -> Guile Modules -> Posix -> Encryption) > > Did you figure this out? I think I did I have this field in my user record (password " " ab") the space " " is the password (with my defective keyboard anything else is unreasonable) and "ab" is the "seed" (I'll be damned if I now what it is) This allows my VMs to have my user already configured when I run them for the first time Too bad I still can't have my keyboard layout set in my desktop environments because Xorg roars at me when I touch its configuration :-/
Re: How to install prerelease package versions (particularly Emacs)
Oleg Pykhalovwrites: > Hello Jorge, > > "Jorge" writes: > >> I would prefer to get Emacs 26 from Guix, which would be more >> automatic and would come configured to work with Guix-installed Emacs >> packages. > > Guix package collection provides only stable package releases for the > most part. There is no reason why we cannot also provide cutting-edge versions. We do this already for some packages. For example, see any of the following packages: guix package --search=. | recsel -e 'name ~ "-(git|next|dev|devel|cvs|svn)$"' Generally, it seems the trend is that we provide such development versions as separate packages. -- Chris signature.asc Description: PGP signature
Re: this conf doesnt work. Why ?
Catonanowrites: > (define %my-services > (modify-services >(cons* (gnome-desktop-service) > (cons* >(service agetty-service-type > (agetty-configuration (tty "ttyS0"))) >%desktop-services)) >(slim-service-type config => > (slim-configuration >(inherit config) >(startx (xorg-start-command > #:configuration-file > (xorg-configuration-file > ;; Setup X to use a swiss german keyboard layout. > #:extra-config > '("Section \"InputClass\" > Identifier \"keyboard-all\" > Option \"XkbLayout\" \"ch\" ; <~ replace \"ch\" with \"it\" > MatchIsKeyboard \"on\" > EndSection" This looks wrong to me. If this works, I think it's only by accident. Check out the docstring for modify-services in gnu/services.scm, which says: Modify the services listed in SERVICES according to CLAUSES and return the resulting list of services. Each clause must have the form: (TYPE VARIABLE => BODY) So, every clause after modify-services needs to have that form. This may also be the reason why the length of your %my-services is the same as %desktop-services. I think maybe the gnome-desktop-service and the agetty-service-type service you've created are just being ignored somehow. Does this make sense? -- Chris signature.asc Description: PGP signature
Re: user password (which module ?)
Catonanowrites: > ah crypt is in the user namespace, I mean the top level namespace, the one > the REPL is in when you launch it > > Ok, thanks anyway > > 2018-03-17 7:37 GMT+01:00 Catonano : > >> I'd like to define a password for my user in my conf.scm file >> >> Because I don't want to be bothered with using passwd every time >> >> In the manual I read that I have to use thhe Guile ""crypt" procedure >> >> Which module should I import in my conf file in order to se that procedure >> ? >> >> The guile manual doesn't mention it or at least I can see no mention >> (see Top -> Guile Modules -> Posix -> Encryption) Did you figure this out? It's a little tricky. There's an example you can copy from an email I wrote long ago here (search for "crypt"): https://lists.gnu.org/archive/html/help-guix/2016-11/msg00075.html -- Chris signature.asc Description: PGP signature
Re: keyboard layout and system locale
Catonanowrites: > Can I set up the keyboard layout and my system locale (Italian) for my > Gnome desktop in my conf.scm file ? > > Otherwise I have to click around in every throaway virtual machine I create > in order to be able to use the desktop environment You may also be interested in the console-keymap-service, as mentioned in (guix) Base Services. It seems related. Also, see section (guix) Preparing for Installation, which briefly mentions "Keyboard Layout". I found these by searching the index of the Guix manual for words like "keymap" and "keyboard". I'm afraid I don't have any useful advice regarding the slim-related problems you're having, though. -- Chris signature.asc Description: PGP signature
Re: Modify system behavior after reconfigure
Jonewrites: > 2. Disable internet connection before reconfigure (in case I only need > to update system configuration, without downloading anything from If you are sure that you do not need to check for substitutes, you can also try running with --no-substitutes. However, in most situations, the overall process will be faster if you omit --no-substitutes. -- Chris signature.asc Description: PGP signature
Re: per-user Guix info pages
Calvin Heimwrites: > Hi, > > For each user, does 'guix pull' also pull in updated Info pages for > the Guix manual? I'd like to set INFOPATH accordingly so it's not > pointed at the root user's possibly outdated manual inherited from the > binary installation of the package manager. I think the answer is "no" because I do not see any info pages installed at ~/.config/guix/latest. However, I have not checked the source code. I looked at my INFOPATH, on GuixSD. It includes /run/current-system/profile/share/info, which does contain guix.info.gz. Indeed, guix is installed to my system profile, as shown by: --8<---cut here---start->8--- $ guix package -p /var/guix/profiles/system/profile --list-installed | grep guix guix0.14.0-9.bdf0c64out /gnu/store/qxwhx6f0sdkxi72kplydc0r4ba0lghri-guix-0.14.0-9.bdf0c64 --8<---cut here---end--->8--- Therefore, it seems that on my system, running "guix system reconfigure" would also update the documentation. -- Chris signature.asc Description: PGP signature
Re: keyboard layout and system locale
2018-03-18 18:58 GMT+01:00 Catonano: > > > 2018-03-17 16:01 GMT+01:00 Diego Nicola Barbato : > >> Hello Catonano >> >> Catonano writes: >> >> > Can I set up the keyboard layout and my system locale (Italian) for my >> Gnome desktop in my conf.scm file ? >> > >> > Otherwise I have to click around in every throaway virtual machine I >> create in order to be able to use the desktop environment >> > >> > Thanks >> >> To set the keyboard layout in my config.scm I replaced %desktop-services >> with this: >> >> (modify-services %desktop-services >> (slim-service-type config => >> (slim-configuration >> (inherit config) >> (startx (xorg-start-command >> #:configuration-file >> (xorg-configuration-file >>;; Setup X to use a swiss german keyboard >> layout. >>#:extra-config >>'("Section \"InputClass\" >> Identifier \"keyboard-all\" >> Option \"XkbLayout\" \"ch\" ; <~ replace \"ch\" with \"it\" >> > > Ok, the semicolon is illegal Xorg syntax and made the server crash !! > > Now something else happens > > Slim shows up properly, but after the login, the login command fails > Here's a picture > https://imgur.com/a/Ul1Ie > > And here's the suspicious part of the log that I coudl copy from teh terminal (II) config/udev: Adding input device VirtualPS/2 VMware VMMouse (/dev/input/mouse0) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device PC Speaker (/dev/input/event2) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS1) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS10) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS11) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS12) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS13) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS14) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS15) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS16) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS17) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS18) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS19) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS2) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS20) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS21) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS22) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS23) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS24) (II) No input driver specified, ignoring this device. (II) This device may have been added with another device file. (II) config/udev: Adding input device (unnamed) (/dev/ttyS25)
Re: keyboard layout and system locale
2018-03-17 16:01 GMT+01:00 Diego Nicola Barbato: > Hello Catonano > > Catonano writes: > > > Can I set up the keyboard layout and my system locale (Italian) for my > Gnome desktop in my conf.scm file ? > > > > Otherwise I have to click around in every throaway virtual machine I > create in order to be able to use the desktop environment > > > > Thanks > > To set the keyboard layout in my config.scm I replaced %desktop-services > with this: > > (modify-services %desktop-services > (slim-service-type config => > (slim-configuration > (inherit config) > (startx (xorg-start-command > #:configuration-file > (xorg-configuration-file >;; Setup X to use a swiss german keyboard > layout. >#:extra-config >'("Section \"InputClass\" > Identifier \"keyboard-all\" > Option \"XkbLayout\" \"ch\" ; <~ replace \"ch\" with \"it\" > Ok, the semicolon is illegal Xorg syntax and made the server crash !! Now something else happens Slim shows up properly, but after the login, the login command fails Here's a picture https://imgur.com/a/Ul1Ie
Re: Contributing to Package Definitions
Hi Sahithi, I’ve already replied to the email you’ve sent me earlier, so to avoid confusion, here’s the response I sent earlier: > Also imported a package definition as a test, which resulted a Scheme Code. The Scheme code is a package definition. As you can see, package definitions are not just plain data, but evaluate to a package object in Scheme. To add a package definition to Guix, you first need to fetch the source code from git and compile it: git clone https://git.savannah.gnu.org/git/guix.git You can use Guix to get an environment for compiling Guix: guix environment guix This will drop you in a sub-shell where all dependencies you need for Guix are available, so all you need to do is run “./bootstrap”, “./configure --localstatedir=/var”, and “make” (do not “make install”). Then you can modify a file under “gnu/packages” to add a new package definition. Since we already have a package definition for the “hello” package, you may want to package something else. My suggestion is to package an R package from CRAN. We have a bunch of R packages in “gnu/packages/cran.scm”, but also in “gnu/packages/statistics.scm”. You can use “guix import cran -r PACKAGE” to recursively generate package definitions for “PACKAGE” and its dependencies. You can browse the CRAN here: https://cran.r-project.org/web/packages/ I suggest using the “cran” importer because its output is usually high-quality and R packages are usually relatively simple. When adding the output to “gnu/packages/cran.scm” please check and adjust the license field (sometimes it only generates “#f” as the license, i.e. a “false” value); you will need to prefix the license with “license:” because we import the license values with that prefix (see the module definition at the very top of the file). Also make sure that the description field contains complete sentences (the CRAN descriptions often use sentence fragments). After adding the package definition, try building it with ./pre-inst-env guix build the-package The “pre-inst-env” script tells Guix to use the local source code checkout instead of the version you installed. When this works run “guix lint” on the package definition to check for errors. When you’re satisfied, please make one commit per package definition and export them as patches with “git format-patch” (e.g. “git format-patch -1” for generating a patch for the last commit). Then send the patch to “guix-patc...@gnu.org” and please put me in Cc. For the Outreachy contribution sending a single patch is sufficient. Please let me know if any of these steps is unclear. Also feel free to ask for help on the #guix IRC channel. People there might be more responsive than me if you need help at times when I’m not available. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net
Contributing to Package Definitions
Hi I am a newbie, trying to contribute to Guix. I have setup Guix on my debian Tested building a package successfully. Also imported a package definition as a test, which resulted a Scheme Code. How should i proceed further to contribute. Regards Sahithi
Re: this conf doesnt work. Why ?
something that leaves me bafffled is this (length %my-services) => 33 (length %desktop-services) => 33 Shouldn't %my-services be a bit longer ? I even pretty printed it but it's a list of records, pretty-print doesn't do wonders on it, it's not exactly easy to inspect :-/
Re: this conf doesnt work. Why ?
Than you Thorsten This is a simpler version (I gave up on thhe customized slim service :- ) and it works, the graphicl env shows up 2018-03-18 11:15 GMT+01:00 Thorsten Wilms: > > That modify-services looks very suspicious. Why the nested cons*? > I simply didn't remember how to use cons* ;-) > Aside of that, I wonder if you have to put the xorg server into either > global packages, or install it for root. ;; This is an operating system configuration template ;; for a "desktop" setup with GNOME and Xfce where the ;; root partition is encrypted with LUKS. (use-modules (gnu) (gnu system nss)) ;(use-modules (gnu packages tryton)) ;(use-modules (gnu packages databases)) ;(use-modules (gnu packages xorg)) (use-modules (gnu services xorg)) (use-service-modules desktop) (use-package-modules certs gnome) ;(use-service-modules databases) ;(use-service-modules trytond) (operating-system (host-name "antelope") (timezone "Europe/Paris") (locale "it_IT.utf8") ;;This is to be able to login into a guest system (kernel-arguments '("console=ttyS0")) ;; Assuming /dev/sdX is the target hard disk, and "my-root" ;; is the label of the target root file system. (bootloader (grub-configuration (target "/dev/sda"))) (file-systems (cons (file-system (device "my-root") (title 'label) (mount-point "/") (type "ext4") ) %base-file-systems)) (users (cons (user-account (name "catonano") (password (crypt " " "ab")) (comment "Alice's brother") (group "users") (supplementary-groups '("wheel" "netdev" "audio" "video")) (home-directory "/home/catonano")) %base-user-accounts)) ;; This is where we specify system-wide packages. (packages (cons* nss-certs ;for HTTPS access gvfs ;for user mounts ;;python-trytond ;;tryton ;;postgresql %base-packages)) ;; Add GNOME and/or Xfce---we can choose at the log-in ;; screen with F1. Use the "desktop" services, which ;; include the X11 log-in service, networking with Wicd, ;; and more. (services (cons* (service agetty-service-type (agetty-configuration (tty "ttyS0"))) (gnome-desktop-service) (xfce-desktop-service) %desktop-services)) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss))
Re: this conf doesnt work. Why ?
On 17.03.2018 21:46, Catonano wrote: the machine boots, but it doesn't start a desktop environment, SLIM doesn't come up If I login as root, startx isn't available What's wrong with this definition ? (use-modules (gnu) (gnu system nss)) (use-modules (gnu packages tryton)) (use-modules (gnu packages databases)) ;(use-modules (gnu packages xorg)) (use-modules (gnu services xorg)) You don't have to repeat the use-modules form, it can be used like this: (use-modules (gnu) (gnu system nss) (gnu packages tryton) (gnu packages databases) (gnu packages xorg)) I'm actually surprised the other way works, but noticed it appears for "Globally-Visible Packages" at: https://www.gnu.org/software/guix/manual/html_node/Using-the-Configuration-System.html (use-service-modules desktop) (use-package-modules certs gnome) ;(use-service-modules databases) ;(use-service-modules trytond) (define %my-services (modify-services (cons* (gnome-desktop-service) (cons* (service agetty-service-type (agetty-configuration (tty "ttyS0"))) %desktop-services)) (slim-service-type config => (slim-configuration (inherit config) (startx (xorg-start-command #:configuration-file (xorg-configuration-file ;; Setup X to use a swiss german keyboard layout. #:extra-config '("Section \"InputClass\" Identifier \"keyboard-all\" Option \"XkbLayout\" \"ch\" ; <~ replace \"ch\" with \"it\" MatchIsKeyboard \"on\" EndSection" Why do you use one level of indirection for no gain? This can go into services, directly. That modify-services looks very suspicious. Why the nested cons*? modify-services should be fed with one list of services, followed by (type variable => body) clauses, like in: (modify-services %desktop-services (mingetty-service-type config => (mingetty-configuration (inherit config) (motd (plain-file "motd" "Howdy FOSDEM!" (upower-service-type config => (upower-configuration (inherit config) (ignore-lid? #true) (percentage-critical 5. modify-services %desktop-services (udev-service-type config => (udev-configuration (inherit config) (rules (append (udev-configuration-rules config) (list %example-udev-rule)) Aside of that, I wonder if you have to put the xorg server into either global packages, or install it for root. (operating-system (host-name "antelope") (timezone "Europe/Paris") (locale "it_IT.utf8") ;;This is to be able to login into a guest system (kernel-arguments '("console=ttyS0")) ;; Assuming /dev/sdX is the target hard disk, and "my-root" ;; is the label of the target root file system. (bootloader (grub-configuration (target "/dev/sda"))) (file-systems (cons (file-system (device "my-root") (title 'label) (mount-point "/") (type "ext4") ) %base-file-systems)) (users (cons (user-account (name "catonano") (password (crypt " " "ab")) (comment "Alice's brother") (group "users") (supplementary-groups '("wheel" "netdev" "audio" "video")) (home-directory "/home/catonano")) %base-user-accounts)) (crypt " " "ab") looks suspicious to me, but I haven't read up on how it should be used. ;; This is where we specify system-wide packages. (packages (cons* nss-certs ;for HTTPS access gvfs ;for user mounts ;;python-trytond ;;tryton ;;postgresql %base-packages)) ;; Add GNOME and/or Xfce---we can choose at the log-in ;; screen with F1. Use the "desktop" services, which ;; include the X11 log-in service, networking with Wicd, ;; and more. (services %my-services) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss)) -- Thorsten Wilms thorwil's design for free software: http://thorwil.wordpress.com/