From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id GEuIN9liCWATVQAA0tVLHw (envelope-from ) for ; Thu, 21 Jan 2021 11:17:45 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id +JRdM9liCWDKCgAAB5/wlQ (envelope-from ) for ; Thu, 21 Jan 2021 11:17:45 +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 A5F58940480 for ; Thu, 21 Jan 2021 11:17:45 +0000 (UTC) Received: from localhost ([::1]:35824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2XyC-0003wk-LE for larch@yhetil.org; Thu, 21 Jan 2021 06:17:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2Xva-0001Kz-1S for guix-patches@gnu.org; Thu, 21 Jan 2021 06:15:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l2XvZ-0001wC-Nf for guix-patches@gnu.org; Thu, 21 Jan 2021 06:15:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l2XvZ-0005u7-JM for guix-patches@gnu.org; Thu, 21 Jan 2021 06:15:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45957] [PATCH] * doc/guix-cookbook.texi (Guix System Image API): new section Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Jan 2021 11:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45957 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Joshua Branson Received: via spool by 45957-submit@debbugs.gnu.org id=B45957.161122765322608 (code B ref 45957); Thu, 21 Jan 2021 11:15:01 +0000 Received: (at 45957) by debbugs.gnu.org; 21 Jan 2021 11:14:13 +0000 Received: from localhost ([127.0.0.1]:56953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2Xun-0005sa-Bn for submit@debbugs.gnu.org; Thu, 21 Jan 2021 06:14:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2Xuj-0005sE-Sq for 45957@debbugs.gnu.org; Thu, 21 Jan 2021 06:14:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40337) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2Xud-0001VW-JR; Thu, 21 Jan 2021 06:14:03 -0500 Received: from [2a01:e0a:19b:d9a0:98b7:b002:9499:5e2c] (port=44170 helo=cervin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l2Xuc-0004gR-T6; Thu, 21 Jan 2021 06:14:03 -0500 From: Mathieu Othacehe References: <87o8hjzrk3.fsf@gnu.org> <20210120171254.3403-1-jbranso@dismail.de> Date: Thu, 21 Jan 2021 12:14:01 +0100 In-Reply-To: <20210120171254.3403-1-jbranso@dismail.de> (Joshua Branson's message of "Wed, 20 Jan 2021 12:12:54 -0500") Message-ID: <87o8hiilty.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45957@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.85 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: A5F58940480 X-Spam-Score: -2.85 X-Migadu-Scanner: scn1.migadu.com X-TUID: hcYZBwR8f4zq Hello Joshua, Thanks for this new revision! It's really nice to follow your live coding sessions. I think it can be very valuable for newcomers willing to dive into Guix internals. > +This record also contains the operating-system to instantiate. The > +@code{format} field defines the image type and can be @code{disk-image}, ^ efi-raw > +@code{compressed-qcow2} or @code{iso9660}. In the future, it could be ^ qcow2 The supported image types list is now longer, so you could add "for instance". We could also specify that "raw" designates disk-image that can be copied as is on the installation media. > +@file{gnu/guix/guix-src/gnu/system/images/novena.scm} You mean @file{gnu/system/images/novena.scm}, right? > + - pinebook-pro-raw > + - pine64-raw > + - novena-raw > + - hurd-raw > + - hurd-qcow2 > + - qcow2 > + - uncompressed-iso9660 > + - raw > + - arm64-raw > + - arm32-raw > + - iso9660 Since recently "raw" has been renamed "efi-raw". > +@lisp > +(use-modules > + (srfi srfi-9) > + (srfi srfi-9 gnu) > + (gnu services linux) > + (gnu system images pine64)) > + > +(define my-pine64-barebones-os > + (set-fields pine64-barebones-os > + ((operating-system-timezone) "America/Indiana/Indianapolis") > + ((operating-system-user-services) > + (cons* > + (service earlyoom-service-type > + (earlyoom-configuration > + (prefer-regexp "icecat|chromium|firefox"))) > + (operating-system-user-services pine64-barebones-os))))) Nice example. However, we generally prefer using inheritance. That would give: --8<---------------cut here---------------start------------->8--- (use-modules (gnu system) (gnu services linux) (gnu system images pine64)) (let ((base-os pine64-barebones-os)) (operating-system (inherit base-os) (timezone "America/Indiana/Indianapolis") (services (cons* (service earlyoom-service-type (earlyoom-configuration (prefer-regexp "icecat|chromium|firefox"))) (operating-system-user-services base-os))))) --8<---------------cut here---------------end--------------->8--- WDYT? Thanks, Mathieu