From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cOI6CfoMAGRO3QAAbAwnHQ (envelope-from ) for ; Thu, 02 Mar 2023 03:42:02 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WC4vCfoMAGTxLgEAauVa8A (envelope-from ) for ; Thu, 02 Mar 2023 03:42: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 C24E33B112 for ; Thu, 2 Mar 2023 03:42:01 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677724922; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=xR6i805pALDwiPx9lxUttiiJ0UWOVjjoenYSob7lQ44=; b=gXSnqtHBnOwcXNZeALHMlWC2wrATwr3rwW33kHSjjWwyWufLeButvTwsu0ByPAx3hu5XJy GVgfEt6ZdsKdCIitclZRvjBU/WZ91Vz65oe4+vxCgCLR91KAXQJ+ukDDvMINlxW+/Uksos nHsPy/2m3UzWj+cbAewponpl4td7rwxj4DQcKDARB4BF+ZJEXQsP8fMNvve4G+41K6dtI/ 9oIRw9DtSYMMtXeG6B6UWdi6g/RR9ufAE/EWCFqUGQ5JIcWvj0sflu2z2Wy9yEz/9HPNRi 715/UKCjSR3RUJZKWaHrH2PRy3dplaFGi9yiKcp4FTG2N1W2J3jOHi5zXTYBCA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677724922; a=rsa-sha256; cv=none; b=pjcmtIkjTlfsaSjfbYAgfvAkeqQnMaDDGH+00SCs2NpyJ+xbBKwmwGN3VhcE+sN3eSMhU7 yiHn9qb9bYyqptciAgH0twk4TGQoHPxosjplx/3P8USQIx8SBJbZ0XU+20GaF1EKz9kI0D VUnoHrze9Em7MWdOf0kEEfB1/01LW2bpMW9GAiZpJtDU2lEbQn0JTaTwZhnIu5RacXAJko o/efYsmOPcS+xOuF/w+GN+V8102vOxHbZ8k9xE3EgWaP5wMZFskFMGC1JqrTGX6tOE1YKF 3GkTRdnwqtam+7U9vF0PuhfjMHzx072z4kRflr90Ndk/vC46okiWi/V6JHCCcA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXYss-00060x-FA; Wed, 01 Mar 2023 21:41:30 -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 1pXYsr-0005yC-0G for help-guix@gnu.org; Wed, 01 Mar 2023 21:41:29 -0500 Received: from smtpm2.myservices.hosting ([185.26.105.233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXYsp-00083R-8y for help-guix@gnu.org; Wed, 01 Mar 2023 21:41:28 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm2.myservices.hosting (Postfix) with ESMTP id 70FC320E3C; Thu, 2 Mar 2023 03:41:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id CD73680097; Thu, 2 Mar 2023 03:41:23 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id i6kjn48LDoho; Thu, 2 Mar 2023 03:41:23 +0100 (CET) Received: from [192.168.1.239] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 60B1180079; Thu, 2 Mar 2023 03:41:23 +0100 (CET) Message-ID: <931ac97b-c1a1-f35e-02c9-cfbaa4ec2b08@makinata.eu> Date: Thu, 2 Mar 2023 02:41:22 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: Examples of local-host-entries or hosts-service-type? Content-Language: en-US To: Remco van 't Veer Cc: Sergiu Ivanov , help-guix@gnu.org References: <87k00pi15e.fsf@colimite.fr> <87r0uw4e78.fsf@remworks.net> <06820a20-4a77-1707-a289-b83afdf7b026@makinata.eu> <87cz5vmxt9.fsf@remworks.net> From: Bruno Victal In-Reply-To: <87cz5vmxt9.fsf@remworks.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=185.26.105.233; envelope-from=mirai@makinata.eu; helo=smtpm2.myservices.hosting X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.09, SPF_HELO_NONE=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: X-Migadu-Spam-Score: -2.79 X-Spam-Score: -2.79 X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: C24E33B112 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-Country: US X-Migadu-Flow: FLOW_IN X-TUID: i+Vr1D6/NUAX Hi Remco, On 2023-02-27 06:23, Remco van 't Veer wrote: > > Or when you want to provide extra aliases for localhost? > > Like this? > > (essential-services > (modify-services > (operating-system-default-essential-services this-operating-system) > (hosts-service-type config => > (list (host "127.0.0.1" "localhost" (list host-name "foo" "bar")) > (host "::1" "localhost" (list host-name "foo" "bar")))))) Semantically you're right though I wouldn't outright do this unless it results in clearer code or if its really needed. Reason for this is that the format of /etc/hosts isn't consistently defined. For instance, there is a limit on the maximum number of aliases. (depending on the implementation) If I wanted to add extra aliases, I'd extend the service with new "standalone" host records instead though your snippet is just as valid, as long you don't go overboard with the number of aliases. Cheers, Bruno