From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: Services and packages in GuixSD Date: Sun, 09 Aug 2015 18:58:33 +0200 Message-ID: <87lhdkpfeu.fsf@igalia.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOTwM-00027j-D6 for guix-devel@gnu.org; Sun, 09 Aug 2015 12:59:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOTwJ-0004nY-7T for guix-devel@gnu.org; Sun, 09 Aug 2015 12:59:18 -0400 Received: from pb-sasl1.int.icgroup.com ([208.72.237.25]:50106 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOTwJ-0004V2-3B for guix-devel@gnu.org; Sun, 09 Aug 2015 12:59:15 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id F171C64FEE for ; Sun, 9 Aug 2015 12:58:36 -0400 (EDT) Received: from pb-sasl1.int.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id E9C4364FED for ; Sun, 9 Aug 2015 12:58:36 -0400 (EDT) Received: from rusty (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 19C3964FEC for ; Sun, 9 Aug 2015 12:58:35 -0400 (EDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Hi, There are a few services whose behavior depends on the set of installed packages or services, or which should depend on those sets. For example with %desktop-services specified, udev should be adding rules for upower and colord, AFAIU. Likewise for dbus: it would be nice if the set of selected packages and services were grovelled for dbus files. For example this is my current services definition: (services (let ((motd (text-file "motd" " This is the GNU operating system, welcome!\n\n"))) (list (console-font-service "tty1") (console-font-service "tty2") (console-font-service "tty3") (console-font-service "tty4") (console-font-service "tty5") (console-font-service "tty6") (mingetty-service "tty1" #:motd motd) (mingetty-service "tty2" #:motd motd) (mingetty-service "tty3" #:motd motd) (mingetty-service "tty4" #:motd motd) (mingetty-service "tty5" #:motd motd) (mingetty-service "tty6" #:motd motd) (static-networking-service "lo" "127.0.0.1" #:provision '(loopback)) (syslog-service) (guix-service) (nscd-service #:name-services (list nss-mdns)) (slim-service) (lsh-service) (wicd-service) (avahi-service) (dbus-service (list avahi wicd upower colord geoclue polkit)) (upower-service) ;; FIXME: Can be bus-activated; just need to make the config ;; and the user. (geoclue-service) ;; FIXME: Doesn't need to be run at startup; can be activated ;; via dbus. However we do it here in order to create ;; /var/lib/colord. (colord-service) ;; FIXME: Can be bus-activated; just need to make the user. (polkit-service) ;; The LVM2 rules are needed as soon as LVM2 or the ;; device-mapper is used, so enable them by default. The FUSE ;; and ALSA rules are less critical, but handy. (udev-service #:rules (list lvm2 fuse alsa-utils upower colord))))) I can't switch to use %base-services or %desktop-services because of the udev-service and dbus-service configurations. That's the bug I'm trying to solve here. Would it be possible to allow services to grovel the set of installed packages and services to "finalize" their configuration? We might have to take care to avoid service configuration depending on service configuration, but I reckon that's possible to take into account. Regards, Andy