From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ARbUMuLqA2QwmwAAbAwnHQ (envelope-from ) for ; Sun, 05 Mar 2023 02:05:38 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id CIuGMeLqA2SRmAAAG6o9tA (envelope-from ) for ; Sun, 05 Mar 2023 02:05:38 +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 97F8722AB2 for ; Sun, 5 Mar 2023 02:05:38 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=envs.net header.s=modoboa header.b=qIqw8xYz; 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=pass (policy=quarantine) header.from=envs.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677978338; 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=ttCyEzFCybP/AU1eprmzzbYuWr/G/CooIFPM1LZqm+M=; b=YT97L1mhECrB/Na3MpyZjN5imVadsiKkNPWa9F3hyRhFoM38lO/Si4vTqSfp8IzQx08yYD HWPwSzRGRp5XSXqB5r9rmbnp+ZlbY65XvOLg9zkpzKEySdevMlrQJmQ4tULIDT9k3frCSh KEIQx0Q44GM1UveF0Qe9BAzUgyQTwaHkoKKbQl5iMgjDj6hh70MuwZ3ovLdL6T/E8RAVaM ynLY9Xrv3k8uOL03qFt+gZtQ4cLdDO/z8IEt3tYcna4DvwtpPLkcGAcl/ZRMXRbhL0BICV +BT6bqBbDpys6hnFkpmltliC4vPbFkuAfMN9ZM3HjwQGDM43GEEJ0sUMzq50yA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=envs.net header.s=modoboa header.b=qIqw8xYz; 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=pass (policy=quarantine) header.from=envs.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677978338; a=rsa-sha256; cv=none; b=HnLN3ztr5arTf2bFl+nsyoq/bTSPtmqbMl5G1N9MkTrv7H1SnHLTR6Y+OLVUkes8OZ8w4r mc1AgRN0JA1AQrbdYg2DzLzrt8Hg6rsKapUevfHpPg4GaDdxofsYBKQpjJqP5gsh3si0lc +M1KLOxQZxPkeoiuD9TcrFmwh2rSO0RIbnkIyTUIAcONpD4oosi2AANb6kIqHNW+18xHa2 l77683DyLSGaI+ND6GC9IpczwN1gq7/7emVsLHkj/+iRmfUJzx9gAXUoKCvPaLEwBGbh1H 5uH8gsofAbyOXUDNQ2CPbk6pYD399KW2ALwwJuCYT7y1I+rKhWDmwegyYdBS8g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYcoJ-0005yP-Lf; Sat, 04 Mar 2023 20:05:11 -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 1pYcoG-0005y8-Qb for help-guix@gnu.org; Sat, 04 Mar 2023 20:05:09 -0500 Received: from mail.envs.net ([5.199.136.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYcoE-0005QY-7O for help-guix@gnu.org; Sat, 04 Mar 2023 20:05:08 -0500 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 071DD38A0874; Sun, 5 Mar 2023 01:04:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1677978296; bh=ttCyEzFCybP/AU1eprmzzbYuWr/G/CooIFPM1LZqm+M=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=qIqw8xYz3ihNjcLrfK0M1lN45wAcjRamsTV713vgSx8NOEJ9ijU4jeMMPSKVRNkEL bfvuLYVKO2xDyrBUvr26LLh62CBmgDqZoMASOHZOXbRvEhtdvAFJjzLnELDmJUONLO qlT5lz/YKadqtrPX1HUzkjgdCHvzfvNwYEh+iyhY/LIGPFkBG6Qhxva0xowvCcun4j N3KhN5OmkdF3aKoeMo6k+jJF+aR+GfkIx9z5IH0D2OsHox4nS277mu6qSv0eynKRV5 MfchLuzaFqDpXQuKU5zsYduFcQBXd+LwLgg9+sGUIx7VVoqurKxBcZD9L9WP6J3Qiy JqiPnRt2nRHQhRIekPVu+SsKbpLEhjNu8ntZBrToNNRPrufv/FzvSTC3qsVX93zQBZ Q/jGuZ86OrXjsMyKeNQlAJvy9CSiLMhHQyIqGR+yyye50WR3yZ/ksRSDeELUqgQ8tf OJbjR2xDZmdqbHFl2ZbdS84Iw++Ivv1S0NqQkX3tytiRAg2E+gUrt0y1eYWDsFMZc/ NakkGst3b6ImkUstTfFn3EyPNt9OhE2Zg0oZRXxRPevYWGdMfvCP+1XijTXQQcCXMt WfvIHG/WBluQ1o/vHMws2cI++IKOGhQAXdUItG5vYbqsKCCWa7FYNngljyP0YBWCEh L8FSERNY2TQop1/1jcnzwkPY= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id e74wbBBNP3dg; Sun, 5 Mar 2023 01:04:52 +0000 (UTC) Received: from localhost (unknown [36.170.59.248]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Sun, 5 Mar 2023 01:04:51 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 1b4be1c3; Sun, 5 Mar 2023 01:04:45 +0000 (UTC) From: =?utf-8?B?5a6L5paH5q2m?= To: Rodrigo Morales Cc: help-guix@gnu.org Subject: Re: Newbie question: Why my system has so many shells.scm files? References: Date: Sun, 05 Mar 2023 09:04:45 +0800 In-Reply-To: (Rodrigo Morales's message of "Sat, 4 Mar 2023 12:32:08 -0500") Message-ID: <87mt4snh3m.fsf@envs.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=5.199.136.28; envelope-from=iyzsong@envs.net; helo=mail.envs.net 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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: -5.14 X-Spam-Score: -5.14 X-Migadu-Scanner: scn0.migadu.com X-Migadu-Queue-Id: 97F8722AB2 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: CZsOXQL77jKq Rodrigo Morales writes: > Table of Contents > _________________ > > 1. The context > 2. The question > > > 1 The context > ============= > > Newbie user here. I'm curious about how `home-bash-configuration' > works, so I wanted to jump to its definition. I know that one way of > doing this is cloning the Guix repository and executing grep to search > that string. In fact, I did this and found it in > `gnu/home/services/shells.scm'. > > Using common sense, I knew that that file also existed in my system, > so I was wondering how I could have accomplished the same objective > without having to download the Git repository, just in case some day I > don't have internet connection > > ,---- > | locate shells.scm | grep '/gnu/store' > `---- > [...] > > 2 The question > ============== > > How to know which of these files is currently being used by my > system? I'm sure not all of them are being used. I'm somewhat > familiar with how generations work, but in other words, I'd like to > know how to determine which of these files is the one that is being > used by the current generation. First to find out what files are currently going to be used the system: $ guix repl > %load-path I got: ``` $1 = ("/gnu/store/sg5mf194lisl59b1bm3a7x6llf3vvhlv-guix-module-union/share/guile/site/3.0" "/gnu/store/qbqdkziw7222077fn4z2x5n91185ivis-guile-3.0.9/share/guile/3.0" "/gnu/store/qbqdkziw7222077fn4z2x5n91185ivis-guile-3.0.9/share/guile/3.0" "/gnu/store/qbqdkziw7222077fn4z2x5n91185ivis-guile-3.0.9/share/guile/site/3.0" "/gnu/store/qbqdkziw7222077fn4z2x5n91185ivis-guile-3.0.9/share/guile/site" "/gnu/store/qbqdkziw7222077fn4z2x5n91185ivis-guile-3.0.9/share/guile" "/home/iyzsong/.config/guix/current/share/guile/site/3.0" "/run/current-system/profile/share/guile/site/3.0" ``` In the first directory, it has: /gnu/store/sg5mf194lisl59b1bm3a7x6llf3vvhlv-guix-module-union/share/guile/site/3.0/gnu/home/services/shells.scm These scm files are guile modules, which will be used by the time 'guix' run. And to find out what the current generation are using, first you need to find out what guix version(s) being used. For system profile, /run/current-system/provenace or /run/current-system/channels.scm has the version (guix commit) info. For user profile, ~/.guix-profile/manifest have it in the provenance property. Then given the commit, how to get the files? If you 'guix pull' before as I did, it can be: ``` cd ~/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq git checkout -f ${COMMIT} ``` Or 'guix pull --commit ${COMMIT}', or git clone a new guix repository... Hope this helps!