From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: First guix impressions Date: Sat, 26 Sep 2015 15:39:30 +0200 Message-ID: <87y4ft1er1.fsf@gnu.org> References: <2e2ee8b4a357b09ec06a2025e54676f4@openmailbox.org> <87d1x54l37.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfphP-0007wG-4f for guix-devel@gnu.org; Sat, 26 Sep 2015 09:39:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfphM-0002EK-VI for guix-devel@gnu.org; Sat, 26 Sep 2015 09:39:34 -0400 In-Reply-To: <87d1x54l37.fsf@gmail.com> (=?utf-8?B?IuWui+aWh+atpiIncw==?= message of "Sat, 26 Sep 2015 16:54:20 +0800") 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: =?utf-8?B?5a6L5paH5q2m?= Cc: guix-devel@gnu.org =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > goglosh@openmailbox.org writes: [...] >> Alright, first the good things. I really liked the fact that you can >> instantiate system configurations (as in `guix system reconfigure`) >> and also that regular users can build up their environment and that it >> is quite 'safe', system-wise. There is one thing that should probably >> change, though. When I install a package using root, I usuallly expect >> the package to be available system-wide, so that any user has access >> to it. This would make it easier to install a package just once for >> all users. After all, that's the purpose of root, rather than as a >> user in it's own right (at least, that's how I see it). > I agree the root user is special and having a global packages set > managed by root sounds reasonable. I never tried, but =E2=80=98root=E2=80=99 can run something like this: guix package -p /run/current-system/profile -i emacs This will add Emacs to the =E2=80=9Cglobal=E2=80=9D profile=E2=80=93i.e., t= he set of packages visible to all users. However, I wouldn=E2=80=99t recommend it, because such changes will be undo= ed upon the next =E2=80=98reconfigure=E2=80=99. >> I know this can be done with a system declaration. But of course, >> there is a difference between setting up a whole system and putting up >> a package. > Yes, maybe reconfigure the whole system is too expensive. > Currently, I think we can add 'source /root/.guix-profile/etc/profile' > to '~/.bash_profile' for users who want this behavior. Or add it to > '/etc/profile' for all users. Ideally =E2=80=98guix system reconfigure=E2=80=99 wouldn=E2=80=99t be more = expensive than =E2=80=98guix package -i=E2=80=99, but yeah. >> Another astonishing (and confusing) feature, which, think of it, is >> sort of a consequence of the previous issue, is the lack of a global >> configuration directory. Sure, there is /etc/, but, at least in my >> case, setting up /etc/slim.config (a concrete example of course) would >> just get ignored. > The intention is to use guix manage those files by services, so for=20 > example, you can add a '(slim-service #:auto-login? #t)' to the system > configuration for slim which is auto login. The parameters for services > is (should be) well documented and cover most usage, so we don't have to > learn the specified config syntax for every packages. I think there are two cases: =E2=80=A2 Applications for unprivileged users, such as Emacs, GIMP, Mutt, etc. For these, you can just use ~/.emacs and similar dot files in your home directory, as you would do on another distro. No difference here. =E2=80=A2 System services such as SLiM, udev, the SSH server, etc. Here = we assume that everything that pertains to these services is managed by GuixSD, via the configuration file. So instead of modifying, say, /etc/slim.conf or /etc/sshd.conf, you would simply pass the right configuration parameters to the service procedures in the =E2=80=98operating-system=E2=80=99 declaration: http://www.gnu.org/software/guix/manual/html_node/Using-the-Configura= tion-System.html The fact that GuixSD manages these configuration files for you means that (1) a single =E2=80=98operating-system=E2=80=99 declaration very p= recisely specifies the system=E2=80=99s configuration, and (2) you can roll-back= to a previous configuration via the entries that GuixSD adds to GRUB=E2=80= =99s menu. > But I agree most packages should use '/etc' as default sysconfdir > instead of an etc in the store, so that if we don't use services to > manage them, they can still configure by root. In practice, this > need to be handled per-package in its recipe. See 'fish' for an example: > > Yes that=E2=80=99s fine, but only for packages that are not system services. For system services, I think we must insist on having configuration happen in the =E2=80=98operating-system=E2=80=99 declaration. Thanks, and welcome! Ludo=E2=80=99.