Re: Seeking working, complete example for a vm

2016-11-02 Thread myglc2

On 11/02/2016 at 22:15 Hartmut Goebel writes:

> Am 31.10.2016 um 19:18 schrieb myglc2:
>> In an effort to reply to your request for a "working, complete example,"
>> I attach the hackage that I use to manage the care and feeding of
>> LAN-visible GuixSD VM images running on a headless GuixSD server.
>
> Thanks for sharing this. And how to you manage the images? I mean: how
> to you toll your GuixSD server to forward packages to the images?

You are very welcome ;-)

I ssh or mosh into a VM and use 'guix pull' and/or 'guix package' and/or
'guix system reconfigure' to manage it. Alternatively, I replace it with
a whole new VM.

The type of "guest" VMs created by this script using 'guix system
vm-image' are "free-standing." They are fully independent of the "host"
machine's configuration/store and should run (not tested) on any host OS
supporting qemu/kvm (probably with mods to the qemu and TAP
parameters). So the only "synergy" between the host machine and guest
VMs is that VM creation goes more quickly if a "similar" VM has been
previously created and/or packages used by the VM have been previously
installed.

AIUI, if you instead use guest VMs created using 'guix system vm' you
gain the advantage of sharing the store and, if you like, other
files. So such VMs are smaller and are created and loaded more
quickly. AIUI, this means that, if you have already installed a package
on the host and/or another guest VM, subsequent installations on other
guest VMs and/or the host machine will "re-use" that package from the
host machine's store and thus go faster.

AFAIK, there is no way to automatically "forward packages" to either
type of Guix VM (hopefully others will correct me if this is wrong).

HTH, - George



Re: Seeking working, complete example for a vm

2016-11-02 Thread Hartmut Goebel
Am 29.10.2016 um 01:57 schrieb Ludovic Courtès:
> [... some tipps ...]

Thanks a lot. I was able to get a machine up and running and access it.

> Maybe we could move the note in
> 
> higher, in the description of the ‘vm’ sub-command?

I've put "reworking the guix system manual part" on my todo list. I'm
afraid, this will not happen soon, tough.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: Working example needed to extend tor-service with file-like object

2016-11-02 Thread ng0
l...@gnu.org (Ludovic Courtès) writes:

> ng0  skribis:
>
>> Our default config (torrc) is not so pleasant (well, it's
>> intentional minimal). I have torrc values, unrelated to
>> hidden-service, I need to add. Like, exclude certain countries
>> etc. For this I want to understand how a file-like object would
>> look like in the context of (services) in config.scm, so I can be
>> sure I apply the correct thing.
>
> Oh, well:
>
>   (tor-service (plain-file "tor.conf" "OptionOne Foo\nOptionTwo Bar\n“))
>
> or:
>
>   (tor-service (local-file "../my-tor.conf"))
>
> HTH,
> Ludo’.
>

Oh! So I am thinking way too complicated in how things are
supposed to be written. Damn...

Many thanks!



Re: Working example needed to extend tor-service with file-like object

2016-11-02 Thread Ludovic Courtès
ng0  skribis:

> Our default config (torrc) is not so pleasant (well, it's
> intentional minimal). I have torrc values, unrelated to
> hidden-service, I need to add. Like, exclude certain countries
> etc. For this I want to understand how a file-like object would
> look like in the context of (services) in config.scm, so I can be
> sure I apply the correct thing.

Oh, well:

  (tor-service (plain-file "tor.conf" "OptionOne Foo\nOptionTwo Bar\n“))

or:

  (tor-service (local-file "../my-tor.conf"))

HTH,
Ludo’.



Re: Working example needed to extend tor-service with file-like object

2016-11-02 Thread ng0
Hi,

l...@gnu.org (Ludovic Courtès) writes:

> Hi!
>
> ng0  skribis:
>
>> Can someone give a working example for the tor-service?
>> I volunteer to improve the documentation if I can get something
>> out of this.
>
> I have something like this:

Thanks, but there's a misunderstanding in terms what I needed
help with I think.

Our default config (torrc) is not so pleasant (well, it's
intentional minimal). I have torrc values, unrelated to
hidden-service, I need to add. Like, exclude certain countries
etc. For this I want to understand how a file-like object would
look like in the context of (services) in config.scm, so I can be
sure I apply the correct thing.

>   (services (cons* (lsh-service #:root-login? #t
> #:interfaces '("127.0.0.1"))
>
>(tor-hidden-service "ssh"
>'((22 "127.0.0.1:22")
>  (80 "127.0.0.1:80")))
>…))
>
> That makes a hidden service to talk to my SSH and HTTP services.
>
> HTH!
>
> Ludo’.
>



Re: Working example needed to extend tor-service with file-like object

2016-11-02 Thread Ludovic Courtès
Hi!

ng0  skribis:

> Can someone give a working example for the tor-service?
> I volunteer to improve the documentation if I can get something
> out of this.

I have something like this:

  (services (cons* (lsh-service #:root-login? #t
#:interfaces '("127.0.0.1"))

   (tor-hidden-service "ssh"
   '((22 "127.0.0.1:22")
 (80 "127.0.0.1:80")))
   …))

That makes a hidden service to talk to my SSH and HTTP services.

HTH!

Ludo’.