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 ms0.migadu.com with LMTPS id oJQVHw4PLmEoxwAAgWs5BA (envelope-from ) for ; Tue, 31 Aug 2021 13:14:22 +0200 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 KEjAGg4PLmFwAgAAB5/wlQ (envelope-from ) for ; Tue, 31 Aug 2021 11:14:22 +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 5B3691D5E0 for ; Tue, 31 Aug 2021 13:14:20 +0200 (CEST) Received: from localhost ([::1]:52350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL1id-0005QN-0Q for larch@yhetil.org; Tue, 31 Aug 2021 07:14:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL1iM-0005Jb-LH for guix-patches@gnu.org; Tue, 31 Aug 2021 07:14:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mL1iM-0005vr-Cy for guix-patches@gnu.org; Tue, 31 Aug 2021 07:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mL1iM-0004oM-6W for guix-patches@gnu.org; Tue, 31 Aug 2021 07:14:02 -0400 Subject: bug#50296: [PATCH 0/2] Add 'guix home' command. Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Tue, 31 Aug 2021 11:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 50296 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Tropin Cc: 50296-done@debbugs.gnu.org Mail-Followup-To: 50296@debbugs.gnu.org, go.wigust@gmail.com, andrew@trop.in Received: via spool by 50296-done@debbugs.gnu.org id=D50296.163040840418434 (code D ref 50296); Tue, 31 Aug 2021 11:14:02 +0000 Received: (at 50296-done) by debbugs.gnu.org; 31 Aug 2021 11:13:24 +0000 Received: from localhost ([127.0.0.1]:33148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL1hg-0004nC-3D for submit@debbugs.gnu.org; Tue, 31 Aug 2021 07:13:24 -0400 Received: from mail-lf1-f49.google.com ([209.85.167.49]:46046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL1ha-0004mt-HA for 50296-done@debbugs.gnu.org; Tue, 31 Aug 2021 07:13:18 -0400 Received: by mail-lf1-f49.google.com with SMTP id g13so37630415lfj.12 for <50296-done@debbugs.gnu.org>; Tue, 31 Aug 2021 04:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=trs1tGGlMLUqLqkOzxEECNwAcat2jsnTzFPzDTyDYbE=; b=ovgSfNJumB9/wI5VT/O+74Sea62vqr5UBBK5IN3i8OTdVLsgX101I/ehhUDwxmgROX GjHQG2mfGn/6htPnzIJXBhtXr38QEZO697Mhf3evS+UDk7bzJFz2atvmT6sePFhFZnhZ 7cXnL7/DzubffKGaXF34HoceEdkO69ZNbSVp6EyNP9jgUzFGQyEf0GYdCp13Vui/m1Sg L8HPlMBjcEkI2G1S8lbHar1VziUm8+LCejbbVdOlzSUONOc/6c9JXUGahSyyd6u/c8if L8NA7HzFQtzbdu8PmHeTnH25bOW6Fr7Edecq7bxY8nSQvUxoLzSrOhiAkmMLtQpVlt1B bX8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=trs1tGGlMLUqLqkOzxEECNwAcat2jsnTzFPzDTyDYbE=; b=iGzMrBOlWYFZkX6YvKUzhKQgRA2oPwQKPsSHA2KSkr8iVK4an/9JAfs3m1HT4DBlQ2 mnBeG33GVMl9ybQY2Eg3OGgtRx6m9/OHTKOkfvxBKvP7KeelRccrvQfPkVSfSLEAODzg qosloCmptcJvPoRCcohOa7ss9SEY8pUXxXisis4VyCJnUJkPvpIMkvUrQqRMl92TqnYE OqN6Hel2WTCbTsdMItWe89Uwiff0Dp0DqkVrG62CZt9xJ0qkbwPZD7APHQZC6qDPzLyR 387fYY1MY0j+6BvlP6uPwXXSX4ur6rxhtMMX/TiSwyssARlphIpVuaixt+sCEJYZO4x5 VdYQ== X-Gm-Message-State: AOAM5326MzWNJGuTkCOheu1vkkVPyrhJFIdhl1YbgvApW4fMcziJKHl/ 0zYPju7yQ9pSlsZTZhTyn2KzqiBojb4= X-Google-Smtp-Source: ABdhPJxw3HrOAOAi0ArZ3HZmqs9cn9MtDLqZvZTNaTBTwG2Cqyl/wgn5jJI54xi1kbnWwPLlxdwPNQ== X-Received: by 2002:a05:6512:b8f:: with SMTP id b15mr20340757lfv.577.1630408387981; Tue, 31 Aug 2021 04:13:07 -0700 (PDT) Received: from guixsd ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id bn16sm2137374ljb.74.2021.08.31.04.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 04:13:07 -0700 (PDT) From: Oleg Pykhalov References: <874kb6j718.fsf@trop.in> Date: Tue, 31 Aug 2021 14:13:04 +0300 In-Reply-To: <874kb6j718.fsf@trop.in> (Andrew Tropin's message of "Tue, 31 Aug 2021 12:28:12 +0300") Message-ID: <87tuj598an.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630408460; 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:resent-to:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=trs1tGGlMLUqLqkOzxEECNwAcat2jsnTzFPzDTyDYbE=; b=B4wsbgqIBJ5oAIj0RzczIlfvjSmRvYsyxRoTfSBpI60W2GfG3xni9NPvh2jaH/vn/iKxnQ RY2rc74q181fCBwXaqLYZQJHFKC6fHageGSVwyemUzLBkrJTXAk7VkE+QS3TMKenK77T0Q pBx8Z/lglnAcoNHaiwm0qXM5pxOkV/ZahdXXPzUelhhO6uvx74q2OGYV8NzoeO9Qn8/2S6 GoUlyXfYUdLf5e4Yy4G+zf2aoroRyyqDEFH858r6j6zfAWkJDIc1kOjdfyUfjbVK3WaDR9 lB0OvXh3wXqWRBAYjpDuQ7Lx34UnOKVM3OELuw/YjMsDFkdtGsTJp57Nkm0j+Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630408460; a=rsa-sha256; cv=none; b=dW0CNFgrvnH8MHGa4DH09owaxXIKLTq/cIp/Ua6rZtGdIH7el/8XcFDjuNhgQF5FEyp3QC ea2D7Wws6wsNK07jHwu+ZqGaEj4FiDO+6ZIx2PIFTY0C+RGRvCrE3AKrCM8w6+J2Ujc22v N0lS8Kcg/0JFClkK+CHx0vatCiRwdleuSyJQNxMz3rogC0P734Nudgk+TA9kiXhprLz+tx bDrzJO47o8cDuOjAQSunFaOMdIvqwpqXrCxrRQATAPJpukRT+C8LsHqI7UumkBtv/3KU8/ 9kvg7hQoaUAwCDrLRWAjDn+ezFJMdrZK4kefre/JezMx/0AWQQHcDvYyOKQCog== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=ovgSfNJu; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Spam-Score: -1.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=ovgSfNJu; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 5B3691D5E0 X-Spam-Score: -1.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4CCRBXydljMQ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Andrew, Andrew Tropin writes: > Command and subbcommands allowing to manage home environment with guix. > > Andrew Tropin (2): > scripts: Add 'guix home'. > scripts: home: Add import subcommand. > > Makefile.am | 3 + > guix/scripts/home.scm | 512 +++++++++++++++++++++++++++++++++++ > guix/scripts/home/import.scm | 241 +++++++++++++++++ > 3 files changed, 756 insertions(+) > create mode 100644 guix/scripts/home.scm > create mode 100644 guix/scripts/home/import.scm I applied your patches and also fixed a typo in gnu/home-services/xdg.scm file, which I noticed during Geiser entering (guix scripts home) module about missing =E2=80=98home-services-utils=E2=80= =99, which should be =E2=80=98home-services utils=E2=80=99. Pushed to wip-guix-home. Also, I tried to use guix home for the first time as documented at site [1], and got an error: =2D-8<---------------cut here---------------start------------->8--- (string-append #f "/" "profile/share/fonts") In procedure string-append: Wrong type (expecting string): #f =2D-8<---------------cut here---------------end--------------->8--- [1] https://guix-home.trop.in/Declaring-the-Home-Environment.html The following text in the message is only about the error. oleg@guixsd ~/src/guix-wip-guix-home$ mkdir /tmp/guix oleg@guixsd ~/src/guix-wip-guix-home$ guix pull --url=3Dfile:///home/oleg/s= rc/guix-wip-guix-home --branch=3Dwip-guix-home -p /tmp/guix/guix ~/.local/share/chezmoi/dotfiles/guixsd/home.scm: =2D-8<---------------cut here---------------start------------->8--- (use-modules (gnu home) (gnu home-services) ;; (gnu home-services ssh) (gnu home-services shells) ;; (gnu home-services files) (gnu services) (gnu packages admin) (guix gexp) (ice-9 rdelim)) (define %home (and=3D> (getenv "HOME") (lambda (home) home))) (define .bash_profile (string-append %home "/.local/share/chezmoi/dot_bash_profile")) (home-environment ;; (packages (list htop)) (services (list (service home-bash-service-type (home-bash-configuration (guix-defaults? #t) (bash-profile (list (with-input-from-file .bash_profile read-string))))) ;; XXX: missing home-files-service-type ;; (simple-service 'test-config ;; home-files-service-type ;; (list `("config/test.conf" ;; ,(plain-file "tmp-file.txt" ;; "the content of ~/.config/test.c= onf")))) =20=20=20 ;; XXX: missing home-ssh-configuration ;; (service home-ssh-service-type ;; (home-ssh-configuration ;; (extra-config ;; (list ;; (ssh-host "savannah" ;; '((compression . #f))))))) ))) =2D-8<---------------cut here---------------end--------------->8--- My first guix home reconfigure launch: =2D-8<---------------cut here---------------start------------->8--- oleg@guixsd ~/src/guix-wip-guix-home$ /tmp/guix/guix/bin/guix home reconfig= ure ~/.local/share/chezmoi/dotfiles/guixsd/home.scm /gnu/store/xl4igqm0jjy7gfbganz9061ivdgzfpdk-home New symlinks to home-environment will be created soon. All conflicting files will go to /home/oleg/1630407324-guix-home-legacy-con= figs-backup. Skipping /home/oleg/.config (directory already exists)... done Creating /home/oleg/.config/fontconfig... done Symlinking /home/oleg/.config/fontconfig/fonts.conf -> /gnu/store/phj2z2iiq= dhryfy7mqral0b9qz3hlva6-fonts.conf... done Backing up /home/oleg/.bashrc... done Symlinking /home/oleg/.bashrc -> /gnu/store/513j2xkszmcmv7fiawh59mr0i1fmin5= 5-bashrc... done Symlinking /home/oleg/.profile -> /gnu/store/fxbppk3pqzdi3zzy0xl5vg1ir6c5jz= q5-shell-profile... done Backing up /home/oleg/.bash_profile... done Symlinking /home/oleg/.bash_profile -> /gnu/store/2c3yva8vj5ikb0gspmjvzw0r9= g9i1cxc-bash_profile... done done Finished updating symlinks. Backtrace: In guix/ui.scm: 2185:7 19 (run-guix . _) 2148:10 18 (run-guix-command _ . _) In ice-9/boot-9.scm: 1752:10 17 (with-exception-handler _ _ #:unwind? _ # _) In guix/status.scm: 820:3 16 (_) 800:4 15 (call-with-status-report _ _) In guix/scripts/home.scm: 214:4 14 (_) In ice-9/boot-9.scm: 1752:10 13 (with-exception-handler _ _ #:unwind? _ # _) In guix/store.scm: 658:37 12 (thunk) 1320:8 11 (call-with-build-handler _ _) 1320:8 10 (call-with-build-handler # =E2=80=A6) 2108:24 9 (run-with-store # =E2=80= =A6) In guix/scripts/home.scm: 169:15 8 (_ _) In unknown file: 7 (primitive-load "/gnu/store/xl4igqm0jjy7gfbganz9061ivdg=E2=80= =A6") In ice-9/eval.scm: 619:8 6 (_ #(#(#(#(#(#(#(#(#(#(#<=E2=80=A6> =E2=80=A6) =E2=80=A6) =E2= =80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6)) 626:19 5 (_ #(#(#(#(#(#(#(#(#(#(#<=E2=80=A6> =E2=80=A6) =E2=80=A6) =E2= =80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) = =E2=80=A6)) In srfi/srfi-1.scm: 586:17 4 (map1 (("profile/share/fonts" (system* "/gnu/stor=E2=80=A6" = =E2=80=A6)))) In ice-9/eval.scm: 293:34 3 (_ #(#(# #) = #)) In unknown file: 2 (string-append #f "/" "profile/share/fonts") In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure string-append: Wrong type (expecting string): #f =2D-8<---------------cut here---------------end--------------->8--- I skipped the error and tried to configure Bash more: =2D-8<---------------cut here---------------start------------->8--- (define .bashrc (string-append %home "/.local/share/chezmoi/dot_bashrc")) ;; ... (home-bash-configuration ;; ... (bashrc (list (with-input-from-file .bashrc read-string)))) =2D-8<---------------cut here---------------end--------------->8--- Another launch, no errors this time: =2D-8<---------------cut here---------------start------------->8--- oleg@guixsd ~/src/guix-wip-guix-home$ /tmp/guix/guix/bin/guix home reconfig= ure ~/.local/share/chezmoi/dotfiles/guixsd/home.scm substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 10= 0.0% The following derivations will be built: /gnu/store/fn1hzpyic1k32pamyf45vwa0x3lw046g-home.drv /gnu/store/akdwz30lx0widqvyqmnkya45cb78f74d-files.drv /gnu/store/xcvi7n1l0fvsm099x2vyg6xci0qkayzp-bashrc.drv /gnu/store/pm1gw2xakkqj0zxsbbq0jnwgv3v95ajj-provenance.drv building /gnu/store/pm1gw2xakkqj0zxsbbq0jnwgv3v95ajj-provenance.drv... successfully built /gnu/store/pm1gw2xakkqj0zxsbbq0jnwgv3v95ajj-provenance.d= rv building /gnu/store/xcvi7n1l0fvsm099x2vyg6xci0qkayzp-bashrc.drv... successfully built /gnu/store/xcvi7n1l0fvsm099x2vyg6xci0qkayzp-bashrc.drv building /gnu/store/akdwz30lx0widqvyqmnkya45cb78f74d-files.drv... successfully built /gnu/store/akdwz30lx0widqvyqmnkya45cb78f74d-files.drv building /gnu/store/fn1hzpyic1k32pamyf45vwa0x3lw046g-home.drv... successfully built /gnu/store/fn1hzpyic1k32pamyf45vwa0x3lw046g-home.drv /gnu/store/1y84hzz1m1c3jw03n2g8hn9wwyxngab3-home Cleaning up symlinks from previous home-environment. Removing /home/oleg/.config/fontconfig/fonts.conf... done Removing /home/oleg/.config/fontconfig... done Skipping /home/oleg/.config (not an empty directory)... done Removing /home/oleg/.bashrc... done Removing /home/oleg/.profile... done Removing /home/oleg/.bash_profile... done Cleanup finished. New symlinks to home-environment will be created soon. All conflicting files will go to /home/oleg/1630407412-guix-home-legacy-con= figs-backup. Skipping /home/oleg/.config (directory already exists)... done Creating /home/oleg/.config/fontconfig... done Symlinking /home/oleg/.config/fontconfig/fonts.conf -> /gnu/store/phj2z2iiq= dhryfy7mqral0b9qz3hlva6-fonts.conf... done Symlinking /home/oleg/.bashrc -> /gnu/store/lf51wflmvx91m2jx8hx3j34qs9x1k15= 3-bashrc... done Symlinking /home/oleg/.profile -> /gnu/store/fxbppk3pqzdi3zzy0xl5vg1ir6c5jz= q5-shell-profile... done Symlinking /home/oleg/.bash_profile -> /gnu/store/2c3yva8vj5ikb0gspmjvzw0r9= g9i1cxc-bash_profile... done done Finished updating symlinks. Comparing /gnu/store/xl4igqm0jjy7gfbganz9061ivdgzfpdk-home/profile/share/fo= nts and /gnu/store/1y84hzz1m1c3jw03n2g8hn9wwyxngab3-home/profile/share/fo= nts... done (same) Evaling on-change gexps. On-change gexps evaluation finished. =2D-8<---------------cut here---------------end--------------->8--- Oleg. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmEuDsAUHGdvLndpZ3Vz dEBnbWFpbC5jb20ACgkQFn+OpQAa+px5zhAAwPWVUW9s1WDXP1j5wDHJ355YJRoi JhGScL7rWDibGhaPGSN5pPBPBWeIt5I59uojrMgH9SOqB6pCxcinz38Op5neM/KX S86Axe1iCCyRjGT5RMxPrO0tMwIV0/gW5zrCIir9BFtSEU0LJZBOfr9U2sQb0Lr6 pa+OiWx2CU+X5brtXBLBQyLAmdxSf1+Ps5wa2ZekzfrltFch3x855Je1dZ/cWtke z+0r+ypvRhbZzwBR23bAC9saIWJPqF5AI8dlujo7sOD/oLgQd5VGvqaUmeiiYKOK dNMEUM86qPfuk7CTmBkS4RUHwvKS7tPWGCsiKJ4mgFMwmCHg35l4xT9teOxk9isn xVKRiSdg6/mIGbk8Pn2XUy/hYzmDvlMRkdCWVp8XNU7bI1Hc8LmFesW5RBMVNQwP UM/QTr2+fmOYjO3qCTy1E71MBO25tZk+zSni4R8kdiMl/D6qgdQNRFXE29k3GZst yiQZ744TiE36uNvpfzJiTANSS+GNZZ8ka1s3H3gUWdM9qpFG8p50D33a3Hdg9b7w TzsovR5JWr28kEqALiAH1wSJMFIByChv7Ce9dL9FBE58b3w3bZbGWKIzdP5YM/6r yc33IBATW8RDC/Z/BL8eSzNuK9W9x1heQgpj2i8z2sOYAk94Eiydrc3doF5JW/mL S64IskPyDGvzjkM= =78cW -----END PGP SIGNATURE----- --=-=-=--