all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to add custom channels to ISO
@ 2021-07-28 16:00 phodina via
  2021-07-30 16:15 ` Elais Player
  0 siblings, 1 reply; 4+ messages in thread
From: phodina via @ 2021-07-28 16:00 UTC (permalink / raw)
  To: help-guix

Hello,

I'm migrating to a newer machine and I'm taking my GuixSD configuration with me.

So the first logical step I did was to create an ISO image based on this section [1]. As I use my custom channel with modified packages I added them to the configuration to make them available on the new machine.

Or so I thought. I booted and partitioned the new machine then ran
guix system init /root/configurations.scm /mnt to install Guix there.

However, after reboot turns out that the packages are not from my channel but from public Guix repository without modifications.

Therefore my question is if it's possible to specify also channels in the configuration file so that they are used during installation?

Reading the manual I came to a nice command guix system describe [2] which gives me the current configuration with the channels. Could that be used to build an ISO which would then also know about the additional channels?
Kind regards
Petr

[1]: https://guix.gnu.org/manual/en/html_node/Building-the-Installation-Image.html
[2]: https://guix.gnu.org/manual/en/guix.html#Invoking-guix-describe

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to add custom channels to ISO
  2021-07-28 16:00 How to add custom channels to ISO phodina via
@ 2021-07-30 16:15 ` Elais Player
  2021-08-03 20:12   ` phodina
  0 siblings, 1 reply; 4+ messages in thread
From: Elais Player @ 2021-07-30 16:15 UTC (permalink / raw)
  To: phodina; +Cc: help-guix


You could add the custom channels file as an 
=extra-special-file=[1] in the =os-configuration=.

It would look something like this:

#+BEGIN_SRC scheme
(define %my-installation-os
  (operating-system
    (inherit installation-os)
    (services
     (cons*
      (extra-special-file
        "/etc/guix/channels.scm"
        (local-file "/path/to/my/channels.scm"))
      (operating-system-services installation-os)))))
#+END_SRC

Plus side is you now have a global channels file from which all 
you need to do is run =guix pull= to have all your channels up to 
date. You may also want to pin those channels to certain commits 
just in case. Down side is running =guix pull= will start filling 
up your disk or memory on an ISO and you can easily run out of 
space. (I would advise not running =guix pull= until after 
partitioning and setting up the target system), and this file will 
be added to the store (but if you're creating a channels file in 
=/etc= shouldn't matter honestly).

phodina via <help-guix@gnu.org> writes:

> Hello,
>
> I'm migrating to a newer machine and I'm taking my GuixSD 
> configuration with me.
>
> So the first logical step I did was to create an ISO image based 
> on this section [1]. As I use my custom channel with modified 
> packages I added them to the configuration to make them 
> available on the new machine.
>
> Or so I thought. I booted and partitioned the new machine then 
> ran
> guix system init /root/configurations.scm /mnt to install Guix 
> there.
>
> However, after reboot turns out that the packages are not from 
> my channel but from public Guix repository without 
> modifications.
>
> Therefore my question is if it's possible to specify also 
> channels in the configuration file so that they are used during 
> installation?
>
> Reading the manual I came to a nice command guix system describe 
> [2] which gives me the current configuration with the 
> channels. Could that be used to build an ISO which would then 
> also know about the additional channels?
> Kind regards
> Petr
>
> [1]: 
> https://guix.gnu.org/manual/en/html_node/Building-the-Installation-Image.html
> [2]: 
> https://guix.gnu.org/manual/en/guix.html#Invoking-guix-describe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to add custom channels to ISO
  2021-07-30 16:15 ` Elais Player
@ 2021-08-03 20:12   ` phodina
  2021-08-03 20:41     ` Elais Player
  0 siblings, 1 reply; 4+ messages in thread
From: phodina @ 2021-08-03 20:12 UTC (permalink / raw)
  To: help-guix; +Cc: Elais Player

Thanks Elais. This is exactly what I need.

Also you're right regarding the ISO running out of space (memory) as I ran =guix pull= once before the store was setup and mounted on the target system.

Also pinning the channels is useful to get "identical" os installed across the machines.

This might be a neat code excerpt and note in the manual perhaps. Would you agree?

Of course, once the system is setup then there is =guix deploy=.




‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Friday, July 30th, 2021 at 6:15 PM, Elais Player <elais@fastmail.com> wrote:

