all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: Jone <yeger9@gmail.com>
Cc: help-guix@gnu.org
Subject: Re: Simple reconfigure
Date: Fri, 27 Apr 2018 22:01:33 -0700	[thread overview]
Message-ID: <87in8budoy.fsf@gmail.com> (raw)
In-Reply-To: 87tvrwbqxl.fsf@gmail.com

[-- Attachment #1: Type: text/plain, Size: 3348 bytes --]

Hi Jone,

Jone <yeger9@gmail.com> writes:

> Hello! If I make little changes, like such:
> was:
>
>   (users (cons (user-account
>                 (name "jone")
>                 (comment "Jone")
>                 (group "users")
>                 (supplementary-groups '("wheel" "netdev" "audio" "video"))
>                 (home-directory "/home/jone"))
>                %base-user-accounts))
>
> now:
>
>   (users (cons (user-account
>                 (name "jone")
>                 (comment "Jone")
>                 (group "users")
>                 (supplementary-groups '("wheel" "netdev" "audio" "video"))
>                 (home-directory "/home/jone"))
> 			   (user-account
> 				(name "guest")
> 				(comment "Guest")
> 				(password "guest" "something")
> 				(group "users")
> 				(supplementary-groups '("netdev" "audio" "video"))
> 				(home-directory "/home/guest"))
>                %base-user-accounts))
>
> as will be correct: just run 'guix system reconfigure' without options,
> or .. ? Can Guix only update configuration files, offline?

Suppose you have an operating system configuration file "config.scm".
In most cases, after you modify it, all you need to do is run "guix
system reconfigure config.scm" as root.  When you do that, Guix will
build a new system generation and make it current.  This includes
installing the bootloader and activating new services.  If you've added
a new user to config.scm, then Guix will create the user and its home
directory when you run "guix system reconfigure".

However, "guix system reconfigure" does not verify that you can boot
successfully into the new system generation, and it does not upgrade
services that are currently running (e.g., ssh-daemon).  Therefore, to
gain confidence in your new system generation, you might want to try
reboot after running "guix system reconfigure".  If the new system
generation boots successfully and all its services start up
successfully, then all is well.  If there is a problem, you can always
return to the previous generation by selecting it at boot time from the
bootloader menu.  Alternatively, you can invoke "guix system roll-back"
from the running system, and then reboot.

For more details, check out (guix) Invoking guix system in the manual.

By the way, in your example above, you need to use cons* instead of
cons.  You must write it like this:

  (cons* (user-account
          (name "jone")
          (comment "Jone")
          (group "users")
          (supplementary-groups '("wheel" "netdev" "audio" "video"))
          (home-directory "/home/jone"))
         (user-account
          (name "guest")
          (comment "Guest")
          (password "guest" "something")
          (group "users")
          (supplementary-groups '("netdev" "audio" "video"))
          (home-directory "/home/guest"))
         %base-user-accounts)

You can only pass two arguments to cons, but you can pass more than two
arguments to cons*.  If you use cons* here, it will return a list that
contains a user account for Jone, a user account for Guest, and all the
user accounts that appear in %base-user-accounts.  For more information,
please refer to the sections titled "Pairs" and "List Constructors" in
the Guile manual.

I hope that helps!

-- 
Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2018-04-28  5:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27 15:38 Simple reconfigure Jone
2018-04-28  5:01 ` Chris Marusich [this message]
2018-04-28 18:39   ` Jone
2018-04-28 20:11     ` Chris Marusich
2018-04-28 21:35       ` myglc2
2018-04-29  3:23         ` Chris Marusich
2018-04-29  3:27         ` Arun Isaac
2018-04-29  6:39           ` Pierre Neidhardt
2018-04-30 13:05           ` Ludovic Courtès
2018-04-29  6:37       ` Pierre Neidhardt
2018-04-29  6:40         ` Pierre Neidhardt

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=87in8budoy.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=yeger9@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.