From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id e/bUBOc+1GAnowAAgWs5BA (envelope-from ) for ; Thu, 24 Jun 2021 10:14:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IAGKO+Y+1GBiEAAAB5/wlQ (envelope-from ) for ; Thu, 24 Jun 2021 08:14:30 +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 A955F2BD92 for ; Thu, 24 Jun 2021 10:14:30 +0200 (CEST) Received: from localhost ([::1]:39780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwKVJ-0003pF-C7 for larch@yhetil.org; Thu, 24 Jun 2021 04:14:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwKVA-0003p5-RA for guix-devel@gnu.org; Thu, 24 Jun 2021 04:14:20 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:43062 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwKV8-000266-Bf; Thu, 24 Jun 2021 04:14:20 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1624522452; bh=XpG9f/YAX+x7xNKwVw1t/NQzdJb9vGYl7u6HnRts/3w=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=ZZKf2mbfEMqE07qYKCEu8JJWxlmDck4rLfqs/UaY7/BAjFuPkNJVqcsuTRv2sbEEV mNH4KS+wPYv5EAsbHDhiCBknjZsbf2MKyag5mqNan8+ajeHIJfsrLQ4PsW+yeF/I40 34khCK5LYqCFSnPpZYPsdowbeeZZwv8Ce3OoMbV8= To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Andrew Tropin Subject: Re: Early feedback on Guix Home In-Reply-To: <87tuloyb6n.fsf@gnu.org> References: <87tuloyb6n.fsf@gnu.org> Date: Thu, 24 Jun 2021 10:14:11 +0200 Message-ID: <87y2azr86k.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 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, FROM_SUSPICIOUS_NTLD=0.5, PDS_OTHER_BAD_TLD=1.999, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624522470; 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=cFBDLiBAKrti4LEneiid3eJg+gqTqSBQTs6FdnQ7a4Y=; b=jFx/EhMgJ+8n1iYQaso5GagQyUYoJiwVEzZJ6/VS6P7esPJGOCKeRAaQGtof9ZbY6lQjgA xNr7YZasP3zC/Yen2QKzoakCBpFuC+pNWOpT8epry1VcZat/8vbS6p/0cTKTLZodT8wDlJ vIl3w7nft6ja7zvbl6rqioAPkAJ98FG/uJ2JksOczR02vDHGnoHrLpq7Rq+uHsuSHxKDs5 CLGTQr+njG+yXa91Z2VtX/Va69VpBOwMVYczUFULOvz2sifTQfqfiVWSuEdlvVDxg8kN2m ZlcJXZXosszFcPeznFu+EHwTzUQYccgXMLg9ofqnSJsyEeb0ECUkVNES8A1URA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624522470; a=rsa-sha256; cv=none; b=i9ZWa1milEkDxYYLnYytzqoBCSzqLOm53dh2Ruwjl4x7xjo90skIxcoDAvycxfh0ARgNOR tUef/haaOmRj2jBBDLhDN///N8cGzT+AiYvB706nf+hWrCD5DHZ9pUa0GvfEn3gclgjW8V R3oNbxQVHoCC2PUaeqCjUZuW1Qyygp0MrmirfBBmx+51zTKsdNjopoz4CzXn6UQliAiu3Y pelYyeqryrpxCtUdwT/3l2F6dj6Ip0Za4f0NMdIkcv732bOvfwVjI5jhWGunAozTe1pNz6 njxaMIcpo2qWNlZ5/ZzrnT/Dni9INwUEkmSAhWRtGZYeeLUwUhbsZUuF5O6Row== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=ZZKf2mbf; dmarc=pass (policy=none) header.from=yoctocell.xyz; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.73 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=ZZKf2mbf; dmarc=pass (policy=none) header.from=yoctocell.xyz; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: A955F2BD92 X-Spam-Score: -3.73 X-Migadu-Scanner: scn0.migadu.com X-TUID: StFv2pJdITti --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Jun 23 2021, Ludovic Court=C3=A8s wrote: > Hello! > > As discussed on IRC a few days ago, I finally gave Guix Home a try and I > like it! > > I thought I=E2=80=99d share my first impressions so we can try and addres= s them > in the process of getting it merged. > > First, I think one of the main reasons why it took me so long to try it > out is that I was afraid of what would happen at =E2=80=9Cactivation time= =E2=80=9D (upon > reconfigure). Were my dot files going to be deleted? If so, which ones > exactly should I back up? That led me to look more closely at the code > to better understand what was going to happen. I found > =E2=80=98symlink-manager.scm=E2=80=99, which is what I was looking for, b= ut that code is > fairly complex. > > Anyway, I backed up a bunch of files :-) and eventually gave it a try, > just to notice that =E2=80=98guix home reconfigure=E2=80=99 was very care= ful about > creating backups of any files it was going to overwrite, and it was also > explicitly saying what it=E2=80=99s doing. Perfect. Yeah, the output is pretty verbose, which is good if someone is just getting started with it, but there should probably also be an option to make it less verbose. > I see two possible improvements: > > 1. Make the manual very upfront about that: don=E2=80=99t be afraid, co= nfig > files are backed up at that location, etc. Yeah, the manual needs some more work, maybe we should add an =E2=80=98migr= ating to Guix Home=E2=80=99 section? > 2. Review =E2=80=98symlink-manager.scm=E2=80=99 and work on simplifying= it to make it > easier to understand what=E2=80=99s going on. > > Second, the other thing that stopped me from getting started is the > initial config. How could I move from all my undisciplined dotfiles to > the single explicit config? Eventually, I found that starting with > nothing but packages, =E2=80=98home-bash-service-type=E2=80=99, and > =E2=80=98home-ssh-service-type=E2=80=99 was the most reasonable option to= begin with. > > Unfortunately, even =E2=80=98home-ssh-service-type=E2=80=99 was difficult= to handle: I > have a long =E2=80=98.ssh/config=E2=80=99 file and I wasn=E2=80=99t going= to turn that into > =E2=80=98ssh-host=E2=80=99 lines by hand. There is a =E2=80=98home-generic-service=E2=80=99 procedure that allows one= to install packages in dump a file somewhere in their home directory. (home-generic-service 'ssh-config #:packages (list openssh) #:files `(("ssh/config" ,(local-file "/path/to/some/ssh/config")))) > Possible actions: > > 1. Provide a =E2=80=98guix home init=E2=80=99 command (or similar) that= creates an > initial Home config based on existing config. As Andrew mentioned, I recently added a =E2=80=98guix home import=E2=80=99 = command, but in only imports the installed user packages. Creating configurations for the packages would require a lot more work, unless we just read the contents of ~/.bashrc and ~/.config/git/config and use =E2=80=98home-generic-service=E2=80=99 and =E2=80=98plain-file=E2=80=99, in= stead of using =E2=80=98home-bash-configuration=E2=80=99 and =E2=80=98home-git-configurati= on=E2=80=99. > 2. In some cases, such as OpenSSH, provide converters from the native > format to its Scheme equivalent (maybe?). That would require a lot of work; we would have to parse all sorts of weird configuration formats, not to mention that the upstream configuration format can change in the future. It would be nice to have, but I don=E2=80=99t think it should be a blocker for merging Guix Hom= e. > 3. For each service, provide an escape hatch: a way for users to > provide a raw config file. We do that for all or most of the Guix > System services, and it helps a lot when people are starting from > an existing config. Since we already have the =E2=80=98home-generic-service=E2=80=99 helper, I = am not sure if explicitly providing an escape hatch for every single service is worth it. I feel like the point is to use Scheme to configure things, and not to just concatenate big opaque strings. People who haven=E2=80=99t re-written their configs in Scheme can always use =E2=80=98home-generic-service=E2=80=99. =E2=80=98home-generic-service=E2= =80=99 is also useful if say the user wants to configure Mpv, but there is no Mpv service in Guix Home. > In terms of API, I noticed that in places such as > =E2=80=98home-bash-configuration=E2=80=99, config snippets are represente= d as a list of > strings (internally passed to =E2=80=98mixed-text-file=E2=80=99). That f= orces users to > mix different languages in their .scm file=E2=80=94e.g., half of my Home = config > is .bash{rc,_profile} snippets embedded in Scheme strings. That=E2=80=99s > inconvenient. > > Possible action: > > 1. Change config records to accept file-like objects instead of > strings. That way, users can choose to have snippets inlined (in a > =E2=80=98plain-file=E2=80=99 object) or separate (via =E2=80=98local= -file=E2=80=99). See for > example how =E2=80=98tor-configuration->torrc=E2=80=99 does it. Yeah, there is a =E2=80=98slurp-file-gexp=E2=80=99 procedure that let=E2=80= =99s one read an extenal file, but using existing APIs like =E2=80=98local-file=E2=80=99 is = probably a better idea. > That=E2=80=99s it. I hope it makes sense to you! Thank you for the feedback! Great to see that people are using and enjoying Guix Home :) > I encourage everyone to give it a spin, fearlessly! > What I did was (roughly): > > git clone https://git.sr.ht/~abcdw/rde > guix git authenticate \ > "257cebd587b66e4d865b3537a9a88cccd7107c95" \ > "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0" \ > -k origin/keyring > ./pre-inst-env guix home reconfigure /path/to/home-config.scm Alternatively, one can also use it as a channel: (channel (name 'rde) (url "https://git.sr.ht/~abcdw/rde")) (introduction (make-channel-introduction "257cebd587b66e4d865b3537a9a88cccd7107c95" (openpgp-fingerprint "2841 9AC6 5038 7440 C7E9 2FFA 2208 D209 58C1 DEB0")))) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmDUPtMVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x58LgP/jzwtJ8YxFMObRyQXidClhglzww2 kITmULr/XhsPsLLP6XTT+Uo+hWXHUcsWn+dR+iYjJYyWWGE9YYwv5awt9ZOd2KJ/ ZVGXd9ukTQhRh8+5sjYIrp+Wynuqk+e7QVjyE02I9Vgr15pJY+LvhRcGhVuGoVtt vQrvXgI3WVjDqVdwI+hB4mApFJLAHh1uJzjZaOuONUeLNr+2Ns6VDvxSkKck79hT nUB2WGTcbWnfOPqcW9GKuDpiuECSt6hkLIHnANBra7x0H8naW2ks03QbEyRBJhkz uzrx7uJR8rolwOuxyT91x49meV/xnYTrXq9b34d2NL3TXOq5cZds4PgZdG1Dffdi vsp0ikjR5Y/IW3krvhb6u+/nylGlWrYFijYAGdvtaYsrbMAnWbjez7GsU27oi5xL kaHKwddBAx9KHaYsrChosXdB1WviQrawuuFBklbEKfGGrJeQm2CE4RZmaMEZSnVf wzIm0vmvzX8GqKEoPTUzmDTBaR15mmBkQpdj2Na15cBW5SP9q/2vteH1eL/y75oc giK9GgAIjZBagY6v8vNLlyudORywcz7qSLoQlo+mGoMr0OyJOr2J8iy+TvfSO31G NYi+qyxADgpuwkKMMyKryAZGvUP6ak4qC9Seev8l97WnuFH2mvwN4mnwPPUyyBhN UyRr1QSB4bCEwIfO =9JA1 -----END PGP SIGNATURE----- --=-=-=--