unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Tropin <andrewtropin@gmail.com>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>, guix-devel@gnu.org
Subject: Re: Multiple profiles with Guix Home
Date: Tue, 24 May 2022 14:55:38 +0300	[thread overview]
Message-ID: <87wnebp2kl.fsf@trop.in> (raw)
In-Reply-To: <7e70064d679274160d62fdc86e7e25879bec7a79.camel@gmail.com>

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

On 2022-05-23 19:05, Liliana Marie Prikler wrote:

> Hi,
>
> Am Montag, dem 23.05.2022 um 16:14 +0300 schrieb Andrew Tropin:
>> The discussion seems too heated and bloated, it's hard to reasonably
>> address arguments mentioned around, so I'll just post some thoughts
>> and a possible way to somehow proceed.
>> 
>> I suggest to split the bigger idea into smaller pieces, play with the
>> implementation locally/in fork/branch and see how it goes:
>> 
>> 1. home-profiles-paths-service-type.  It will allow to add code for
>> sourcing profiles in setup-environment script and thus implement
>> workflows with multiple profiles.  Such profiles can be managed
>> externally or in the future built as a part of home environment.
> How about home-profile-loader-service-type as a name instead?  That
> would imply that it's purpose is to load profiles.

Looks ok for me.

>> 2. home-[additional-]profiles-service-type.  It will allow to build
>> profiles from list of packages, optionally add a profile to
>> home-profiles-paths.  It will make ~/.guix-
>> home/profiles/{emacs,web,etc}
>> 
>> To make it possible for other service to utilize multiple profiles,
>> this service will be extandable with values like that:
>> 
>> `((default . ,(list curl wget))
>>   (web . ,(list browser-ad-block-plugin))
>>   (emacs . ,(list emacs emacs-cider emacs-modus-themes)))
> I don't think I agree with this choice.  To satisfy both my own use
> case of serving profiles in different locations from another and
> another issue being raised w.r.t. configuring the location of the
> .guix-home profile, I think we should make a triple of location,
> optional short name, and manifest (which may be generated from packages
> implicitly).  WDYT?
>

This service is intended for profiles managed by Guix Home, so every
profile MUST be a part of home-environment (~/.guix-home is a symlink to
it).  I don't see any meaningful reasons to make it possible to
customize the path inside home-environment.

If you want to have profiles like ~/work/my-project/guix-profile or
~/.guix/profiles/my-python-environment managed by Guix Home you can
implement home-external-profiles-service-type, which can extended
activation service or any other impure tricks, but I would advice
against it.  I suggest either manage a profile with
home-[additional-]-profiles or manage them externally and load with
home-profile-paths/home-profile-loader.

>> 3. Maybe migrate ~/.guix-home/profile to ~/.guix-
>> home/profiles/default.
> Kinda agree, but with the caveat in (2).  Uniformity or chaos should be
> a user choice :)
>
>> I still can see a lot of potential problems related to search paths,
>> however part of them can be solved by duplicating packages in
>> different profiles or using dummy packages like emacs-consumer:
>> https://git.sr.ht/~abcdw/rde/tree/master/item/rde/packages/emacs.scm#L56
> Or by making search paths first class in manifests, as also discussed
> elsewhere.
>
>> [...]
>> Liliana, if you still into it, I suggest to start with something
>> similiar to what I described above, share the draft implementation
>> and intermediate results/impression in a separate thread and continue
>> the further discussion.
> Considering the above, I think a rough roadmap would be:
> 1. Implementing home-profiles-service-type (to build the profiles)
> 2. Implementing home-profile-loader-service-type

This one looks simplier and also independent from #1, so I would
recommend to start with it.  Also, it's very likely that
home-profiles-service-type will be extending
home-profile-loader-service-type

> 3. ???
> 4. Deprecate the existing home-profile-service-type in favor of the new
> profile service type pair and/or implement it in terms of it.
> where (1) and (2) could be done by two people/teams in parallel.

The migration should be quite simple here.

JFYI: The design of Guix Home is flexible, essential services can be
completely customized, even symlink-manager can be removed or
substituted with something else (for example to make a read-only home
workflow proposed by Julien Lepiller in guix-home-manager).  This is
also used in rde to substitute home-shell-profile-service-type with
alternative implementation:
https://git.sr.ht/~abcdw/rde/tree/master/item/rde/features.scm#L234

This way you can experiment with multi-profile approach even without
modifying existing code.

>
> Given that the task has been simplified, I think I might start coding
> on it, but I can't promise any particular deadline.  At the moment,
> both my day job and review work delay any other contributions towards
> Guix.
>
> Cheers

I also advice to treat it as an experiment.  IMO Guix Home should be
relatively conservative, stable and simple.  Other advanced workflows
in most cases should be implemented and maintained separately and be
optionally pluggable in Guix Home by overriding essential services or
any other way.  In cases such workflows demonstrates their benifits
without compromising simplicity, they can be included.

-- 
Best regards,
Andrew Tropin

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

  reply	other threads:[~2022-05-24 12:27 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-03 10:50 Multiple profiles with Guix Home Liliana Marie Prikler
2021-10-04  7:17 ` zimoun
2021-10-04  8:11   ` Liliana Marie Prikler
2022-05-03 14:13 ` Andrew Tropin
2022-05-03 18:34   ` Liliana Marie Prikler
2022-05-03 19:13     ` Maxime Devos
2022-05-03 20:04       ` Liliana Marie Prikler
2022-05-03 20:39         ` Maxime Devos
2022-05-03 20:44         ` Maxime Devos
2022-05-04  9:25           ` Maxime Devos
2022-05-03 20:59         ` Maxime Devos
2022-05-04  4:16           ` Liliana Marie Prikler
2022-05-04  7:01             ` Maxime Devos
2022-05-04  7:08               ` Maxime Devos
2022-05-04 13:15               ` Reza Housseini
2022-05-04 13:46                 ` Maxime Devos
2022-05-04 18:14                   ` zimoun
2022-05-04 18:21                     ` Maxime Devos
2022-05-05  8:01                 ` Andrew Tropin
2022-05-04 18:38               ` Liliana Marie Prikler
2022-05-04 20:41                 ` Maxime Devos
2022-05-05  4:25                   ` Liliana Marie Prikler
2022-05-05 10:53                     ` Maxime Devos
2022-05-05 16:24                       ` Liliana Marie Prikler
2022-05-05 16:33                         ` Maxime Devos
2022-05-05 17:21                           ` Liliana Marie Prikler
2022-05-05 17:29                             ` Maxime Devos
2022-05-05 11:03                     ` Maxime Devos
2022-05-05 16:31                       ` Liliana Marie Prikler
2022-05-05 16:42                         ` Maxime Devos
2022-05-05 17:12                           ` Maxime Devos
2022-05-05 17:27                           ` Liliana Marie Prikler
2022-05-05 17:41                             ` Maxime Devos
2022-05-05 19:17                               ` Liliana Marie Prikler
2022-05-05 19:42                                 ` Maxime Devos
2022-05-05 20:20                                   ` Liliana Marie Prikler
2022-05-05 18:00                             ` Maxime Devos
2022-05-05 19:08                               ` Liliana Marie Prikler
2022-05-05 19:44                                 ` Maxime Devos
2022-05-05 23:53                                   ` zimoun
2022-05-05 20:13                                 ` Maxime Devos
2022-05-05 20:53                                   ` Liliana Marie Prikler
2022-05-05 21:28                                     ` Maxime Devos
2022-05-06  4:19                                       ` Liliana Marie Prikler
2022-05-07 23:06                                         ` Ludovic Courtès
2022-05-05 20:50                                 ` zimoun
2022-05-05 18:25                         ` zimoun
2022-05-03 21:11         ` Maxime Devos
2022-05-04  4:23           ` Liliana Marie Prikler
2022-05-04  6:57             ` Maxime Devos
2022-05-04  9:24             ` Maxime Devos
2022-05-04 13:05     ` Andrew Tropin
2022-05-05 11:05 ` Maxime Devos
2022-05-05 16:22   ` Liliana Marie Prikler
2022-05-05 17:07     ` Maxime Devos
2022-05-05 17:19       ` Liliana Marie Prikler
2022-05-05 17:29         ` Maxime Devos
2022-05-05 18:24           ` Liliana Marie Prikler
2022-05-05 20:14             ` Maxime Devos
2022-05-05 20:27               ` Liliana Marie Prikler
2022-05-05 20:38                 ` Maxime Devos
2022-05-05 20:41                 ` Maxime Devos
2022-05-05 20:26             ` Maxime Devos
2022-05-06 18:40               ` Liliana Marie Prikler
2022-05-06 19:54                 ` Maxime Devos
2022-05-06 21:32                   ` Liliana Marie Prikler
2022-05-07  7:17                     ` Maxime Devos
2022-05-23 13:14 ` Andrew Tropin
2022-05-23 17:05   ` Liliana Marie Prikler
2022-05-24 11:55     ` Andrew Tropin [this message]
2022-05-24 18:31       ` Liliana Marie Prikler
2022-05-25 11:01         ` Andrew Tropin
2022-05-25 23:36           ` Liliana Marie Prikler
2022-05-27 12:52             ` andrew
2022-05-27 13:14               ` Liliana Marie Prikler
  -- strict thread matches above, loose matches on Subject: below --
2021-10-03 20:51 John Kehayias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnebp2kl.fsf@trop.in \
    --to=andrewtropin@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=liliana.prikler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).