all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: 宋文武 <iyzsong@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: First guix impressions
Date: Sat, 26 Sep 2015 15:39:30 +0200	[thread overview]
Message-ID: <87y4ft1er1.fsf@gnu.org> (raw)
In-Reply-To: <87d1x54l37.fsf@gmail.com> ("宋文武"'s message of "Sat, 26 Sep 2015 16:54:20 +0800")

宋文武 <iyzsong@gmail.com> 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 ‘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	other threads:[~2015-09-26 13:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25 18:50 First guix impressions goglosh
2015-09-26  8:54 ` 宋文武
2015-09-26 13:39   ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4ft1er1.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=iyzsong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.