From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WFxXCDaA52OD1QAAbAwnHQ (envelope-from ) for ; Sat, 11 Feb 2023 12:47:02 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YHhmBzaA52Py5gAAG6o9tA (envelope-from ) for ; Sat, 11 Feb 2023 12:47:02 +0100 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 E218DAB73 for ; Sat, 11 Feb 2023 12:47:01 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQoL8-0000dy-Uu; Sat, 11 Feb 2023 06:46:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQoL7-0000dp-Dk for help-guix@gnu.org; Sat, 11 Feb 2023 06:46:45 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQoL5-0001of-1D for help-guix@gnu.org; Sat, 11 Feb 2023 06:46:45 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 40271320090F; Sat, 11 Feb 2023 06:46:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 11 Feb 2023 06:46:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=remworks.net; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1676115998; x=1676202398; bh=db4Pn8JABL SrlNhTYs2VVH/O+4shnxj79IR0dpRc0Bk=; b=mdsaMlumoQ7R9szJyTNC76UDCB Z+FHfmXBUPE31vofZ/AmUgpt1DMiQAFEyz5d/HBiq1exC6bVkIGvLYOjoUrPh1+v EjIxFxT31BWEzkQgxm5MjUkRXSJBPePd7ry5WjlYCb05XdG2KUoo5PYKyKA1xaFK a7CXYQ5Vv6HXsiCOFv4+hytQUxt3v1en9F1QZKslcIbBr6lXvrWYruGmdlWqRuE0 15rS8FZJskac3rvENAPZV8xEtkYKgbFoZ3iRNajvTHTyZn6tIy26hq05HPkvU+S/ aOPrF2buEi4pdg5c0R1uncaPgaR4Om+qbE2hf9wr4dzmvT7OIrd3rK+H3P8A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1676115998; x=1676202398; bh=db4Pn8JABLSrlNhTYs2VVH/O+4sh nxj79IR0dpRc0Bk=; b=E9nix+Q+Eutnpr8+n1WQgA/DU5fzUjAQule54zoKyKs/ iOELx4UrUq9rKTuKzQeD7A2/kQ9KraSmbVj/QhOsIaNcN1tlT1XAW2z18sD0sBlC R7C6CyPs8WuWYuRJ8osdcseazUYAsgYsXfENbmn3AccTr6ZhnXmhgwGbq/3kWmiW M8v8b2Q22CPPkBsG2EmGlRVJQEHG8Ua98YEPD5oMf1gLw2mVDlsJ2cgnHDuZ4el3 W/WnojxO+1y1ybqZuwyV2+JQj/HgwLQsBTofd1C6wNGlS6g+IlMFyyzMdyOnHMDi CYXuxus2eHxC3L0oq6tu4U3sFfnYKl8Jd5Ns3aAPMA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudehjedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvvefujgffkfggtgesthdtredttdertdenucfhrhhomheptfgvmhgt ohcuvhgrnhcukdhtucggvggvrhcuoehrvghmtghosehrvghmfihorhhkshdrnhgvtheqne cuggftrfgrthhtvghrnhephfejleelueeiteeftdeljeelveetgeffgfdvjeelffejvedt tefhffduudevvddunecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhgvmhgtohesrhgvmhifohhrkhhs rdhnvght X-ME-Proxy: Feedback-ID: i568842cc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 11 Feb 2023 06:46:37 -0500 (EST) References: <87k00pi15e.fsf@colimite.fr> User-agent: mu4e 1.8.13; emacs 28.2 From: Remco van 't Veer To: Sergiu Ivanov Cc: help-guix@gnu.org Subject: Re: Examples of local-host-entries or hosts-service-type? In-reply-to: <87k00pi15e.fsf@colimite.fr> Date: Sat, 11 Feb 2023 12:46:35 +0100 Message-ID: <87r0uw4e78.fsf@remworks.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=64.147.123.19; envelope-from=remco@remworks.net; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676116021; a=rsa-sha256; cv=none; b=vBXdXB4pj77SNCz81bzKjxPOuGABfq6r9mjo/v7a4MLhKtMAQFkDQ3KexpTXhDGvledRCw RFjC3KzNauOB5fl2BzLKy4wdne8LM5YvE/5mcImPG+P54SxEf0a81FsWcvyDEXfjucLj5a MLW9M1N5erelY7EdzgidX6I+3VDLHwMbVjEdagHINhwrynA/kbDpQDnYqXsCpzV3aP+K6K bB2jVpPNFco0yBGgCO9DM46xvUTKTP0Jrf6uXs/uTJuSpuC38fi3KD0uTnDQ1l8Dec0gB6 a0+pC/glwziklf0tlWKdjDLh0QGGNNmeGChNvxQG3pFixYWS0c5J3PYDQnyCuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=remworks.net header.s=fm3 header.b=mdsaMlum; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=E9nix+Q+; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676116021; 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=db4Pn8JABLSrlNhTYs2VVH/O+4shnxj79IR0dpRc0Bk=; b=eiDDcbul2JOn4I6UqwJM0bm9dfJjPOfYmLFJAbuxCjMHYG9sbICftnORR1ucWKa3hkve10 AvN/Z1DCoFJ6F24O85J/XoYLobjbvaR2i1aGr1TdrZGILShUDREyACruB0gub+hB8owxio 9OSeSAAw1JhRJwc6Xa7Yr1ZLjR4L6eadJCKjguNHB68LbklSari1g6DhZSvfP1ssKho4FW WPPlzeMM+oEyK02lXkdUMJtBDqO8PcpLN/uioIZCuH2Lp63QpMDGF58T1QYxLD5XyeM4uU tPS2gs0FLySrO2Ddcvi4oLGEqpJL6CchmtAVjhVbVRUDiy5ov6fmzmmEYVyEpg== X-Migadu-Spam-Score: -1.00 X-Spam-Score: -1.00 X-Migadu-Queue-Id: E218DAB73 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=remworks.net header.s=fm3 header.b=mdsaMlum; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=E9nix+Q+; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn1.migadu.com X-TUID: rf1Y4H/0ujrE Hi Sergiu, 2023/02/10 23:40, Sergiu Ivanov: > Hello Guix, > > I am reconfiguring my system right now, and guix system reconfigure > /etc/config.scm tells me this: > > /etc/config.scm:126:27: warning: 'local-host-aliases' is deprecated, use 'local-host-entries' instead > /etc/config.scm:126:27: warning: 'local-host-aliases' is deprecated, use 'local-host-entries' instead > /etc/config.scm:124:14: warning: the 'hosts-file' field is deprecated, please use 'hosts-service-type' instead > > For the record, here are the lines guix system reconfigure is > complaining about: > > (hosts-file (plain-file "hosts" > (string-append > (local-host-aliases host-name) > "some.ip.address.1 machine1\n" > "some.other.ip.address machine2\n"))) > > I spent quite some time trying to find some examples of using > local-host-entries or hosts-service-type, but I don't seem to find any > mention of these. Quite on the contrary, the Guix manual actually seems > to advice declarations similar to those which I have in my > /etc/config.scm. > > Could someone point me to an example of how I should update > my configuration? In the guix manual I found this: https://guix.gnu.org/en/manual/devel/en/html_node/Service-Reference.html#index-hosts_002dservice_002dtype So instead of using (hosts-file ..) you'll have to use (hosts-service-type ..) instead, as you already mentioned. You'll end up with something like to following: (operating-system ;; ... (essential-services (modify-services (operating-system-default-essential-services this-operating-system) (hosts-service-type config => (cons* (host "some.ip.address.1" "machine1") (host "some.other.ip.address" "machine2") (local-host-entries host-name))))) ;; ... I tried it and it seems to work for me. Also, I agree the documentation needs some love here. Cheers, Remco