guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: First guix impressions


From: Ludovic Courtès
Subject: Re: First guix impressions
Date: Sat, 26 Sep 2015 15:39:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

宋文武 <address@hidden> skribis:

> address@hidden 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 ‘root’ can run something like this:

  guix package -p /run/current-system/profile -i emacs

This will add Emacs to the “global” profile–i.e., the set of packages
visible to all users.

However, I wouldn’t recommend it, because such changes will be undoed
upon the next ‘reconfigure’.

>> 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 ‘guix system reconfigure’ wouldn’t be more expensive than ‘guix
package -i’, 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 
> 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:

  • 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.

  • 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 ‘operating-system’ declaration:

      
http://www.gnu.org/software/guix/manual/html_node/Using-the-Configuration-System.html

    The fact that GuixSD manages these configuration files for you means
    that (1) a single ‘operating-system’ declaration very precisely
    specifies the system’s configuration, and (2) you can roll-back to a
    previous configuration via the entries that GuixSD adds to GRUB’s
    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:
>
> <http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/fish.scm>

Yes that’s fine, but only for packages that are not system services.
For system services, I think we must insist on having configuration
happen in the ‘operating-system’ declaration.

Thanks, and welcome!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]