From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OBq5IdQWLmHF1gAAgWs5BA (envelope-from ) for ; Tue, 31 Aug 2021 13:47:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kMU8HdQWLmHKTgAA1q6Kng (envelope-from ) for ; Tue, 31 Aug 2021 11:47:32 +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 E9D4E1CC7F for ; Tue, 31 Aug 2021 13:47:31 +0200 (CEST) Received: from localhost ([::1]:51380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mL2Ek-0000kU-VC for larch@yhetil.org; Tue, 31 Aug 2021 07:47:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mL2EI-0000jG-U5 for guix-patches@gnu.org; Tue, 31 Aug 2021 07:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mL2EI-0006Eb-Ls for guix-patches@gnu.org; Tue, 31 Aug 2021 07:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mL2EI-0007l3-IK for guix-patches@gnu.org; Tue, 31 Aug 2021 07:47:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50296] [PATCH 0/2] Add 'guix home' command. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 31 Aug 2021 11:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50296 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Oleg Pykhalov Cc: 50296-done@debbugs.gnu.org Received: via spool by 50296-done@debbugs.gnu.org id=D50296.163041038529775 (code D ref 50296); Tue, 31 Aug 2021 11:47:02 +0000 Received: (at 50296-done) by debbugs.gnu.org; 31 Aug 2021 11:46:25 +0000 Received: from localhost ([127.0.0.1]:33181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL2Dg-0007k9-Rx for submit@debbugs.gnu.org; Tue, 31 Aug 2021 07:46:25 -0400 Received: from mail-lj1-f172.google.com ([209.85.208.172]:44636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mL2De-0007ju-HB for 50296-done@debbugs.gnu.org; Tue, 31 Aug 2021 07:46:23 -0400 Received: by mail-lj1-f172.google.com with SMTP id s3so31200628ljp.11 for <50296-done@debbugs.gnu.org>; Tue, 31 Aug 2021 04:46:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=+/qld5Krf+/V13XGkjwrcsZfwOLuAiQ3r4uMimhpG2c=; b=b/bwAM4myLheMtWbs8LAJJsulLhMzZh0xP3orT9bDjwlcMxtE/etvojDcki+O08FYC SuJKYzObz2s/g0pbU7S8ZwHbnULfiOYfLmLfwjBYE9rs9WP/t78coHhEhfLrZ/mXwSmE GHpotLm/9rnLyxNimNrB2R+jB1+UvnsIML63XdAXiG6ktOa+JE1fB7ny2X2yy089BzAw h3Fiz4S2eyTe2KTnBZKL/Xeg25gMSqk3ZUqjNvmlPcQ6JaF49tpU2pZQZKMBTBSuBT3e MjwRqJjAqNNSpMg7D7B0WJOMWS147P19KY3Fde1kUYGSO9k9Fri3o1aI+/s9Lk4MXpA5 dlYA== 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:in-reply-to:references:date :message-id:mime-version; bh=+/qld5Krf+/V13XGkjwrcsZfwOLuAiQ3r4uMimhpG2c=; b=ElrUc4QdqevNT2W4NeeMuyllE2IQXHGHp2/XO0IQrZ0goupQ71L7kNVUV0z2wkpaJk riuuwv+WKVb81LvchyE/AIz8kICfcZWGUyRUsxS1YbBz+Stq1VL7ev7UpKI6BKRs1pEI nIb6WwJlBt3f2Rb9qQvsIm1BvOl1h+5F3Dix8XVgZSaOSuLUbUtrGcmpJgGPGr07oGrm MQiy89waiB/5OKm2f3mNERreQ9mQgXNeEJA88qPEeYhPsmVQ4DtotzlfPngP+8Xvg/Zt 8Hszu7RozSDmuLTh81zLOPqCBvjS/1T+eAztB+yQ+YSuZBUDMUd3SQoHgY4GE8bzmKrS 7lXQ== X-Gm-Message-State: AOAM5331+07PmyaUPquHXcyh2S683xKm7VbmEzMMOxrFxXbcR9nINwjI PDTeyy1HCtfGz9GewiYeqJ4bbg== X-Google-Smtp-Source: ABdhPJyoFeiIOy01nBHT/XTxrhHkz8BI/gtoTU1G3rlLvYsuGtzCSWs8FuWuqy1DEr4zFr00K6qkqA== X-Received: by 2002:a2e:b529:: with SMTP id z9mr24414725ljm.149.1630410376204; Tue, 31 Aug 2021 04:46:16 -0700 (PDT) Received: from localhost (109-252-93-92.nat.spd-mgts.ru. [109.252.93.92]) by smtp.gmail.com with ESMTPSA id bn3sm2347783ljb.18.2021.08.31.04.46.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 04:46:15 -0700 (PDT) From: Andrew Tropin In-Reply-To: <87tuj598an.fsf@gmail.com> References: <874kb6j718.fsf@trop.in> <87tuj598an.fsf@gmail.com> Date: Tue, 31 Aug 2021 14:46:11 +0300 Message-ID: <87sfypj0qk.fsf@trop.in> 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=1630410452; 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-cc: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=+/qld5Krf+/V13XGkjwrcsZfwOLuAiQ3r4uMimhpG2c=; b=lPpt22R3h3YiA3xqjD5rafAabCWg4CaZiEdQV+wbQitPjud8h3my09bAdpa+xOQZiZjhIc FWVtb8tIUefN4H8mraF5ZAiDOJVdjJMCfRnOKh1Go/AeIKObeyGmNErRq451rAK41AsmR+ IHAx+pFw3fDdB41UvDmVc9sLjjiDIsLPmTPVE3Zy8H3zV16yrfJtnmFz7n3eNfCSbnUQKn bEEXC1nSsF9e+jTYCl0gn55e/Rf9yFlJWdujebS2qG/eoF/vTzOISV/3xh3WSIwmDAq/bd LXPbm4cAIjqqrGuPLRrDcLHUzt46CGRJ1qxVRAbblzFboud3Uc/mMyJubvBTaA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630410452; a=rsa-sha256; cv=none; b=mYms4bL5hloQiS0Hnm6nnDuQ+70ITmi4v6P8AWDvBGpcBYw3HgyZEynE0WsvUWzvd5czdC dNlg1jtKZw5fI/TYiztOrjm5B+t/IsYY9FVWHuWFNau00rWEUOzBJakiL1AJUbq8+aL//d xkmS1tMfW0CrHjg1347CLqmxJqHl9Vh5X++Mg5rX++Az/+w+GbmdvtKpNL3NKTm/E8trH2 mlpF7tEJoiK6anTixPTECMwf85gc7EgYddf5AB8DntBIBH+lezK94/3Kn9Z0gL6L/QuFhZ 0U1C/kg1dwRXiOMpiu7CTpHdlB1t3y1ORZXRZ5TO6fH4EJNjCqJOfjXKL1tWog== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b="b/bwAM4m"; dmarc=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: -2.02 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20150623.gappssmtp.com header.s=20150623 header.b="b/bwAM4m"; dmarc=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: E9D4E1CC7F X-Spam-Score: -2.02 X-Migadu-Scanner: scn0.migadu.com X-TUID: yTh1MEsdb5Ro --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-08-31 14:13, Oleg Pykhalov wrote: > 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. > In rde we have home-services-utils, during recent refactoring I took parts of it and split into home-services utils and home-services configure modules. For some reason I missed that xdg still uses it and I didn't get rid of this import, I'll update xdg module and send patches for it, thank you for noticing the issue. >=20 > 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: > --8<---------------cut here---------------start------------->8--- > (string-append #f "/" "profile/share/fonts") > In procedure string-append: Wrong type (expecting string): #f > --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= /src/guix-wip-guix-home --branch=3Dwip-guix-home -p /tmp/guix/guix > > ~/.local/share/chezmoi/dotfiles/guixsd/home.scm: > --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= .conf")))) >=20=20=20=20 > ;; XXX: missing home-ssh-configuration > ;; (service home-ssh-service-type > ;; (home-ssh-configuration > ;; (extra-config > ;; (list > ;; (ssh-host "savannah" > ;; '((compression . #f))))))) > > ))) > --8<---------------cut here---------------end--------------->8--- > > My first guix home reconfigure launch: > --8<---------------cut here---------------start------------->8--- > oleg@guixsd ~/src/guix-wip-guix-home$ /tmp/guix/guix/bin/guix home reconf= igure ~/.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-c= onfigs-backup. > > Skipping /home/oleg/.config (directory already exists)... done > Creating /home/oleg/.config/fontconfig... done > Symlinking /home/oleg/.config/fontconfig/fonts.conf -> /gnu/store/phj2z2i= iqdhryfy7mqral0b9qz3hlva6-fonts.conf... done > Backing up /home/oleg/.bashrc... done > Symlinking /home/oleg/.bashrc -> /gnu/store/513j2xkszmcmv7fiawh59mr0i1fmi= n55-bashrc... done > Symlinking /home/oleg/.profile -> /gnu/store/fxbppk3pqzdi3zzy0xl5vg1ir6c5= jzq5-shell-profile... done > Backing up /home/oleg/.bash_profile... done > Symlinking /home/oleg/.bash_profile -> /gnu/store/2c3yva8vj5ikb0gspmjvzw0= r9g9i1cxc-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 run-on-change service doesn't handle the case, where the previous generation doesn't exists. Fix should be pretty simple, will send a patch once it done. Thank you for catching this) > --8<---------------cut here---------------end--------------->8--- > > I skipped the error and tried to configure Bash more: > --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)))) > --8<---------------cut here---------------end--------------->8--- > > Another launch, no errors this time: > --8<---------------cut here---------------start------------->8--- > oleg@guixsd ~/src/guix-wip-guix-home$ /tmp/guix/guix/bin/guix home reconf= igure ~/.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'... = 100.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= .drv > 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-c= onfigs-backup. > > Skipping /home/oleg/.config (directory already exists)... done > Creating /home/oleg/.config/fontconfig... done > Symlinking /home/oleg/.config/fontconfig/fonts.conf -> /gnu/store/phj2z2i= iqdhryfy7mqral0b9qz3hlva6-fonts.conf... done > Symlinking /home/oleg/.bashrc -> /gnu/store/lf51wflmvx91m2jx8hx3j34qs9x1k= 153-bashrc... done > Symlinking /home/oleg/.profile -> /gnu/store/fxbppk3pqzdi3zzy0xl5vg1ir6c5= jzq5-shell-profile... done > Symlinking /home/oleg/.bash_profile -> /gnu/store/2c3yva8vj5ikb0gspmjvzw0= r9g9i1cxc-bash_profile... done > done > Finished updating symlinks. > > Comparing /gnu/store/xl4igqm0jjy7gfbganz9061ivdgzfpdk-home/profile/share/= fonts and > /gnu/store/1y84hzz1m1c3jw03n2g8hn9wwyxngab3-home/profile/share/= fonts... done (same) > Evaling on-change gexps. > > On-change gexps evaluation finished. > --8<---------------cut here---------------end--------------->8--- > > Oleg. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmEuFoMACgkQIgjSCVjB 3rBeTQ//R/adsPvLRB0+bkYq8O8PGYWCLpKLdu9XPuqMuN+FjceajxaqA4hZrTug RP4RSGjQjuy9pVvHBfZ5sYU0h2D/YSrK6piwlyzpa6vmaZvcANCARyi6NjRL1f9W Qf0LN+JGLc4WJTjmx/5WPpTuwXJ3/mlLDNRhLr7KpKb56z4Z5c/y618593fTdUP7 FzNQVfUiQbetjmhgYmw1OS9qTMDA+DcJOnHA4qIgtwtX/HMelLwUEVKMXJWHHtsD QQzbXg9Hi3iuOgB5zVy/yEfVDYmQwIEKOedutIr3dcdz3ZApGcgd9pVNPHnJSVx7 f3fgCOOeE+4dX+QqNGQbN35MCQZ8QldM+VA+VAKOkVXFaNGX6k+rHOUQZoZC7tqb RMRJszxGUUL/z39DAZJgwxiNyDz5bsDv1QAtPZFzy8gNrGBBpFQ7kvxTlr4C/WQq hDC/1U/xF9hQoRbt7soMep4Pj0p1rU9SeiIY6I1ZQIAQdWRlHKOaLsKRLWk9wdLi 0pD6/SPoqWV2E/Ardsc3NXF2X/8PLCdocUiyelg5F3leGdYNlyx+/kxk687cJBUv Sh9uqndCOw++5R2DvKBdhxSWhkS100dxYMKoCHUKOL//eP3Vu6f1dGcNSN2/mGZN TePxYA/W09ZWC8u4GJGpVIumI/soYFLuiHKtpvVP9suALgL5mWA= =HP6T -----END PGP SIGNATURE----- --=-=-=--