diff mbox series

[bug#57963,v4,1/2] home-services: Add base.

Message ID 20220929143633.28844-1-higashi@taiju.info
State New
Headers show
Series [bug#57963,v4,1/2] home-services: Add base. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Taiju HIGASHI Sept. 29, 2022, 2:36 p.m. UTC
* gnu/home.scm: Move home-fontconfig-service-type from
home-environment-default-essential-services to %home-base-services.
* gnu/home/services/base.scm: Add base.
---
 gnu/home.scm               |  5 ++---
 gnu/home/services/base.scm | 35 +++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+), 3 deletions(-)
 create mode 100644 gnu/home/services/base.scm

Comments

Liliana Marie Prikler Sept. 30, 2022, 6:21 p.m. UTC | #1
Am Freitag, dem 30.09.2022 um 00:09 +0900 schrieb Taiju HIGASHI:
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> 
> > Am Donnerstag, dem 29.09.2022 um 23:36 +0900 schrieb Taiju HIGASHI:
> > > * gnu/home.scm: Move home-fontconfig-service-type from
> > > home-environment-default-essential-services to %home-base-
> > > services.
> > Unless there is a precedent in system, I would make all the
> > currently
> > "essential" services %home-base-services perhaps move their code
> > accordingly.
> 
> I thought it was only for home-fontconfig-service.  Does that mean
> delete "essential" services and move everything to %home-base-
> services?
I'd double-check with Andrew, but my personal opinion is "yes".

> > > * gnu/home/services/base.scm: Add base.
> > Should be "New file."  Also should probably be the first item in
> > the
> > ChangeLog, so that other items can mention it.
> 
> I understood that "Add base" should be "New file", but I didn't
> understand the second part.  I apologize for my lack of
> understanding.
It means put the * gnu/home/services/base.scm entry before the *
gnu/home.scm one, so that you can mention the former in the latter.

Cheers
Taiju HIGASHI Oct. 1, 2022, 11:08 a.m. UTC | #2
liliana.prikler@gmail.com writes:

> Am Freitag, dem 30.09.2022 um 00:09 +0900 schrieb Taiju HIGASHI:
>> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>>
>> > Am Donnerstag, dem 29.09.2022 um 23:36 +0900 schrieb Taiju HIGASHI:
>> > > * gnu/home.scm: Move home-fontconfig-service-type from
>> > > home-environment-default-essential-services to %home-base-
>> > > services.
>> > Unless there is a precedent in system, I would make all the
>> > currently
>> > "essential" services %home-base-services perhaps move their code
>> > accordingly.
>>
>> I thought it was only for home-fontconfig-service.  Does that mean
>> delete "essential" services and move everything to %home-base-
>> services?
> I'd double-check with Andrew, but my personal opinion is "yes".

Noted. It may take some time until he can reply, but I will wait for
Andrew's reply.

>> > > * gnu/home/services/base.scm: Add base.
>> > Should be "New file."  Also should probably be the first item in
>> > the
>> > ChangeLog, so that other items can mention it.
>>
>> I understood that "Add base" should be "New file", but I didn't
>> understand the second part.  I apologize for my lack of
>> understanding.
> It means put the * gnu/home/services/base.scm entry before the *
> gnu/home.scm one, so that you can mention the former in the latter.

Thank you for the specific explanation, I understand.

Cheers,
Ludovic Courtès Oct. 1, 2022, 9:47 p.m. UTC | #3
Hi,

Taiju HIGASHI <higashi@taiju.info> skribis:

> * gnu/home.scm: Move home-fontconfig-service-type from
> home-environment-default-essential-services to %home-base-services.
> * gnu/home/services/base.scm: Add base.

In addition to what Liliana wrote, please make sure to add the new file
to ‘gnu/local.mk’.

> @@ -82,7 +82,6 @@ (define (home-environment-default-essential-services he)
>  
>     (service home-symlink-manager-service-type)
>  
> -   (service home-fontconfig-service-type)
>     (service home-xdg-base-directories-service-type)
>     (service home-shell-profile-service-type)

Like Liliana wrote, it may be that more of these can be moved from
“essential” to “base”, we can keep that for a later patch.

Otherwise LGTM!

Ludo’.
Taiju HIGASHI Oct. 2, 2022, 1:45 p.m. UTC | #4
Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Taiju HIGASHI <higashi@taiju.info> skribis:
>
>> * gnu/home.scm: Move home-fontconfig-service-type from
>> home-environment-default-essential-services to %home-base-services.
>> * gnu/home/services/base.scm: Add base.
>
> In addition to what Liliana wrote, please make sure to add the new file
> to ‘gnu/local.mk’.

I have added it.

>> @@ -82,7 +82,6 @@ (define (home-environment-default-essential-services he)
>>
>>     (service home-symlink-manager-service-type)
>>
>> -   (service home-fontconfig-service-type)
>>     (service home-xdg-base-directories-service-type)
>>     (service home-shell-profile-service-type)
>
> Like Liliana wrote, it may be that more of these can be moved from
> “essential” to “base”, we can keep that for a later patch.

Please let us address this in a later patch.

I would like to discuss something with you.
I'm aware that this patch is a breaking change. We are aware that if we
do not add %base-home-services to the existing home configuration, fontconfig will change.
I'm concerned about how the community will react to this.

Thanks,
Liliana Marie Prikler Oct. 2, 2022, 2:59 p.m. UTC | #5
Am Sonntag, dem 02.10.2022 um 22:45 +0900 schrieb Taiju HIGASHI:
> > Like Liliana wrote, it may be that more of these can be moved from
> > “essential” to “base”, we can keep that for a later patch.
> 
> Please let us address this in a later patch.
> 
> I would like to discuss something with you.
> I'm aware that this patch is a breaking change. We are aware that if
> we do not add %base-home-services to the existing home configuration,
> fontconfig will change.  I'm concerned about how the community will
> react to this.
As long as the out-of-the-box behaviour stays the same, the community
has no reason to complain.  For what it's worth, you could also leave
fontconfig as an essential service, but then you get another field to
configure.

As far as I see, essential services are also a thing on the system
side, but the home and system variants have a somewhat different feel
to them.  The fontconfig-service is not actually essential, the profile
service type arguably isn't either (it acts as yet another profile and
simultaneously fails to satisfy the multi-profile use-case; more on
that elsewhere), the xdg-base-directories one notably violates the XDG
Base Directories specification, and so on.

I'd get Andrew's approval before moving services, but I'd move them in
one go rather than bit by bit.

Cheers
Taiju HIGASHI Oct. 3, 2022, 11:27 p.m. UTC | #6
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Sonntag, dem 02.10.2022 um 22:45 +0900 schrieb Taiju HIGASHI:
>> > Like Liliana wrote, it may be that more of these can be moved from
>> > “essential” to “base”, we can keep that for a later patch.
>>
>> Please let us address this in a later patch.
>>
>> I would like to discuss something with you.
>> I'm aware that this patch is a breaking change. We are aware that if
>> we do not add %base-home-services to the existing home configuration,
>> fontconfig will change.  I'm concerned about how the community will
>> react to this.
> As long as the out-of-the-box behaviour stays the same, the community
> has no reason to complain.  For what it's worth, you could also leave
> fontconfig as an essential service, but then you get another field to
> configure.
>
> As far as I see, essential services are also a thing on the system
> side, but the home and system variants have a somewhat different feel
> to them.  The fontconfig-service is not actually essential, the profile
> service type arguably isn't either (it acts as yet another profile and
> simultaneously fails to satisfy the multi-profile use-case; more on
> that elsewhere), the xdg-base-directories one notably violates the XDG
> Base Directories specification, and so on.

I was relieved to hear that.

> I'd get Andrew's approval before moving services, but I'd move them in
> one go rather than bit by bit.

Noted. I'll wait for his reply.

Cheers,
Andrew Tropin Oct. 10, 2022, 5:50 a.m. UTC | #7
On 2022-10-02 16:59, Liliana Marie Prikler wrote:

> Am Sonntag, dem 02.10.2022 um 22:45 +0900 schrieb Taiju HIGASHI:
>> > Like Liliana wrote, it may be that more of these can be moved from
>> > “essential” to “base”, we can keep that for a later patch.
>> 
>> Please let us address this in a later patch.
>> 
>> I would like to discuss something with you.
>> I'm aware that this patch is a breaking change. We are aware that if
>> we do not add %base-home-services to the existing home configuration,
>> fontconfig will change.  I'm concerned about how the community will
>> react to this.
> As long as the out-of-the-box behaviour stays the same, the community
> has no reason to complain.  For what it's worth, you could also leave
> fontconfig as an essential service, but then you get another field to
> configure.
>
> As far as I see, essential services are also a thing on the system
> side, but the home and system variants have a somewhat different feel
> to them.  

Originially purpose was the same - to have services depending on
home-environment record fields (fontconfig depended on symlink-path
field, which was configurable back in the days), later we made
~/.guix-home hardcoded and did other changes to remove all the
dependencies for essential services from home-environment.  Now the
purpose feels somewhat different, because it basically a good list of
default services, but not actually essential.  The only thing, that
still depends on home-environment fields is home-profile-service-type.

Globally, I'm good with the reorganization of essential services, but
let's make another thread for this issue.

> The fontconfig-service is not actually essential, the profile service
> type arguably isn't either (it acts as yet another profile and
> simultaneously fails to satisfy the multi-profile use-case; more on
> that elsewhere), the xdg-base-directories one notably violates the XDG
> Base Directories specification, and so on.
>
> I'd get Andrew's approval before moving services, but I'd move them in
> one go rather than bit by bit.
>
> Cheers
diff mbox series

