Re: guix system disk-image: preset user profiles (packages & arbitrary data)

2018-06-28 Thread Pierre Neidhardt

Ludovic Courtès  writes:

> There are two things we could do:
>
>   • Add an option to make the root file system persistent (easy).
>
>   • Add an option to allow users to specify additional partitions in the
> disk image (which would be writable).  If you look at ‘qemu-image’
> in (gnu system vm), you’ll see there’s already a list of partitions
> there, and this is what needs to be modified.
>
> My preference goes to the second option; it’s a bit more work, but it’s
> not too hard.

With option 2, you mean that we could add new writable partitions, but
_also_ make the root partition writable, right?

It seems to be the most straightforward approach to me.
How else would you attack option 1?

Alternatively, isn't all this exactly the same as installing directly
onto a USB drive, following the regular installation procedure?
Namely


 herd start cow-store /mnt
 guix system init /my/usb/config.scm /mnt 

-- 
Pierre Neidhardt


signature.asc
Description: PGP signature


Re: guix system disk-image: preset user profiles (packages & arbitrary data)

2018-06-26 Thread Pierre Neidhardt
Great, thanks for the insights.
I'll work on it when I find time then!

-- 
Pierre Neidhardt

Spectacularism:
A fascination with extreme situations.
-- Douglas Coupland, "Generation X: Tales for an Accelerated
   Culture"


signature.asc
Description: PGP signature


Re: guix system disk-image: preset user profiles (packages & arbitrary data)

2018-06-26 Thread Ludovic Courtès
Hello Pierre,

Pierre Neidhardt  skribis:

> I'd like to built a live disk-image for a USB stick I carry around with
> me.  Booting it would result in the exact configuration I have on my
> machine.

FWIW I did that a year or two ago with hacky modifications to the code.
It would be nice to make it accessible through the command-line
interface and API.

> I'm also wondering now if the USB stick is writable.  That would solve
> it then.

As you found out, ‘disk-image’ creates a “volatile” image, where the
root file system is mounted read-only, with a writable overlayfs on top
of it.  The main use case for this is the installation image where you
want to make sure you’re not going to modify what’s on the USB disk.

There are two things we could do:

  • Add an option to make the root file system persistent (easy).

  • Add an option to allow users to specify additional partitions in the
disk image (which would be writable).  If you look at ‘qemu-image’
in (gnu system vm), you’ll see there’s already a list of partitions
there, and this is what needs to be modified.

My preference goes to the second option; it’s a bit more work, but it’s
not too hard.

HTH!

Ludo’.



Re: guix system disk-image: preset user profiles (packages & arbitrary data)

2018-06-25 Thread Pierre Neidhardt
I had time to try out today: the changes made on a Live USB don't persist 
across reboots.
Which seems strange considering / is mounted read-write ("rw").
Any idea?

-- 
Pierre Neidhardt

Never forget what a man says to you when he is angry.


signature.asc
Description: PGP signature


guix system disk-image: preset user profiles (packages & arbitrary data)

2018-06-23 Thread Pierre Neidhardt

Hi there,

I'd like to built a live disk-image for a USB stick I carry around with
me.  Booting it would result in the exact configuration I have on my
machine.

I can create a disk image with:

> guix system disk-image ~/.guix-config/config.scm

Then boot the live and set up my user profile as follows:

--8<---cut here---start->8---
## First retrieve my GPG keys.
## Then retrieve my dotfiles:
> git clone https://
## Custom script to install the dotfiles and install the Guix packages.
> ./dotfiles/.local/bin/homeinit
## Log out and in again.
--8<---cut here---end--->8---

Ideally I'd rather spare those few steps on each reboot, so I'd like to
create a disk image containing a user profile that comes with a
selection of packages and some arbitrary data (my dotfiles).

I wonder if it's doable from an operating system declaration.

I'm also wondering now if the USB stick is writable.  That would solve
it then.

Any insight?

--
Pierre Neidhardt


signature.asc
Description: PGP signature