> You could add the custom channels file as an
>
> =extra-special-file=1 in the =os-configuration=.
>
> It would look something like this:
>
> #+BEGIN_SRC scheme
>
> (define %my-installation-os
>
> (operating-system
>
> (inherit installation-os)
>
> (services
>
> (cons*
>
> (extra-special-file
>
> "/etc/guix/channels.scm"
>
> (local-file "/path/to/my/channels.scm"))
>
> (operating-system-services installation-os)))))
>
> #+END_SRC
>
> Plus side is you now have a global channels file from which all
>
> you need to do is run =guix pull= to have all your channels up to
>
> date. You may also want to pin those channels to certain commits
>
> just in case. Down side is running =guix pull= will start filling
>
> up your disk or memory on an ISO and you can easily run out of
>
> space. (I would advise not running =guix pull= until after
>
> partitioning and setting up the target system), and this file will
>
> be added to the store (but if you're creating a channels file in
>
> =/etc= shouldn't matter honestly).
>
> phodina via help-guix@gnu.org writes:
>
> > Hello,
> >
> > I'm migrating to a newer machine and I'm taking my GuixSD
> >
> > configuration with me.
> >
> > So the first logical step I did was to create an ISO image based
> >
> > on this section 1. As I use my custom channel with modified
> >
> > packages I added them to the configuration to make them
> >
> > available on the new machine.
> >
> > Or so I thought. I booted and partitioned the new machine then
> >
> > ran
> >
> > guix system init /root/configurations.scm /mnt to install Guix
> >
> > there.
> >
> > However, after reboot turns out that the packages are not from
> >
> > my channel but from public Guix repository without
> >
> > modifications.
> >
> > Therefore my question is if it's possible to specify also
> >
> > channels in the configuration file so that they are used during
> >
> > installation?
> >
> > Reading the manual I came to a nice command guix system describe
> >
> > 2 which gives me the current configuration with the
> >
> > channels. Could that be used to build an ISO which would then
> >
> > also know about the additional channels?
> >
> > Kind regards
> >
> > Petr


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to add custom channels to ISO
  2021-08-03 20:12   ` phodina
@ 2021-08-03 20:41     ` Elais Player
  0 siblings, 0 replies; 4+ messages in thread
From: Elais Player @ 2021-08-03 20:41 UTC (permalink / raw)
  To: phodina; +Cc: help-guix


I don't know if it's something that should be put in the manual 
because I'm not really sure about the security implications of 
adding the channels file to the store. Though honestly I think its 
a neat solution because doing things this way you don't even have 
to create a =channels.scm= file. You can use the =scheme-file= 
procedure to just embed scheme code in a file like object and 
deliver it to the destination. Also when I asked on the IRC [1] 
ludo raised some concerns because there may be some issues with 
creating the =/etc/guix/= directory but I haven't run into any on 
three machines where I've done this.

Also glad I could help.

[1] https://logs.guix.gnu.org/guix/2020-12-04.log
phodina <phodina@protonmail.com> writes:

> Thanks Elais. This is exactly what I need.
>
> Also you're right regarding the ISO running out of space 
> (memory) as I ran =guix pull= once before the store was setup 
> and mounted on the target system.
>
> Also pinning the channels is useful to get "identical" os 
> installed across the machines.
>
> This might be a neat code excerpt and note in the manual 
> perhaps. Would you agree?
>
> Of course, once the system is setup then there is =guix deploy=.
>
>
>
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>
> On Friday, July 30th, 2021 at 6:15 PM, Elais Player 
> <elais@fastmail.com> wrote:
>
>> You could add the custom channels file as an
>>
>> =extra-special-file=1 in the =os-configuration=.
>>
>> It would look something like this:
>>
>> #+BEGIN_SRC scheme
>>
>> (define %my-installation-os
>>
>> (operating-system
>>
>> (inherit installation-os)
>>
>> (services
>>
>> (cons*
>>
>> (extra-special-file
>>
>> "/etc/guix/channels.scm"
>>
>> (local-file "/path/to/my/channels.scm"))
>>
>> (operating-system-services installation-os)))))
>>
>> #+END_SRC
>>
>> Plus side is you now have a global channels file from which all
>>
>> you need to do is run =guix pull= to have all your channels up 
>> to
>>
>> date. You may also want to pin those channels to certain 
>> commits
>>
>> just in case. Down side is running =guix pull= will start 
>> filling
>>
>> up your disk or memory on an ISO and you can easily run out of
>>
>> space. (I would advise not running =guix pull= until after
>>
>> partitioning and setting up the target system), and this file 
>> will
>>
>> be added to the store (but if you're creating a channels file 
>> in
>>
>> =/etc= shouldn't matter honestly).
>>
>> phodina via help-guix@gnu.org writes:
>>
>> > Hello,
>> >
>> > I'm migrating to a newer machine and I'm taking my GuixSD
>> >
>> > configuration with me.
>> >
>> > So the first logical step I did was to create an ISO image 
>> > based
>> >
>> > on this section 1. As I use my custom channel with modified
>> >
>> > packages I added them to the configuration to make them
>> >
>> > available on the new machine.
>> >
>> > Or so I thought. I booted and partitioned the new machine 
>> > then
>> >
>> > ran
>> >
>> > guix system init /root/configurations.scm /mnt to install 
>> > Guix
>> >
>> > there.
>> >
>> > However, after reboot turns out that the packages are not 
>> > from
>> >
>> > my channel but from public Guix repository without
>> >
>> > modifications.
>> >
>> > Therefore my question is if it's possible to specify also
>> >
>> > channels in the configuration file so that they are used 
>> > during
>> >
>> > installation?
>> >
>> > Reading the manual I came to a nice command guix system 
>> > describe
>> >
>> > 2 which gives me the current configuration with the
>> >
>> > channels. Could that be used to build an ISO which would then
>> >
>> > also know about the additional channels?
>> >
>> > Kind regards
>> >
>> > Petr


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-03 20:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 16:00 How to add custom channels to ISO phodina via
2021-07-30 16:15 ` Elais Player
2021-08-03 20:12   ` phodina
2021-08-03 20:41     ` Elais Player

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.