unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* An idea regarding Guix Profiles
@ 2021-01-28  4:05 Raghav Gururajan
  2021-01-28  7:54 ` Maxime Devos
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Raghav Gururajan @ 2021-01-28  4:05 UTC (permalink / raw)
  To: guix-devel

Hello Guix!

I just had this crazy idea.

Currently, we can create multiple profiles at user-level. What if we 
could bring the 'guix profiles' concept to system-level?

At user-level, user can choose which profile to work on. Like that it 
would be cool to select which profile to boot.

Thoughts?

Regards,
RG.


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

* Re: An idea regarding Guix Profiles
  2021-01-28  4:05 An idea regarding Guix Profiles Raghav Gururajan
@ 2021-01-28  7:54 ` Maxime Devos
  2021-01-28  8:23 ` Pierre Neidhardt
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Maxime Devos @ 2021-01-28  7:54 UTC (permalink / raw)
  To: Raghav Gururajan, guix-devel

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

Hi RG,

> At user-level, user can choose which profile to work on. Like that it 
> would be cool to select which profile to boot.

This already possible in some form: when booting, I can (optionally) select
an older system generation to boot (at least in GRUB).  The question is, I
guess, would it be feasible to allow defining multiple operating systems at once in
the configuration file?  The GRUB screen could then look something like this:

  Welcome to GRUB!
  * OS Group A (date + name)
    + Primary OS #A   (kernel + name)
    + Secondary OS #B (kernel + name)
    + Secondary OS #C  (kernel + name)
    + ...
  * Old operating systems
    + Old OS Group A (date + name)
      + Old Primary OS #A ....
        ...
    + Old OS Group A (date + name)
      + Old Primary OS #A ...
      ...
    ...
  You can edit [blabla] ... Press [...] to [blabla] ...

And the configuration file could look something like this:

  (operating-system-group
    (name  "something")
    (primary (operating-system ...))
    (secondary (operating-system ...) (operating-system ...) ...))

The primary OS is used for determining on which partition to
install the bootloader and which bootloader to install.
(It doesn't make sense to install multiple bootloaders after all).

Thoughts?
Maxime
-- 
Maxime Devos <maximedevos@telenet.be>
PGP Key: C1F3 3EE2 0C52 8FDB 7DD7  011F 49E3 EE22 1917 25EE
Freenode handle: mdevos

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* An idea regarding Guix Profiles
@ 2021-01-28  8:11 Leo Prikler
  2021-01-28 10:17 ` Leo Prikler
  0 siblings, 1 reply; 8+ messages in thread
From: Leo Prikler @ 2021-01-28  8:11 UTC (permalink / raw)
  To: rg; +Cc: guix-devel

Hello Raghav,

I had a similar idea a little more than a year ago:<
https://lists.gnu.org/archive/html/guix-devel/2019-12/msg00358.html>
See also <
https://lists.gnu.org/archive/html/guix-devel/2020-01/msg00083.html>
for the discussion it spawned.

While the default profile would stay active at all times, storing
profiles in a single location would make it much easier to activate
them at a whim -- in particular also to do so from a Guix command. 
However, this change would obviously not be compatible to how Guix
functioned before and thus the proposal needs to be written with care
to at least be future-proof.  The discussion has stalled since,
probably because I had not put enough thought into the initial idea.

I am planning to revive this idea in a somewhat different form later
this year, but I still need time to formalize my thoughts.

Regards,
Leo



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

* Re: An idea regarding Guix Profiles
  2021-01-28  4:05 An idea regarding Guix Profiles Raghav Gururajan
  2021-01-28  7:54 ` Maxime Devos
@ 2021-01-28  8:23 ` Pierre Neidhardt
  2021-01-28 10:35 ` Nicolò Balzarotti
  2021-01-28 21:18 ` Raghav Gururajan
  3 siblings, 0 replies; 8+ messages in thread
From: Pierre Neidhardt @ 2021-01-28  8:23 UTC (permalink / raw)
  To: Raghav Gururajan, guix-devel

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

Hi Raghav,

I find the idea very attractive.  At first, I thought that GRUB menu
entries would be limiting, but then I realized that GRUB supports
submenus!

So all we need is one submenu per profile, right?

Cheers!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

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

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