Patch

diff --git a/gnu/home.scm b/gnu/home.scm
index c95d1e0818..c79db87018 100644
--- a/gnu/home.scm
+++ b/gnu/home.scm
@@ -19,10 +19,10 @@ 
 
 (define-module (gnu home)
   #:use-module (gnu home services)
+  #:use-module (gnu home services base)
   #:use-module (gnu home services symlink-manager)
   #:use-module (gnu home services shells)
   #:use-module (gnu home services xdg)
-  #:use-module (gnu home services fontutils)
   #:use-module (gnu services)
   #:use-module (guix records)
   #:use-module (guix diagnostics)
@@ -66,7 +66,7 @@  (define-record-type* <home-environment> home-environment
                                 this-home-environment)))
 
   (services           home-environment-user-services
-                      (default '()))
+                      (default %home-base-services))
 
   (location           home-environment-location            ; <location>
                       (default (and=> (current-source-location)
@@ -82,7 +82,6 @@  (define (home-environment-default-essential-services he)
 
    (service home-symlink-manager-service-type)
 
-   (service home-fontconfig-service-type)
    (service home-xdg-base-directories-service-type)
    (service home-shell-profile-service-type)
 
diff --git a/gnu/home/services/base.scm b/gnu/home/services/base.scm
new file mode 100644
index 0000000000..fbf92ba213
--- /dev/null
+++ b/gnu/home/services/base.scm
@@ -0,0 +1,35 @@ 
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Taiju HIGASHI <higashi@taiju.info>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu home services base)
+  #:use-module (gnu home services)
+  #:use-module (gnu home services fontutils)
+  #:export (%home-base-services))
+
+;;; Commentary:
+;;
+;; Base home services---i,e., services that 99% of the users will want to use.
+;;
+;;; Code:
+
+
+(define %home-base-services
+  ;; Convenience variable holding the basic services.
+  (list (service home-fontconfig-service-type)))
+
+;;; base.scm ends here