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 ms11 with LMTPS id iLIMBN0M3V7xSAAA0tVLHw (envelope-from ) for ; Sun, 07 Jun 2020 15:50:53 +0000 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 WOsHAN0M3V5gbAAA1q6Kng (envelope-from ) for ; Sun, 07 Jun 2020 15:50:53 +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 8ED28940607 for ; Sun, 7 Jun 2020 15:50:52 +0000 (UTC) Received: from localhost ([::1]:58374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhxZR-0007xb-Vo for larch@yhetil.org; Sun, 07 Jun 2020 11:50:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhxSw-0006Xf-PS for help-guix@gnu.org; Sun, 07 Jun 2020 11:44:06 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:46932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhxSv-0002He-Rz for help-guix@gnu.org; Sun, 07 Jun 2020 11:44:06 -0400 Received: by mail-ej1-x631.google.com with SMTP id e2so15448016eje.13 for ; Sun, 07 Jun 2020 08:44:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Ac0T1Cd0jMyw1qdbiRSDh/zuIIQXivnmnsZOYOxRiXE=; b=GW2Zrtjm6SWo3Gqi1GbMijf1HKFIEinjJnsVWET1mVoYODWF3qL3WPN2yfKHY6mAGD 9MRvOcb2bJT4sZCFtNzOVAmOaXhYDCZ4xGFu4ZQyQ091k25LsCa+GPh3rUYukbwgqQC2 vCK4baZ3l78ExqD/evIOYQEKh+ODZ5kdxI8TaVEg5vLOMeYiGlGlan+YKaEEW+5eC6+5 97GwUqA+EvbOnY++ugVAOQCJ1q6Y7SwZ9xGMZe8jtl+fM3niZTuAzz+nPgn9Yy1ae/UC N3rLJCrZunKG+QWWyGmCEeMIUvJxwogEtAQQ/twC0mDCSv+Xy0TTyINixxNxrb9hsfob /+wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Ac0T1Cd0jMyw1qdbiRSDh/zuIIQXivnmnsZOYOxRiXE=; b=rmKlGBlg7HOjC9lsyG0KfJW3n/nTh8beykzMUQEhW2Q8bgGLZcu35DbgxEFlJJvhXZ howbUcqVO1694jK5eFwaA6ya85YbZ9xnOh3heO4Yrqxmhoj/QcQTm7c0/5o0lYJiZrVW f20+IWsXu7rNoL+8O1NkR4xxsJ+YGu9K9Z5hgPQVPxrPhKak9jSNPgsrJZbnf2DZckom XZFKXMAE/NQoP2R+SiDwjN7rfayX9SBVhgUc9S1fbzC31P2/P8d3FyPhqzvqXoRYUPGH XIDxraJP1D9UIt+bsg259f5VSQhNu4yJp9+nbQhfqcROHmFCbPmD4PO2pStFFZwpRumV MqyA== X-Gm-Message-State: AOAM532+VCS7UOEXVD5/v6IJyiakPg0W3nmjQoOnWupaL9SNMW821OjE uHPlsZUvZuNcDHqwa+YUnE0wVPaeUWKJq+LigoVylvzm X-Google-Smtp-Source: ABdhPJxZJwFe2D57F20KMfi4b65T63LFsZhguN5MdaIkcGeZ63Bfd2+LZn2sgiwFfxT+MvCUHB1/F+LDERuW9g4rzX8= X-Received: by 2002:a17:906:6403:: with SMTP id d3mr17045066ejm.386.1591544643287; Sun, 07 Jun 2020 08:44:03 -0700 (PDT) MIME-Version: 1.0 From: conjaroy Date: Sun, 7 Jun 2020 11:43:27 -0400 Message-ID: Subject: Dependencies between service extensions To: help-guix@gnu.org Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=conjaroy@gmail.com; helo=mail-ej1-x631.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Mailman-Approved-At: Sun, 07 Jun 2020 11:50:43 -0400 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=GW2Zrtjm; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: XMD1QjJW+yrg Greetings help-guix, I've been a casual user of Nix for a couple of years and have decided to test the waters with Guix. While I'm looking forward to spending time with Lisp after many years away, my biggest impression is that Guix seems to have well-documented interfaces in cases where Nix relies more on loose conventions. After reviewing the manual and some of the service definitions, I'd like a better understanding of how to implement a common pattern. Let's say that I have some application Foo that uses an external system for persistence, like a SQL database. Before starting up service Foo I need to ensure both that the database service is running and that the database instance for Foo has been initialized, because Foo doesn't know how to initialize the database on its own. The first issue (how to ensure that the database service is up) seems to be solved by adding a shepherd-root-service-type service extension that declares a set of "requirements". And the second issue (performing pre-startup initialization) seems to be handled by the activation-service-type extension. So far so good. But I couldn't find documentation on whether service activation scripts can safely rely on other services that happen to be declared as requirements in the shepherd-root-service-type extension. And while I found many activation scripts that do simple things like modifying the filesystem, I couldn't see any that interact directly with other services. However, I did see some evidence of service extensions relying on the side effects of other service extensions: a number of activation scripts call "getpwnam" for info on system accounts that could exist only if the corresponding account-service-type extension has already been executed. So my questions are: could someone clarify best practices for initializing state in Service A before Service B starts up? And is there anything about the ordering/dependencies of a service's extensions that could be better documented in the manual? Thanks for all of your work on this project. Jason