* Re: An idea regarding Guix Profiles
  2021-01-28  8:11 Leo Prikler
@ 2021-01-28 10:17 ` Leo Prikler
  0 siblings, 0 replies; 8+ messages in thread
From: Leo Prikler @ 2021-01-28 10:17 UTC (permalink / raw)
  To: rg; +Cc: guix-devel

Hello Raghav,

looking at the way you phrased this in IRC, I just found out, that I
misunderstood your mail.  Basically, what you need to do to achieve
something like that with Guix currently, would be to keep two (or more)
config.scms and reconfigure each one after guix pull in a fixed order. 
Then you have:

O + (K-1)*N + 1: first use case, latest generation
O + (K-1)*N + 2: second use case, latest generation
O + K*N: Nth use case, latest generation

with a buffer of K generations.  I'm not quite sure how you could
better integrate this into GRUB -- perhaps there is an option to set a
custom label?  Then you'd have 
- GNU Guix (server config) #X
- GNU Guix (desktop config) #Y
- GNU Guix (other config config) #Z
where #X, #Y and #Z are generation labels.

Regards,
Leo



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

* Re: An idea regarding Guix Profiles
  2021-01-28  4:05 An idea regarding Guix Profiles Raghav Gururajan
  2021-01-28  7:54 ` Maxime Devos
  2021-01-28  8:23 ` Pierre Neidhardt
@ 2021-01-28 10:35 ` Nicolò Balzarotti
  2021-01-28 21:18 ` Raghav Gururajan
  3 siblings, 0 replies; 8+ messages in thread
From: Nicolò Balzarotti @ 2021-01-28 10:35 UTC (permalink / raw)
  To: Raghav Gururajan, guix-devel

Raghav Gururajan <rg@raghavgururajan.name> writes:

> Hello Guix!
>
> At user-level, user can choose which profile to work on. Like that it 
> would be cool to select which profile to boot.

If I understand this correctly, what you want is something similar to
NixOS' --profile-name [1], is that correct?

When I used it back then, the advantage of having named profiles was to
have a specific "music production" profile, with a different kernel
(-rt), different DE & so on, which I knew would always work (I updated
it very rarely).

[1] https://www.mankier.com/8/nixos-rebuild#--profile-name


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

* Re: An idea regarding Guix Profiles
  2021-01-28  4:05 An idea regarding Guix Profiles Raghav Gururajan
                   ` (2 preceding siblings ...)
  2021-01-28 10:35 ` Nicolò Balzarotti
@ 2021-01-28 21:18 ` Raghav Gururajan
  2021-01-28 21:43   ` Raghav Gururajan
  3 siblings, 1 reply; 8+ messages in thread
From: Raghav Gururajan @ 2021-01-28 21:18 UTC (permalink / raw)
  To: guix-devel; +Cc: Leo Prikler, Nicolò Balzarotti

Hello Guix!

> I just had this crazy idea.
> 
> Currently, we can create multiple profiles at user-level. What if we 
> could bring the 'guix profiles' concept to system-level?
> 
> At user-level, user can choose which profile to work on. Like that it 
> would be cool to select which profile to boot.
> 
> Thoughts?

For clarification, I meant these multiple system-profiles to be 
different from generations.

Currently, there can be only one system-profile, under which there can 
be many generations. In my idea, each multiple system-profile, will have 
their own generations.

For Example,

```
System 1 (Desktop installation for generic/casual use):
	Generation 1
	Generation 2
	...

System 2 (Minimal installation for development use):
	Generation 1
	Generation 2
	...

System 3 (Base installation for home-server use):
	Generation 1
	Generation 2
	...
```

If a user wants to casually watch multimedia or browse the web or edit 
some documents, the user can choose the system-profile 'System 1'. There 
will be desktop-environment and system-services for generic/casual use.

If a user wants to do development work, the user can choose the 
system-profile 'System 2'. There will be minimal window-managers and 
system-services for development use.

If a user is going to travel and want to run the machine as home-server, 
so that it can be accessed/used remotely, the user can choose the 
system-profile 'System 3'. There will be base packages and specific 
system-services like SSH, NFS etc.

Another Example,

```
System 1 (GNU/Linux-Libre):
	Generation 1
	Generation 2
	...

