From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yBSvN0LyQWHBowAAgWs5BA (envelope-from ) for ; Wed, 15 Sep 2021 15:16:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uJ9WM0LyQWE+BwAA1q6Kng (envelope-from ) for ; Wed, 15 Sep 2021 13:16:50 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 31EF3C547 for ; Wed, 15 Sep 2021 15:16:50 +0200 (CEST) Received: from localhost ([::1]:54200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQUmP-0008Dz-A7 for larch@yhetil.org; Wed, 15 Sep 2021 09:16:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQUlE-0008CJ-5c for guix-devel@gnu.org; Wed, 15 Sep 2021 09:15:36 -0400 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:43696) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQUkx-00027D-CJ for guix-devel@gnu.org; Wed, 15 Sep 2021 09:15:35 -0400 Received: by mail-lf1-x134.google.com with SMTP id h16so5973409lfk.10 for ; Wed, 15 Sep 2021 06:15:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=gnCXj0RgXB6/IXeaeikY/kK8Lqxa0CkkP7LOtDFhtjc=; b=JYdiDFqcMsjtZgWvjoZz1XtpSkg21CjCkqMDFHRHTMzYdg+oYT1LsS8A+f4xjw0+mS 1CizYEXcPgeM7XKwSRHC5RxmcNZEGOY8j2ethDWbE7kNE+xUWb9LTdq76qYqqu0W2qcK uGCYnxwMyLLFtalVw40hkWOy8wJsPEou7xYcZyqtrag0tj/jHflvrTfdkT3Wz21x38AI eoFvYwQyc4liRoJPHXfsC55+2rhAyutoTLzRVVlEdsS6LS01lts9R20vHuSBKdEBAza/ HNWRByYnAGl0aZA9en8M40ogS7oiNTD5o2yC1S3/ww5CWjgTcNButC8Vh/W8j8iGBUDu n08A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=gnCXj0RgXB6/IXeaeikY/kK8Lqxa0CkkP7LOtDFhtjc=; b=EYbrqF5yCcg3EYuVwcgn6YjI1wU0u1tQH7TQwksXUxT80tsnDO8H2jsOTdyLgoNKbA qKUUcXr8wZHQgzXq3VcwXT9Xwmd/DElBjAShGL++V9CJ0dfg9p5ppqClWHDCHDdoAHmw o6RMK9ru10aiaEHowVzBo6TyOdFhTdfHBweECjexJx6CuyVzzrQEtSOPy47xjVZYTjN0 x5n/e8cehsD4xFuxe4o82wUEeQk20Jgptij7z9C1nISlAccStviGSZi3F/uq8lfibYQW MON2sngnUCqTsBIH9rkgjn5VYSRpq3AfUMQ+xRCcUIRNJmivEucBF40nSLuK5VO+U866 wu1Q== X-Gm-Message-State: AOAM533wg+bjFz+GFUA0v5kptXiIos7uffalpACpC0KMr2dM0rucf5Ma Ky2TBz6poqdXQMe3v4tUI3YXFsCsaeQxDw== X-Google-Smtp-Source: ABdhPJx6IBAK3m8f9Jhxxq4Xt3/70hWKZVukkPRV7UpA2zwi/4XPEyWwu7dvf7d6+sDuZRzDg3m7wg== X-Received: by 2002:a05:6512:33cd:: with SMTP id d13mr17014922lfg.28.1631711717165; Wed, 15 Sep 2021 06:15:17 -0700 (PDT) Received: from localhost ([109.252.93.92]) by smtp.gmail.com with ESMTPSA id bp7sm1144678lfb.190.2021.09.15.06.15.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Sep 2021 06:15:15 -0700 (PDT) From: Andrew Tropin To: Maxime Devos , guix-devel@gnu.org Subject: Re: On the naming of System and Home services modules. In-Reply-To: <30d6581e514faf4e67cc210dda2f0a734be0a346.camel@telenet.be> References: <87zgsei5ta.fsf@trop.in> <30d6581e514faf4e67cc210dda2f0a734be0a346.camel@telenet.be> Date: Wed, 15 Sep 2021 16:15:11 +0300 Message-ID: <87wnnihteo.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: none client-ip=2a00:1450:4864:20::134; envelope-from=andrew@trop.in; helo=mail-lf1-x134.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xinglu Chen Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631711810; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gnCXj0RgXB6/IXeaeikY/kK8Lqxa0CkkP7LOtDFhtjc=; b=cFsEY22nZlP4dhP4BRZFNidJuNr1LtVZSwISsio9+JltKvD+UkrQC0d0mGkHp5XbWbPh7m pU0YAYXEaTNttENhx61emZDPKgRC8z9HuUOsDdXmKEQdMaWIW0vTv2a/fYVb6Tp++f8vI9 wSbcvcYl9Qlt376p9M1TSGIV4QXD+sDanPRoWKpP5OAya0/W+Kutt98ts9Aw2dVAoH9cih wNzAkh9Tzdw4xEoFJKFZ82pCyhbGD21q3imujnOZXqgNBfPGxNmsqxna6V8qIJ2bpBmQqt 05y02I8LAqrMDiL5wXcssm9IhcXdy6PK8LwklgGKBW2rNLS7bHqMLpDCRraxHw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631711810; a=rsa-sha256; cv=none; b=D75ZgwoXSt4kpLzQuX2NWIOJgL0BKY69bLog4pRWM7JdmdjSNzxysxJ8g+bjrfjz+yr4ZG cYkPy2DFGmPmFUg/R9u8LbMWGqnNWtGObUpxqB2X5MPocSRqkGJsjgh6swXuCi/UbfIEUT rLLqDhV8Gb4SuWgmw5wMsPvBPLqIfpu6PAB/x8cHTf4W3lrZdTZlPKXhDwSqS0mdQ1wHVJ CofIpqzTO73hUcEluGGlrktAjk35AaesDnzf0INMKT4rDRGU46vvput8HX9q4Ai967BEf7 jtcc+N2WsbwseMvwSMHL+Okp/6GtVpi2DdL65TsIrRQicfIkZc2/ParM2xv0+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b=JYdiDFqc; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.20 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b=JYdiDFqc; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 31EF3C547 X-Spam-Score: -3.20 X-Migadu-Scanner: scn0.migadu.com X-TUID: Hc5huCF3Xr6p --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-09-15 12:09, Maxime Devos wrote: > Andrew Tropin schreef op wo 15-09-2021 om 11:47 [+0300]: >> *** Confusion >> I already mentioned that I see a lot of confusion between System and >> Shepherd services and I expect some confusion between home and system >> services, it will be especially true if we place them in the same >> namespace. >>=20 >> People will be trying to use home services inside operating systems, >> #+begin_src scheme >> (operating-system >> (services >> (list (service home-mcron-service-type ...)))) >> #+end_src >>=20 >> and configuration record for system services inside home services. >> #+begin_src scheme >> (home-environment >> ... (service home-mcron-service-type >> (mcron-configuration ...))) >> #+end_src > > What do you think of adding some validation code to 'service-type' > and the "guix home" equivalent, e.g. a =E2=80=98validate=E2=80=99 field, = which > could be used like > > (define-module (...) > #:autoload (gnu home??? mcron) (mcron-user-configuration?)) > > (define mcron-service-type > (service-type (name 'mcron) > ... > (validate > (lambda (config) > (cond ((mcron-configuration? config) #t) > ((home-mcron-configuration? config) > ;; TODO: figure out a clear error message > (validation-error (G_ "A mcron configuration f= or the system was expected, but a configuration for the user was used"))) > (#t #f)))))) > > and likewise for the "guix home" equivalent, such that if user configurat= ions > are used in the system configuration, an error message is printed, indica= ting > the issue? Maybe include the line and column number of the record as wel= l. > > Greetiings, > Maxime. Hi Maxime, Nice idea and viable solution, but here I was talking about the case, when both home-mcron-service-type and mcron-service-type in the same (gnu services mcron) namespace. I expect much less confusion and it probably won't be an issue, when they are in different modules (gnu home-services mcron) and (gnu services mcron) for example. If person imports (gnu services SOMETHING) than they expect to get system services for their operating-system, if they imports (gnu home-services SOMETHING) they want to extend their home-environment.=20 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmFB8d8ACgkQIgjSCVjB 3rDIxw//QHO5P1TxUIuDtyB0FCbiEHtp5gzoOPqSaLYPrGq9o8xf8Q7y3w/4LjRz XwP1BVzTkFoz6cydRs7hLOkWajXjeWXyueZ9ipDcBrNPtKVsEXnRG87p1p/Kehxw L8QnhAcQiBqLqdbGCGBB74jz7dI3YHUNLDtBgVMZQQ6CAQ3mfL32jpPu2gJ/imEa xjUqItJPHbv6yFf+9AhJvB+qQ4nR2nasjsglhE+3nqKanG4XwK1eOCvxfHqQ2yb/ GZzTe2Y8MUdibmBKmIdYUwoiCV2YP3bH5F04x3kdzpeJy7V5YzWdyXl/6whZCt3L rF8XnLh7ShHpuHaDzKWbg+UqBbxOXRAda0aS1OwMdzNOXpj0jwcsdp3JaP8+s8YO zUcFQuWY0Yazx8NAztqXjxYAQfmwikFrRy0KJWcG9R2OoXQ4qZhS6/jHup7Olwyr eZyBnzTEqveBSlRC3omE2CFMMbSuMKLpwHa0ak/gtzNrNJgjKeZG0FT6/3wcco7i inrBisN2wz1fTGhsdkN3iFuQ4wc6i6/s+5oJTH/cHfxHd0B65sfr2A5rS02Hx4C7 xUBqpfby0YDgwHTyZ90hjMvJrm6jqSn0VDsgk39McyrbCPYGppq1WtXQ1bf/jKeT sY/O/iMqUDS2lIqmgXBJ4aJeqrHi3aL8D9ZeIbVpy7VpdWqYVt0= =D0yl -----END PGP SIGNATURE----- --=-=-=--