* Simple reconfigure
@ 2018-04-27 15:38 Jone
2018-04-28 5:01 ` Chris Marusich
0 siblings, 1 reply; 11+ messages in thread
From: Jone @ 2018-04-27 15:38 UTC (permalink / raw)
To: help-guix
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?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Simple reconfigure
2018-04-27 15:38 Simple reconfigure Jone
@ 2018-04-28 5:01 ` Chris Marusich
2018-04-28 18:39 ` Jone
0 siblings, 1 reply; 11+ messages in thread
From: Chris Marusich @ 2018-04-28 5:01 UTC (permalink / raw)
To: Jone; +Cc: help-guix
[-- 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 --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Simple reconfigure
2018-04-28 5:01 ` Chris Marusich
@ 2018-04-28 18:39 ` Jone
2018-04-28 20:11 ` Chris Marusich
0 siblings, 1 reply; 11+ messages in thread
From: Jone @ 2018-04-28 18:39 UTC (permalink / raw)
To: Chris Marusich; +Cc: help-guix
Don't refer to manual, please - it does not answer practical
questions. Why do you think there are so few packages? - and no one
knows how to build them! I tried, and of course I did not succeed. For
example, when I write to elisp, I guess by context how and what I should
do next. And a powerful contextual help system is also very helpful.
I have many practical questions - I use this distribution on real
hardware, as the main system. I like Lisp, but I'm just a user, not a
hacker..
About 'cons' and 'cons*' - okay, let's see in the manual. Examples,
examples, examples, more examples! ;) That would be great.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Simple reconfigure
2018-04-28 18:39 ` Jone
@ 2018-04-28 20:11 ` Chris Marusich
2018-04-28 21:35 ` myglc2
2018-04-29 6:37 ` Pierre Neidhardt
0 siblings, 2 replies; 11+ messages in thread
From: Chris Marusich @ 2018-04-28 20:11 UTC (permalink / raw)
To: Jone; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 2119 bytes --]
Jone <yeger9@gmail.com> writes:
> Don't refer to manual, please - it does not answer practical
> questions. Why do you think there are so few packages? - and no one
> knows how to build them! I tried, and of course I did not succeed. For
> example, when I write to elisp, I guess by context how and what I should
> do next. And a powerful contextual help system is also very helpful.
>
> I have many practical questions - I use this distribution on real
> hardware, as the main system. I like Lisp, but I'm just a user, not a
> hacker..
Inside every user is a hacker waiting to be set free! ;-)
I hear what you're saying about the manual. It does show examples for
many things, though. In this case, what sort of example were you hoping
to find? Maybe we can add or improve an example that would have helped
you (and others who might have the same questions). Feedback like this
is very important, so thank you for taking the time to bring it up!
> About 'cons' and 'cons*' - okay, let's see in the manual. Examples,
> examples, examples, more examples! ;) That would be great.
There are lots of tutorials to Scheme on the internet. The Guile manual
is pretty good at introducing concepts, but I have had to look elsewhere
to improve my understanding of some topics. When in doubt, an Internet
search with "scheme" in the keyword list will probably turn up some
useful articles.
When I was starting out, I began by reading Structure and Interpretation
of Computer Programs, which is a very thoughtful introduction to scheme.
It's also an introduction to some fundamental concepts of computer
programming. It's worth a try, if you're feeling curious. Since it's
licensed under a free license, you can even find a copy of it in Guix!
guix package -i sicp
# View it with the stand-alone Info reader.
info sicp
# Or, view it in a web browser, like icecat.
icecat $HOME/.guix-profile/share/doc/sicp/html/index.xhtml
I feel your pain, but hang in there! It gets easier as you become more
familiar with Guix and with scheme. Happy hacking!
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Simple reconfigure
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:37 ` Pierre Neidhardt
1 sibling, 2 replies; 11+ messages in thread
From: myglc2 @ 2018-04-28 21:35 UTC (permalink / raw)
To: Chris Marusich; +Cc: help-guix
On 04/28/2018 at 13:11 Chris Marusich writes:
Hi Jone, thanks for these comments.
> Jone <yeger9@gmail.com> writes:
>
>> About 'cons' and 'cons*' - okay, let's see in the manual. Examples,
>> examples, examples, more examples! ;) That would be great.
ISTM the doc sets "cons traps" for new users. e.g.,
6.2.1 Using the Configuration System
...
(file-systems (cons (file-system
(device "my-root")
...
(users (cons (user-account
(name "alice")
...
I call these "cons traps" because the first thing our new user may do is
add a file system or user and be greeted by a scheme error ...
Wrong number of arguments to #<procedure cons (_ _)>
WDYT of replacing all these uses of cons with cons*? - George
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Simple reconfigure
2018-04-28 21:35 ` myglc2
@ 2018-04-29 3:23 ` Chris Marusich
2018-04-29 3:27 ` Arun Isaac
1 sibling, 0 replies; 11+ messages in thread
From: Chris Marusich @ 2018-04-29 3:23 UTC (permalink / raw)
To: myglc2; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]
myglc2@gmail.com writes:
> ISTM the doc sets "cons traps" for new users. e.g.,
>
> 6.2.1 Using the Configuration System
> ...
> (file-systems (cons (file-system
> (device "my-root")
> ...
> (users (cons (user-account
> (name "alice")
> ...
>
> I call these "cons traps" because the first thing our new user may do is
> add a file system or user and be greeted by a scheme error ...
>
> Wrong number of arguments to #<procedure cons (_ _)>
>
> WDYT of replacing all these uses of cons with cons*? - George
The schemer in me wants to say, "But cons is simpler, and if they don't
yet know what cons is, then now is a good time to learn!" But the new
user in me remembers stumbling over the same problem in the beginning,
too.
New users are quickly going to need to learn about "cons" and "cons*"
and even more schemey things if they want to start hacking on their
system using Guix. However, if we can reduce the number of surprises by
avoiding these "cons traps" (cute term, by the way!) in our
documentation's examples, I agree it would probably give new users a
better experience.
If others agree it's a good idea (or I hear no complaints), I'd be happy
to scan the docs for "cons traps" and similar issues in our
documentation's examples, and change them to be a little more robust.
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Simple reconfigure
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
1 sibling, 2 replies; 11+ messages in thread
From: Arun Isaac @ 2018-04-29 3:27 UTC (permalink / raw)
To: myglc2, Chris Marusich; +Cc: help-guix
myglc2@gmail.com writes:
> I call these "cons traps" because the first thing our new user may do is
> add a file system or user and be greeted by a scheme error ...
>
> Wrong number of arguments to #<procedure cons (_ _)>
>
> WDYT of replacing all these uses of cons with cons*? - George
I think we should use append and list instead of cons or cons*. The
meaning of append is more self-evident to someone new to lisp. Why not
avoid cons just like we already avoid car, cdr, etc.?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Simple reconfigure
2018-04-28 20:11 ` Chris Marusich
2018-04-28 21:35 ` myglc2
@ 2018-04-29 6:37 ` Pierre Neidhardt
2018-04-29 6:40 ` Pierre Neidhardt
1 sibling, 1 reply; 11+ messages in thread
From: Pierre Neidhardt @ 2018-04-29 6:37 UTC (permalink / raw)
To: Chris Marusich; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 513 bytes --]
Chris Marusich <cmmarusich@gmail.com> writes:
> It's worth a try, if you're feeling curious. Since it's
> licensed under a free license, you can even find a copy of it in Guix!
>
> guix package -i sicp
> # View it with the stand-alone Info reader.
> info sicp
> # Or, view it in a web browser, like icecat.
> icecat $HOME/.guix-profile/share/doc/sicp/html/index.xhtml
Didn't know that, it's awesome! :)
--
Pierre Neidhardt
Show respect for age. Drink good Scotch for a change.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Simple reconfigure
2018-04-29 3:27 ` Arun Isaac
@ 2018-04-29 6:39 ` Pierre Neidhardt
2018-04-30 13:05 ` Ludovic Courtès
1 sibling, 0 replies; 11+ messages in thread
From: Pierre Neidhardt @ 2018-04-29 6:39 UTC (permalink / raw)
To: Arun Isaac; +Cc: myglc2, help-guix
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
Arun Isaac <arunisaac@systemreboot.net> writes:
>> WDYT of replacing all these uses of cons with cons*? - George
>
> I think we should use append and list instead of cons or cons*. The
> meaning of append is more self-evident to someone new to lisp. Why not
> avoid cons just like we already avoid car, cdr, etc.?
I think it's a good idea.
--
Pierre Neidhardt
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Simple reconfigure
2018-04-29 6:37 ` Pierre Neidhardt
@ 2018-04-29 6:40 ` Pierre Neidhardt
0 siblings, 0 replies; 11+ messages in thread
From: Pierre Neidhardt @ 2018-04-29 6:40 UTC (permalink / raw)
To: Chris Marusich; +Cc: help-guix
[-- Attachment #1: Type: text/plain, Size: 726 bytes --]
Pierre Neidhardt <ambrevar@gmail.com> writes:
> Chris Marusich <cmmarusich@gmail.com> writes:
>
>> It's worth a try, if you're feeling curious. Since it's
>> licensed under a free license, you can even find a copy of it in Guix!
>>
>> guix package -i sicp
>> # View it with the stand-alone Info reader.
>> info sicp
>> # Or, view it in a web browser, like icecat.
>> icecat $HOME/.guix-profile/share/doc/sicp/html/index.xhtml
>
> Didn't know that, it's awesome! :)
I think it would be worth mentioning in the introduction of the Guix manual.
--
Pierre Neidhardt
Endless Loop, n.:
see Loop, Endless.
Loop, Endless, n.:
see Endless Loop.
-- Random Shack Data Processing Dictionary
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Simple reconfigure
2018-04-29 3:27 ` Arun Isaac
2018-04-29 6:39 ` Pierre Neidhardt
@ 2018-04-30 13:05 ` Ludovic Courtès
1 sibling, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2018-04-30 13:05 UTC (permalink / raw)
To: Arun Isaac; +Cc: myglc2, help-guix
Arun Isaac <arunisaac@systemreboot.net> skribis:
> myglc2@gmail.com writes:
>
>> I call these "cons traps" because the first thing our new user may do is
>> add a file system or user and be greeted by a scheme error ...
>>
>> Wrong number of arguments to #<procedure cons (_ _)>
>>
>> WDYT of replacing all these uses of cons with cons*? - George
>
> I think we should use append and list instead of cons or cons*. The
> meaning of append is more self-evident to someone new to lisp. Why not
> avoid cons just like we already avoid car, cdr, etc.?
Yeah I agree.
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-04-30 13:06 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-27 15:38 Simple reconfigure Jone
2018-04-28 5:01 ` Chris Marusich
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
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.