System 2 (GNU/Hurd):
	Generation 1
	Generation 2
	...

System 3 (GNU/HyperbolaBSD):
	Generation 1
	Generation 2
	...
```

Regards,
RG.


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

* Re: An idea regarding Guix Profiles
  2021-01-28 21:18 ` Raghav Gururajan
@ 2021-01-28 21:43   ` Raghav Gururajan
  0 siblings, 0 replies; 8+ messages in thread
From: Raghav Gururajan @ 2021-01-28 21:43 UTC (permalink / raw)
  To: guix-devel; +Cc: Leo Prikler, Nicolò Balzarotti

Hello Guix!

>> I just had this crazy idea.
>>
>> Currently, we can create multiple profiles at user-level. What if we 
>> could bring the 'guix profiles' concept to system-level?
>>
>> At user-level, user can choose which profile to work on. Like that it 
>> would be cool to select which profile to boot.
>>
>> Thoughts?
> 
> For clarification, I meant these multiple system-profiles to be 
> different from generations.
> 
> Currently, there can be only one system-profile, under which there can 
> be many generations. In my idea, each multiple system-profile, will have 
> their own generations.
> 
> For Example,
> 
> ```
> System 1 (Desktop installation for generic/casual use):
>      Generation 1
>      Generation 2
>      ...
> 
> System 2 (Minimal installation for development use):
>      Generation 1
>      Generation 2
>      ...
> 
> System 3 (Base installation for home-server use):
>      Generation 1
>      Generation 2
>      ...
> ```
> 
> If a user wants to casually watch multimedia or browse the web or edit 
> some documents, the user can choose the system-profile 'System 1'. There 
> will be desktop-environment and system-services for generic/casual use.
> 
> If a user wants to do development work, the user can choose the 
> system-profile 'System 2'. There will be minimal window-managers and 
> system-services for development use.
> 
> If a user is going to travel and want to run the machine as home-server, 
> so that it can be accessed/used remotely, the user can choose the 
> system-profile 'System 3'. There will be base packages and specific 
> system-services like SSH, NFS etc.
> 
> Another Example,
> 
> ```
> System 1 (GNU/Linux-Libre):
>      Generation 1
>      Generation 2
>      ...
> 
> System 2 (GNU/Hurd):
>      Generation 1
>      Generation 2
>      ...
> 
> System 3 (GNU/HyperbolaBSD):
>      Generation 1
>      Generation 2
>      ...
> ```

But if these profiles are gonna defined in same config.scm, then the 
generations will be shared.

  ```
Generation Current:
  System Profile 1 (Desktop installation for generic/casual use)
  System Profile 2 (Minimal installation for development use)
  System Profile 3 (Base installation for home-server use)

Generation 6:
  System Profile 1 (Desktop installation for generic/casual use)
  System Profile 2 (Minimal installation for development use)
  System Profile 3 (Base installation for home-server use)

Generation 5:
  System Profile 1 (Desktop installation for generic/casual use)
  System Profile 2 (Minimal installation for development use)
  System Profile 3 (Base installation for home-server use)

[...]
  ```

OR

  ```
Generation Current:
  System Profile 1 (GNU/Linux)
  System Profile 2 (GNU/Hurd)
  System Profile 3 (GNU/BSD)

Generation 6:
  System Profile 1 (GNU/Linux)
  System Profile 2 (GNU/Hurd)
  System Profile 3 (GNU/BSD)

Generation 5:
  System Profile 1 (GNU/Linux)
  System Profile 2 (GNU/Hurd)
  System Profile 3 (GNU/BSD)

[...]
  ```

Regards,
RG.


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

end of thread, other threads:[~2021-01-28 21:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-28  4:05 An idea regarding Guix Profiles Raghav Gururajan
2021-01-28  7:54 ` Maxime Devos
2021-01-28  8:23 ` Pierre Neidhardt
2021-01-28 10:35 ` Nicolò Balzarotti
2021-01-28 21:18 ` Raghav Gururajan
2021-01-28 21:43   ` Raghav Gururajan
  -- strict thread matches above, loose matches on Subject: below --
2021-01-28  8:11 Leo Prikler
2021-01-28 10:17 ` Leo Prikler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).