From unknown Wed Jun 18 23:11:59 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#52808 <52808@debbugs.gnu.org> To: bug#52808 <52808@debbugs.gnu.org> Subject: Status: Guix home should not assume that all targets are dot files Reply-To: bug#52808 <52808@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:11:59 +0000 retitle 52808 Guix home should not assume that all targets are dot files reassign 52808 guix submitter 52808 "Nick Zalutskiy" severity 52808 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 26 12:36:21 2021 Received: (at submit) by debbugs.gnu.org; 26 Dec 2021 17:36:21 +0000 Received: from localhost ([127.0.0.1]:41454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1XRT-0004ZN-Ui for submit@debbugs.gnu.org; Sun, 26 Dec 2021 12:36:21 -0500 Received: from lists.gnu.org ([209.51.188.17]:42176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1X9f-0003zR-9t for submit@debbugs.gnu.org; Sun, 26 Dec 2021 12:17:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1X9f-0000b7-0q for bug-guix@gnu.org; Sun, 26 Dec 2021 12:17:55 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:55705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1X9d-0003yH-2V for bug-guix@gnu.org; Sun, 26 Dec 2021 12:17:54 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0BCD05C00A3 for ; Sun, 26 Dec 2021 12:17:48 -0500 (EST) Received: from imap43 ([10.202.2.93]) by compute4.internal (MEProxy); Sun, 26 Dec 2021 12:17:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=const.fun; h= mime-version:message-id:date:from:to:subject:content-type; s= fm1; bh=2FJI6N3tXv9rLMVv6rPSgXUdgsy872Hk98N93RXRgG0=; b=jspFbJ5u ACeEdHyBshEmZk7Udsc9U2Mz9hQmQUmAz4QU2eE0p5G7iL0DKefw163Qlj0jV2Kv miVLEXRcwUDKp8vNBNuoILysTOpR/Q4nEztclTaWFFPgpW6SLgfO1l3o/Cv8+c8I ooJ8W/wmvnXb8InozJNgepFKz5VbSEY4P4kALP3U1zT671Cscn4ZsyXes/cCuLjt LcXnxt+SKpyqtOcgcW7b7vRzmNmcbmHepmkA9BIUDLenftWiMYYJG3ww/OQkM74T H1eUu86V2kZjz9ktDjWfcR1dG+NHRDZ4xnk3NhLPb9//zpO165vH4NE4cUJdtyJt 1QuF+LAW/oSYIQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=2FJI6N3tXv9rLMVv6rPSgXUdgsy87 2Hk98N93RXRgG0=; b=hoZOKJaNCMjftVaJdHXV5BvzdIQdwnn2pOu8VrVJNTQ7K vqyDCp0DxR/1RWulTyraSiUuB4ufy1Qr23tLcPsFDG3O7MOQX10V/XKvxLTG2dsy Mqzqzb2Z4JfbRUfk927/8atMWwy6AydDRezzwMo00CNeOEXyaIRzvJegi8i5nsv0 fJsUyqlCoNVJ08FqUIweIX9Xu//RsM2+kZkVH6btVGYX0DsfMLMo2j4sfUxcMkqA nD8xHuFD8ak8UaStSOt9xja1ebcr9HQYl86P+nsCApxHiRUnh1UCP0eH5crKgqmy vM2UTByDavbwdRa3rYIvkz8ZAAZ4rF7xpQSchrDgg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddruddugedgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsegrtderre erredtnecuhfhrohhmpedfpfhitghkucgkrghluhhtshhkihihfdcuoehnihgtkhestgho nhhsthdrfhhunheqnecuggftrfgrthhtvghrnhepheehhefgffelgeelkeffuddutdeftd eigeffleetvdegfedvleekueeuffekgfeknecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepnhhitghksegtohhnshhtrdhfuhhn X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6C95EAC03DB; Sun, 26 Dec 2021 12:17:47 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4525-g8883000b21-fm-20211221.001-g8883000b Mime-Version: 1.0 Message-Id: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> Date: Sun, 26 Dec 2021 12:17:27 -0500 From: "Nick Zalutskiy" To: bug-guix@gnu.org Subject: Guix home should not assume that all targets are dot files Content-Type: multipart/alternative; boundary=081e622674ea40eaa4001c62a82a53c5 Received-SPF: pass client-ip=66.111.4.27; envelope-from=nick@const.fun; helo=out3-smtp.messagingengine.com X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 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.498, FROM_SUSPICIOUS_NTLD_FP=0.001, HTML_MESSAGE=0.001, PDS_OTHER_BAD_TLD=1.997, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The following configuration results in a `~/.run` symlink being created. My expectation is that a `~/run` symlink is created instead. (ie. not a dotfile) > (home-environment > (services > (list (service > home-bash-service-type > (home-bash-configuration > (guix-defaults? #t))) > (simple-service 'my-files > home-files-service-type > `(("run" ,(local-fi [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.51.188.17 listed in wl.mailspike.net] -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: const.fun (fun)] 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message 0.5 FROM_SUSPICIOUS_NTLD_FP From abused NTLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 26 Dec 2021 12:36:18 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.2 (/) --081e622674ea40eaa4001c62a82a53c5 Content-Type: text/plain The following configuration results in a `~/.run` symlink being created. My expectation is that a `~/run` symlink is created instead. (ie. not a dotfile) > (home-environment > (services > (list (service > home-bash-service-type > (home-bash-configuration > (guix-defaults? #t))) > (simple-service 'my-files > home-files-service-type > `(("run" ,(local-file "run"))))))) This applies to all other targets. My expectation is that the configuration should expect the exact target and not make an assumption that all targets are hidden files, since that allows for more utility: > (home-environment > (services > (list (service > home-bash-service-type > (home-bash-configuration > (guix-defaults? #t))) > (simple-service 'config-files > home-files-service-type > `(("run" ,(local-file "run")) > ("README.txt" ,(local-file "README.txt")) > (".config/guix/channels.scm" ,(local-file "config/guix > (".emacs.d/init.el" ,(local-file "emacs.d/init.el")) > (".vimrc" ,(local-file "vimrc")) > (".gitconfig" ,(local-file "gitconfig"))))))) Thank you, -Nick --081e622674ea40eaa4001c62a82a53c5 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
The follow= ing configuration results in a `~/.run` symlink being created. My expect= ation is that a `~/run` symlink is created instead. (ie. not a dotfile)<= br>

(home-environment=
  (services
    (list (= service
        &n= bsp;   home-bash-service-type
   =          (home-bash-configuratio= n
          (= guix-defaults? #t)))
      (simpl= e-service 'my-files
      &n= bsp;       home-files-service-type
           = ;   `(("run" ,(local-file "run")))))))
<= div>
This applies to all other targets. My expectation is = that the configuration should expect the exact target and not make an as= sumption that all targets are hidden files, since that allows for more u= tility:

(home-en= vironment
  (services
   = ; (list (service
       = ;     home-bash-service-type
 &nb= sp;          (home-bash-con= figuration
        = ;      (guix-defaults? #t)))
&nbs= p;         (simple-service 'conf= ig-files
        &= nbsp;     home-files-service-type
&nbs= p;           &nbs= p; `(("run" ,(local-file "run"))
    &= nbsp;           ("READ= ME.txt" ,(local-file "README.txt"))
   &nbs= p;            (".= config/guix/channels.scm" ,(local-file "config/guix
 =             =    (".emacs.d/init.el" ,(local-file "emacs.d/init.el"))
          &nbs= p;     (".vimrc" ,(local-file "vimrc"))
           &nbs= p;    (".gitconfig" ,(local-file "gitconfig")))))))

Thank you,

=
-Nick
<= div>
--081e622674ea40eaa4001c62a82a53c5-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 28 05:52:10 2022 Received: (at 52808) by debbugs.gnu.org; 28 Jan 2022 10:52:10 +0000 Received: from localhost ([127.0.0.1]:57571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDOrS-0004Mg-8T for submit@debbugs.gnu.org; Fri, 28 Jan 2022 05:52:10 -0500 Received: from mail-lj1-f172.google.com ([209.85.208.172]:44768) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDOrP-0004Lx-7w for 52808@debbugs.gnu.org; Fri, 28 Jan 2022 05:52:08 -0500 Received: by mail-lj1-f172.google.com with SMTP id c15so8391501ljf.11 for <52808@debbugs.gnu.org>; Fri, 28 Jan 2022 02:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=t06EdTu/lReJjfuI2ouY01/qbsO0kloAjwmXy0sdgrM=; b=dWWOlRC0kt77MoNzPNbpga9lJwgZsKx9eKTwXRJiJksJqSMZI1Z8piqNr1K0xG0gge AAvZkP0wNvv5vnDqA8VeEB+EkplaifWqBJB+07CnlqDH33Ng6atvY53UHILFWNYRRj1t Z4e22ocHDxXJyBIFm2EfAHrIZAboBhgfbI/v307ckhHP0EXp919lbC3CktuqGmBPdurt Iw8ezeQlf+Er2kIEKbdQqxbsUZylG3PmIK0od10Tsxyg2dctYle1bgGlu/CITMTGS0fZ iAXtrcswQF8VzErjjGPMCApn98PVscdpboX/U1MS04xU0DD1+qYDWmjncNRLdCbvWsEP nBWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=t06EdTu/lReJjfuI2ouY01/qbsO0kloAjwmXy0sdgrM=; b=ErT22MZ2A48TvKRyUlLQJi/uE5MxLX1QfljUxm8ZvxNzjnjr3e9jaeXSozSn2ef22X KMY/7yzmE9DRMQQdOlmn/eurm9/4kO2EGA1bditDdvGyX6ZgIYNLISS0Z2kcvn6Y9p3Q tvOEI6KhEmm3RGZVlec7tKyNUWXokzBHPxqIcfPqUCBI5jPglsjGteSMDfNJF6bedpgR j0ViFnevBVP0urX5g+2D+2pe5msX33hH/Tvl9Z7UsrwRXlRlgPtztsYu9r3Ara/+qbZY UYNunX2RN3T8UyI7xnvy1xh3r4vHHc9zKxI648EBY1373uMejluiEk2IHu4cMFsWyjHC dgTQ== X-Gm-Message-State: AOAM533H/cKymfZws3+mtEqN4upvOEOpB4Dhux/jiGtYcKB/1NmVyowJ vnsA/spsNUWXtRtdr6qSDc91HnfbWnZzJw== X-Google-Smtp-Source: ABdhPJzATC2WZMsY/ddmnj64JhPTT6F6F/CvByB25OumTWNuYfgeXT9lLzAJSsETrz7hvHIWd8/Ukw== X-Received: by 2002:a2e:b05a:: with SMTP id d26mr5536084ljl.153.1643367120965; Fri, 28 Jan 2022 02:52:00 -0800 (PST) Received: from localhost (109-252-135-33.dynamic.spd-mgts.ru. [109.252.135.33]) by smtp.gmail.com with ESMTPSA id cf4sm1428845lfb.280.2022.01.28.02.51.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 02:52:00 -0800 (PST) From: Andrew Tropin To: Nick Zalutskiy , 52808@debbugs.gnu.org Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> Date: Fri, 28 Jan 2022 13:51:57 +0300 Message-ID: <87bkzw2kvm.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 52808 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2021-12-26 12:17, Nick Zalutskiy wrote: > The following configuration results in a `~/.run` symlink being > created. My expectation is that a `~/run` symlink is created > instead. (ie. not a dotfile) Some how I missed it and not documented home-files-service-type in the manual, I'll add it soon. Thank you for mentioning it. It should break this expectation :) >> (home-environment >> (services >> (list (service >> home-bash-service-type >> (home-bash-configuration >> (guix-defaults? #t))) >> (simple-service 'my-files >> home-files-service-type >> `(("run" ,(local-file "run"))))))) > > This applies to all other targets. My expectation is that the > configuration should expect the exact target and not make an > assumption that all targets are hidden files, since that allows for > more utility: > >> (home-environment >> (services >> (list (service >> home-bash-service-type >> (home-bash-configuration >> (guix-defaults? #t))) >> (simple-service 'config-files >> home-files-service-type >> `(("run" ,(local-file "run")) >> ("README.txt" ,(local-file "README.txt")) >> (".config/guix/channels.scm" ,(local-file "config/guix >> (".emacs.d/init.el" ,(local-file "emacs.d/init.el")) >> (".vimrc" ,(local-file "vimrc")) >> (".gitconfig" ,(local-file "gitconfig"))))))) > > Thank you, > > -Nick It's intentional and is a part of a design decision: For example for ("config/guix/channels.scm" ,(local-file "./chans.scm")) chans.scm goes not to ~/.config/guix/channels.scm, but to $XDG_CONFIG_DIR/guix/channels.scm, which can be a different location from ~/.config, absent dot should partially break this expectation. It's a bad practice to use something without "config/..." prefix and generally it should be avoided, it still possible to use something different in rare use-cases, for example for zsh: ("zshenv" ,zshenv-file-like-here), because it's hard to implement the lookup for initial configuration file other way for shells. You can elaborate more on what you try to achieve and I can try to give you a recommendation how to implement it. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmHzys0PHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6w/iUP/j9ysCXYCXrPV+9rweTqixC150fBRMUYpbD8 /Gz3hOCbORvQ+vOksTYWAF1k2/xU4orz/oXqOGhMNAuD9Rv+KntpZ+DsO9pRkQbt +o9qs5b3JkB0EBfUWYddguOrSVTg38VG25HyJm4LK3GW3yVlImEgiCilaN7cf9dd ViGmovywc74AKi3wsM7Zxml1nS8QMy6zdZo9Mm1MVp6RHBreCcrBEum0AFbw0zPx Il3qAynorByapfluuo2FkD2r3yMekvjUaRNY600fZoKir0WyAG28QiDqelC7TPYp VaiYguhmNlLUk3o10hiZnShJ6saqJwCaAN6KBWEDC8ekZL+3+LCuIX9mFIJNM+a3 oEz1MISSG467gMnd4ZJMhG9MeUgUnbsSBD/th96ES3VXL6V0xtQFD0wqyLcoFL4w xqP2KOSkTkyeW6cm0dyYbtk7gBBIvaVduIESv77zk4dMazF7Or1gkAq+DMGz8ys9 IMZ2DEE3Zr2DEungfXaF7Bbbf9FU8kZVt42tEBRTiJvZZREMVc3TaLMDlBoBl2jE d+zVtjeOqYOrLDIhQmRhOlWXFOEMABLyHvhTVOeJrW/BfcrosohBPA9Fcd1XC7O+ GJeUOTcjxkkwUXAeTyocLoYYL1VDCoFQyH38zBsGlgvoHJ+g+Z3+XdvvJr0UleeB kN/hN2F7 =vJjk -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 28 08:33:41 2022 Received: (at 52808) by debbugs.gnu.org; 28 Jan 2022 13:33:41 +0000 Received: from localhost ([127.0.0.1]:57706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDRNk-0002r3-KW for submit@debbugs.gnu.org; Fri, 28 Jan 2022 08:33:40 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:49337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDRNi-0002qn-I1 for 52808@debbugs.gnu.org; Fri, 28 Jan 2022 08:33:39 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id B4E2A3201D6A; Fri, 28 Jan 2022 08:33:31 -0500 (EST) Received: from imap43 ([10.202.2.93]) by compute3.internal (MEProxy); Fri, 28 Jan 2022 08:33:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=const.fun; h=cc :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; bh=3HtbrTLjOUkQgWjFjUP16tgyrVHCQY9KVXEAWj U85zQ=; b=Uet3XM8KGP+EVFZsT05cN/AhrZPNOa/AY4UlGxRmi+woDiHTLPYAMj HppUJbpXWe3Wa9Xr7JqOnFtYO6boyrfD5MntkgnyO6WysvdyjMzVYuU1PKWDr54N +w6Ih4NgfvjkFxvqsRcO4yUqR8pgnm0Ok3+H6ajCX31PGJly64Imog2t0AEkkGAZ EhXj/Ne1ha/LzfKf8ht98eCaiJhuWXtkdMnPh3PdZkPfw9BbcccvRX9IMy/9oTxS CvSPzf5l1xmSeSkpedOt/RGMYPweHFB0vZp1CWpzQ491qz0Kl35FL2n5FE1O0dkv gN/8B6Vpniqek2HNH76CY4mJYl2lmFaQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=3HtbrTLjOUkQgWjFj UP16tgyrVHCQY9KVXEAWjU85zQ=; b=BPCIsZwie4Th+MeDLoy0JlRgHslvYcpmB nYz7A53qBiC5UiwQWmsJRe884xY1iCpfWGE5B1H+92WQD7bBVyXPTwvh4rElxbzz xvH8q203wF3IYdqQrJJ9s/sq/qRJs5Jnnc+JZAmTSYJ360noqypmR3upoZLehybd BZw7ssU01+noEXddIqPXg1UB1oLEODbowQvkmvc4ROeOUO+NzjH8PaCqsMouKy77 LX1Ha5RFxqI1UFLNQUNdXYypENAGTgKGg8MFEu1rlf0S5XOdC1CyqFYC6yPbRZR6 YIViIZ8hxfHzbxhiPP+72ZQWr/W/LZ5vcyZvbTS3fqD+b7uN6Xg1w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrfeehgdehfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfpfhitghk ucgkrghluhhtshhkihihfdcuoehnihgtkhestghonhhsthdrfhhunheqnecuggftrfgrth htvghrnhepheelgfetiedtffejhfffieeiffejteeifffhieelheetkeejfffhjefgfeek heffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepnh hitghksegtohhnshhtrdhfuhhn X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id D40B3AC0E99; Fri, 28 Jan 2022 08:33:30 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4585-ga9d9773056-fm-20220113.001-ga9d97730 Mime-Version: 1.0 Message-Id: <5f2cd1dd-c91d-4fed-8b45-3261e53d92a5@www.fastmail.com> In-Reply-To: <87bkzw2kvm.fsf@trop.in> References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> Date: Fri, 28 Jan 2022 08:33:10 -0500 From: "Nick Zalutskiy" To: "Andrew Tropin" , 52808@debbugs.gnu.org Subject: Re: bug#52808: Guix home should not assume that all targets are dot files Content-Type: text/plain X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Andrew, I have files that I consider my "home configuration" that do not go into .config or any other dot dir. For example, I place an executable shell script to automate some tasks in the home dir of every m [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: const.fun (fun)] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [64.147.123.21 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [64.147.123.21 listed in list.dnswl.org] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 52808 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Andrew, I have files that I consider my "home configuration" that do not go into .config or any other dot dir. For example, I place an executable shell script to automate some tasks in the home dir of every m [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [64.147.123.21 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [64.147.123.21 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: const.fun (fun)] -0.0 SPF_PASS SPF: sender matches SPF record 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Hi Andrew, I have files that I consider my "home configuration" that do not go into .config or any other dot dir. For example, I place an executable shell script to automate some tasks in the home dir of every machine. The script is called `run` all I want to do is place it as ~/run Placing this file in PATH is not appropriate in my case. The current design makes this impossible to achieve it seems. I just live with `~/.run` now, but it is ergonomically cumbersome for reasons that are too obscure to go into. Why not, just as an example: `("$XDG_CONFIG_DIR/guix/channels.scm" ,(local-file "./chans.scm"))` Which is explicit and sets the right expectation without any other context. The implicit heuristics around how the input is interpreted are an unfortunate design decision in my opinion, they make a simple tool more difficult to use. Having said all that, the documentation helps a lot. Thank you for the patch! Best, -Nick On Fri, Jan 28, 2022, at 5:51 AM, Andrew Tropin wrote: > On 2021-12-26 12:17, Nick Zalutskiy wrote: > >> The following configuration results in a `~/.run` symlink being >> created. My expectation is that a `~/run` symlink is created >> instead. (ie. not a dotfile) > > Some how I missed it and not documented home-files-service-type in the > manual, I'll add it soon. Thank you for mentioning it. It should break > this expectation :) > >>> (home-environment >>> (services >>> (list (service >>> home-bash-service-type >>> (home-bash-configuration >>> (guix-defaults? #t))) >>> (simple-service 'my-files >>> home-files-service-type >>> `(("run" ,(local-file "run"))))))) >> >> This applies to all other targets. My expectation is that the >> configuration should expect the exact target and not make an >> assumption that all targets are hidden files, since that allows for >> more utility: >> >>> (home-environment >>> (services >>> (list (service >>> home-bash-service-type >>> (home-bash-configuration >>> (guix-defaults? #t))) >>> (simple-service 'config-files >>> home-files-service-type >>> `(("run" ,(local-file "run")) >>> ("README.txt" ,(local-file "README.txt")) >>> (".config/guix/channels.scm" ,(local-file "config/guix >>> (".emacs.d/init.el" ,(local-file "emacs.d/init.el")) >>> (".vimrc" ,(local-file "vimrc")) >>> (".gitconfig" ,(local-file "gitconfig"))))))) >> >> Thank you, >> >> -Nick > > It's intentional and is a part of a design decision: > > For example for ("config/guix/channels.scm" ,(local-file "./chans.scm")) > chans.scm goes not to ~/.config/guix/channels.scm, but to > $XDG_CONFIG_DIR/guix/channels.scm, which can be a different location > from ~/.config, absent dot should partially break this expectation. > > It's a bad practice to use something without "config/..." prefix and > generally it should be avoided, it still possible to use something > different in rare use-cases, for example for zsh: ("zshenv" > ,zshenv-file-like-here), because it's hard to implement the lookup for > initial configuration file other way for shells. > > You can elaborate more on what you try to achieve and I can try to give > you a recommendation how to implement it. > > -- > Best regards, > Andrew Tropin > > Attachments: > * signature.asc From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 28 10:22:17 2022 Received: (at 52808) by debbugs.gnu.org; 28 Jan 2022 15:22:17 +0000 Received: from localhost ([127.0.0.1]:60207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDT4r-00052E-6y for submit@debbugs.gnu.org; Fri, 28 Jan 2022 10:22:17 -0500 Received: from mail-lj1-f177.google.com ([209.85.208.177]:44030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nDT4o-00051w-1s for 52808@debbugs.gnu.org; Fri, 28 Jan 2022 10:22:15 -0500 Received: by mail-lj1-f177.google.com with SMTP id t7so9455468ljc.10 for <52808@debbugs.gnu.org>; Fri, 28 Jan 2022 07:22:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=39XGu+bE5oXcZWuugE2YC43jUkxGniCe00t20OMpmmo=; b=u65j7D4y2rj/hZUcIzriv10wWpbSOY9rAKlsb77Iw9b+sPR9TDGcV70IazwTR+fh8S 9MY3aTU9kC40FanoCvvOfkU1e3vxRGn0cROWVNytvd2mNDoFDGFxqHkaiF2XDuM/BL1i lsgXDkYeOTzsEVxBfbG1k02phBNqK7RSpkTyvfgR6xl7h05MVc4J1LKWa3KuYhB4xptH TI9py9gVM1ZOblMW78mcUWk4q4qLW1ofpIz3e0dTPumOWzqjyoSFl9OdNNauOWUEitbZ irPItK2HQ4g50tpSExvLUY1wPwhpYKWo60eI83VKo157G6+gPtzrybFQkLKxjKfPm/nG BPuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=39XGu+bE5oXcZWuugE2YC43jUkxGniCe00t20OMpmmo=; b=zyaPRDpVlCG9zSocBUSxmrbwAo1uj6QdzF5zOEMBKKPShwFO1kRpsgHl1kNKkNyUTh S0hBiMDnwrCVkl1fyUjrX200q/7ifFzfEzzYkd7y/iTd+AVTjXJgA1KjK3cde69sYVx/ riGCUeMxrFO2TeH9A7HVRB2MStrIODAOcq/Zq1J2Tw8EEPgaAkHFJ0eFytY28ArI8ppq DSyMVCoX48sy0CThOQjTxLYZBHo5sq8D62qcEL6VosPbhiPL05lQX8rvuKLWqLWcBu3m 8KExgBcsx5vEc4+t5Ns6e+f9DmKPWrdy2FNO9YyLi3qOL7BJEz0u69Chok45YnfZu5cL mmjg== X-Gm-Message-State: AOAM531Len0vWncAxbBbB0wfq4sBkBp8lYmK0VqexH2GgJ+khLRomp7Q rAYlUcavVZo16henxZ6NTsFoKA== X-Google-Smtp-Source: ABdhPJw/EMXccRvJaiq7qH7T+Sj1VUdlwPR8SGad0YBf4QZZiDsNGhVbTza4+w7exQd1S+I6tOzrZw== X-Received: by 2002:a2e:920b:: with SMTP id k11mr6060553ljg.302.1643383327782; Fri, 28 Jan 2022 07:22:07 -0800 (PST) Received: from localhost (109-252-135-33.dynamic.spd-mgts.ru. [109.252.135.33]) by smtp.gmail.com with ESMTPSA id i29sm2322233lfv.131.2022.01.28.07.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 07:22:07 -0800 (PST) From: Andrew Tropin To: Nick Zalutskiy , 52808@debbugs.gnu.org Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <5f2cd1dd-c91d-4fed-8b45-3261e53d92a5@www.fastmail.com> References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <5f2cd1dd-c91d-4fed-8b45-3261e53d92a5@www.fastmail.com> Date: Fri, 28 Jan 2022 18:22:03 +0300 Message-ID: <875yq33mxw.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 52808 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2022-01-28 08:33, Nick Zalutskiy wrote: > Hi Andrew, > > I have files that I consider my "home configuration" that do not go > into .config or any other dot dir. For example, I place an executable > shell script to automate some tasks in the home dir of every > machine. The script is called `run` all I want to do is place it as > ~/run Placing this file in PATH is not appropriate in my case. > > The current design makes this impossible to achieve it seems. I just > live with `~/.run` now, but it is ergonomically cumbersome for reasons > that are too obscure to go into. You can extend activation home service with a script, which will symlink a necessary executable to ~/run. > > Why not, just as an example: > > `("$XDG_CONFIG_DIR/guix/channels.scm" ,(local-file "./chans.scm"))` The $XDG_CONFIG_DIR is not know at build-time, so it won't work. Creating a literal files/$XDG_CONFIG_DIR directory is possible, but also not ideal. However the idea sounds not that bad. > > Which is explicit and sets the right expectation without any other > context. The implicit heuristics around how the input is interpreted > are an unfortunate design decision in my opinion, they make a simple > tool more difficult to use. It's partially intentional to force users to stick to XDG specification for config files and minimize the usage of dotfiles in $HOME. The binaries are inteded to go to profile/bin or other directory on the path. But it always possible to bypass this decision by directly extending home-service-type or home-activation-service-type. I see what you mean about implicit heuristics and mostly agree. > > Having said all that, the documentation helps a lot. Thank you for the > patch! Sure ;) > > Best, > > -Nick > > On Fri, Jan 28, 2022, at 5:51 AM, Andrew Tropin wrote: >> On 2021-12-26 12:17, Nick Zalutskiy wrote: >> >>> The following configuration results in a `~/.run` symlink being >>> created. My expectation is that a `~/run` symlink is created >>> instead. (ie. not a dotfile) >> >> Some how I missed it and not documented home-files-service-type in the >> manual, I'll add it soon. Thank you for mentioning it. It should break >> this expectation :) >> >>>> (home-environment >>>> (services >>>> (list (service >>>> home-bash-service-type >>>> (home-bash-configuration >>>> (guix-defaults? #t))) >>>> (simple-service 'my-files >>>> home-files-service-type >>>> `(("run" ,(local-file "run"))))))) >>> >>> This applies to all other targets. My expectation is that the >>> configuration should expect the exact target and not make an >>> assumption that all targets are hidden files, since that allows for >>> more utility: >>> >>>> (home-environment >>>> (services >>>> (list (service >>>> home-bash-service-type >>>> (home-bash-configuration >>>> (guix-defaults? #t))) >>>> (simple-service 'config-files >>>> home-files-service-type >>>> `(("run" ,(local-file "run")) >>>> ("README.txt" ,(local-file "README.txt")) >>>> (".config/guix/channels.scm" ,(local-file "config/guix >>>> (".emacs.d/init.el" ,(local-file "emacs.d/init.el")) >>>> (".vimrc" ,(local-file "vimrc")) >>>> (".gitconfig" ,(local-file "gitconfig"))))))) >>> >>> Thank you, >>> >>> -Nick >> >> It's intentional and is a part of a design decision: >> >> For example for ("config/guix/channels.scm" ,(local-file "./chans.scm")) >> chans.scm goes not to ~/.config/guix/channels.scm, but to >> $XDG_CONFIG_DIR/guix/channels.scm, which can be a different location >> from ~/.config, absent dot should partially break this expectation. >> >> It's a bad practice to use something without "config/..." prefix and >> generally it should be avoided, it still possible to use something >> different in rare use-cases, for example for zsh: ("zshenv" >> ,zshenv-file-like-here), because it's hard to implement the lookup for >> initial configuration file other way for shells. >> >> You can elaborate more on what you try to achieve and I can try to give >> you a recommendation how to implement it. >> >> --=20 >> Best regards, >> Andrew Tropin >> >> Attachments: >> * signature.asc =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmH0ChsPHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6w9G0QAIKS/dTSksJCJccaUgYhpr86oDmP+eKDG4tv +Dcnp/XlbOLtxyDkzbbugs5o5ZnPwtDFXgNospkWhkNgTLJ1svdCA1s0mHpxd/6g gLgGIl4nerysOGPc1Ycf3BkK8FAXNYpzS+5OR8CARrx7OU6slvpulblY7Vzfk2eD Nt4z6jqmEUiZXq/sJGY7Gqj0auuVFJ9OxR5zGwNAWo7D8BdTusrbbBeqJqid48yf 5DHbUmqML+ZPraWCYasT6bgwiJr0k2+ANHM8lLzDkIwWuc1fhLdCKNEVZGaBnifV SoOOJzQkJ4QdaVu878Hy5FrwkEfTLrRXy54OmB9UCtBCYgvSn4Rvwu5uzQ05wHpP 0SlrrEDKwnWbUX+4ndGjXdbNbkNAmrBPS6dH8WalVddC4bVvKm0TcTJ1IQJfFE2T 5H0FPNLrj4USjsWon3D1Q4QeOhF8LeQ1UHRYrdUhGRTWXdrfSpvLr7NbLb9R/rkb VSHyC2fFbX4/01bt6VaV49mgOkf++YJYzFkGaZDtn9eTEt2pADNi6DgdbKOfRpVn 0W4xBntV37/gBGCT9teqD7w/yTWakqOQ8cQN0OI+BsCZ6WiTuaH5VCurMODM5noa EjSmalsACJGJT8XnazALd2mbqLzpLnZEAOMTP6vWCxipaYQcnNsMV/ZFv5xR4Yt4 SDYgqpvV =q4zE -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 30 12:13:43 2022 Received: (at 52808) by debbugs.gnu.org; 30 Jan 2022 17:13:43 +0000 Received: from localhost ([127.0.0.1]:37547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEDlm-0006MY-Uj for submit@debbugs.gnu.org; Sun, 30 Jan 2022 12:13:43 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:56602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEDlk-0006MJ-Ic for 52808@debbugs.gnu.org; Sun, 30 Jan 2022 12:13:41 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id BE96B2BF; Sun, 30 Jan 2022 18:13:33 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cleBFGGcjYrJ; Sun, 30 Jan 2022 18:13:32 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 4D68E123; Sun, 30 Jan 2022 18:13:32 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: bug#52808: Guix home should not assume that all targets are dot files References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> Date: Sun, 30 Jan 2022 18:13:31 +0100 In-Reply-To: <87bkzw2kvm.fsf@trop.in> (Andrew Tropin's message of "Fri, 28 Jan 2022 13:51:57 +0300") Message-ID: <87o83t9mf8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: BE96B2BF X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi Andrew, Andrew Tropin skribis: > On 2021-12-26 12:17, Nick Zalutskiy wrote: > >> The following configuration results in a `~/.run` symlink being >> created. My expectation is that a `~/run` symlink is created >> instead. (ie. not a dotfile) > > Some how I missed it and not documented home-files-service-type in the > manual, I'll add it soon. Thank you for mentioning it. It should break > this expectation :) > >>> (home-environment >>> (services >>> (list (service >>> home-bash-service-type >>> (home-bash-configuration >>> (guix-defaults? #t))) >>> (simple-service 'my-files >>> home-files-service-type >>> `(("run" ,(local-file "run"))))))) >> >> This applies to all other targets. My expectation is that the >> configuration should expect the exact target and not make an >> assumption that all targets are hidden files, since that allows for >> more utility: I share Nick=E2=80=99s surprise. :-) [...] > It's intentional and is a part of a design decision: > > For example for ("config/guix/channels.scm" ,(local-file "./chans.scm")) > chans.scm goes not to ~/.config/guix/channels.scm, but to > $XDG_CONFIG_DIR/guix/channels.scm, which can be a different location > from ~/.config, absent dot should partially break this expectation. > > It's a bad practice to use something without "config/..." prefix and > generally it should be avoided, it still possible to use something > different in rare use-cases, for example for zsh: ("zshenv" > ,zshenv-file-like-here), because it's hard to implement the lookup for > initial configuration file other way for shells. Oh, I see. > You can elaborate more on what you try to achieve and I can try to give > you a recommendation how to implement it. I=E2=80=99d expect =E2=80=98home-files-service-type=E2=80=99 to do just tha= t: add files to the home directory, without trying to be smart. Would it make sense to distinguish between =E2=80=98home-files=E2=80=99 and= (say) =E2=80=98home-xdg-configuration-files=E2=80=99? The latter would copy files to $XDG_CONFIG_DIR at activation time, whereas the former would just copy them to $HOME. I=E2=80=99d also suggest removing special handling of HOME/files in symlink-manager.scm. Relations between the various components of Guix Home should preferably be made explicit via service extensions, and not implicit through conventions like this =E2=80=98files=E2=80=99 sub-director= y. Thoughts? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 02 03:11:10 2022 Received: (at 52808) by debbugs.gnu.org; 2 Feb 2022 08:11:10 +0000 Received: from localhost ([127.0.0.1]:51333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFAjN-0002UH-7u for submit@debbugs.gnu.org; Wed, 02 Feb 2022 03:11:10 -0500 Received: from mail-lf1-f47.google.com ([209.85.167.47]:44585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nFAjI-0002Td-A0 for 52808@debbugs.gnu.org; Wed, 02 Feb 2022 03:11:08 -0500 Received: by mail-lf1-f47.google.com with SMTP id u14so38936778lfo.11 for <52808@debbugs.gnu.org>; Wed, 02 Feb 2022 00:11:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=bXsLDcxFrt/8HWPVdtN/51bPrN9TEqLj61uK65wDB4g=; b=KYqz36s3PbviB5EcLBOGFdNv9c2GuzzhxHAjx8PTvLvGF24DmiGoKetsKn5fgtUO6Z nK57iJIiVzKTWOWW+MfwhxMrVg3zZ+fhu1Kx0xbyyqXwU0i4WimCf+6HU6sUQ3BIGuGt m25oC+BSVClZcDDgKBJ/5Sj9iaoE1bjU4pFTvQW9NPvsMM5aXD8mXzlG9/z4EXtRVu4m e1y6YoEcMus5MH9DNGn+B5ODl4ibNi4zNC8/Yz8zKQtzHa29+ap5lePoiOnKD3IqeTqa WNfDNXy2RDo8JlYk3j2CKy4Ow3rqoDBmQ8IbDXt+jy/TYFD684M9Z9NweM4oudPWHpnq F2hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=bXsLDcxFrt/8HWPVdtN/51bPrN9TEqLj61uK65wDB4g=; b=wQqPmtW5jc3VsmsN9FhY2OyuNVWHiEmQ1veb+pzIIIgcDCdYjdxG0NZV1+0c0ll/dX npscPZyW8RjD51cXD4SC5QnFCAfOx52dezJKPQMZHsSM8ifga/uEEtkqczNPMvkJ/WZd hTo7o8rzFXtnD+uJhaLDME3vhrTZ2m7OZcZMLXocyCKZ9p3jmBDgSFIJPzxgr0nwFmAg tOcan7UYUkSG4n29EYL13syrItRk1xN3ZobGqdtbKdQvNU0MBRNvNOx2wq2jmYLjZthG Nw6Ze0MWptHZD3JQMdlTo0vBshMEyb/iXO6uWMNhBnbp7SZBxua44gndc86g7hZ9nuCh Odaw== X-Gm-Message-State: AOAM531PYiwEOa0rXVdqIHNXvs0kvRt+ZeOriynAKBzahfNy2DTv72dX 52iBSPKGSqVmNXbacXIQ0U2zMw== X-Google-Smtp-Source: ABdhPJz97C/UF2UoFd5guvfzpxes5pTVUsjHUMKw0SUvnljhln/q/i0q/pdQNxLY0CmkK3CNZYemjA== X-Received: by 2002:ac2:51de:: with SMTP id u30mr22519600lfm.536.1643789458011; Wed, 02 Feb 2022 00:10:58 -0800 (PST) Received: from localhost (109-252-135-33.dynamic.spd-mgts.ru. [109.252.135.33]) by smtp.gmail.com with ESMTPSA id u6sm2063115lfq.207.2022.02.02.00.10.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Feb 2022 00:10:57 -0800 (PST) From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <87o83t9mf8.fsf@gnu.org> References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <87o83t9mf8.fsf@gnu.org> Date: Wed, 02 Feb 2022 11:10:54 +0300 Message-ID: <878rutzo1d.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Julien Lepiller , Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-01-30 18:13, Ludovic Court=C3=A8s wrote: > Hi Andrew, > > Andrew Tropin skribis: > >> On 2021-12-26 12:17, Nick Zalutskiy wrote: >> >>> The following configuration results in a `~/.run` symlink being >>> created. My expectation is that a `~/run` symlink is created >>> instead. (ie. not a dotfile) >> >> Some how I missed it and not documented home-files-service-type in the >> manual, I'll add it soon. Thank you for mentioning it. It should break >> this expectation :) >> >>>> (home-environment >>>> (services >>>> (list (service >>>> home-bash-service-type >>>> (home-bash-configuration >>>> (guix-defaults? #t))) >>>> (simple-service 'my-files >>>> home-files-service-type >>>> `(("run" ,(local-file "run"))))))) >>> >>> This applies to all other targets. My expectation is that the >>> configuration should expect the exact target and not make an >>> assumption that all targets are hidden files, since that allows for >>> more utility: > > I share Nick=E2=80=99s surprise. :-) > > [...] > >> It's intentional and is a part of a design decision: >> >> For example for ("config/guix/channels.scm" ,(local-file "./chans.scm")) >> chans.scm goes not to ~/.config/guix/channels.scm, but to >> $XDG_CONFIG_DIR/guix/channels.scm, which can be a different location >> from ~/.config, absent dot should partially break this expectation. >> >> It's a bad practice to use something without "config/..." prefix and >> generally it should be avoided, it still possible to use something >> different in rare use-cases, for example for zsh: ("zshenv" >> ,zshenv-file-like-here), because it's hard to implement the lookup for >> initial configuration file other way for shells. > > Oh, I see. > >> You can elaborate more on what you try to achieve and I can try to give >> you a recommendation how to implement it. > > I=E2=80=99d expect =E2=80=98home-files-service-type=E2=80=99 to do just t= hat: add files to the > home directory, without trying to be smart. > > Would it make sense to distinguish between =E2=80=98home-files=E2=80=99 a= nd (say) > =E2=80=98home-xdg-configuration-files=E2=80=99? Yep, I can do that, actually, it will be even better for the purpose I originally had. I'll make home-files to store files as it is and symlink manager not to add leading dots and a separate folder for xdg configs. Ludo, Nick, what do you think about following names? ~/.guix-home/home-dir-files/ ~/.guix-home/xdg-config-dir-files/ > > The latter would copy files to $XDG_CONFIG_DIR at activation time, > whereas the former would just copy them to $HOME. > > > I=E2=80=99d also suggest removing special handling of HOME/files in > symlink-manager.scm. Relations between the various components of Guix > Home should preferably be made explicit via service extensions, and not > implicit through conventions like this =E2=80=98files=E2=80=99 sub-direct= ory. > > Thoughts? Unfortunatelly, I don't know how to implement polymorphic behavior the other way with current extension mechanism, so I would prefer to keep this relation implicit, to make it possible to use a different machinery instead of symlink manager to implement advanced techniques similar to read-only home from Julien's guix-home-manager. It's almost impossible to turn off symlink manager unintentionally, so it should be ok. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmH6PI4PHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6w4VgP/1aPYshRcoiRI50ajVWFn+iTiceimi0OgH/3 S/sPbeFjJwWZAOjZDkuyU3edEgdTIAl9uZ8O7SfSjuLggWRakz/JiUgmTkQhSsno oaygfJb1Em8LTY3ATR2Uf8KZJbpJEU6Vf7DdK8uymXIBNofO+9z6B3wyoyjRVOEV yU9HRB7Pp57Jeo6iKu6P1TWZczmbFHq2svRHu9SGGUB6kgnE/cbitMon9zu1v346 a62IXx0+dHq3gvCJMTSxTxVgBVAwrL+xkViRe64BoNh6RglfzGsEWYvpSnI1qzm2 XlgOWDTF0vPxb/1T3ZHGLt0GDhl5VASYEAoMQUxbHRyeX+hTB2AePzU0DtxTMCOj CfCeTZksg4kLD64S1GIAWP1r3eq04WXKneWnNuQTFFV5hUOOFJSJ8ziBBXo+HArr ATH1Fk0egZ875hFcswV0mN3J71MRUot3LlTtHGOTBNc3241lu1nZJ3Z8/ukMFNF5 JAOEJOFcmatq7XybVHUiGdV4m6kg2WtgfmjN7qlWce6cN0IDl7Oqj1Hn9cx6gKDu NiDYuoV43gil2IB0xzxAMXaHk0IkywZL1wz2gwZGnE0U5NhsC0tKRmPpKX4UJ6Wn s1xmsoDvPJDfjzbeCyI9XwwyCRKxW1KotovbYI+OnSBAEDJDV1QOYnm6Zy787jVE 3q3/g57v =UKYf -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 08 04:47:10 2022 Received: (at 52808) by debbugs.gnu.org; 8 Feb 2022 09:47:10 +0000 Received: from localhost ([127.0.0.1]:45325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHN5a-0004vA-0j for submit@debbugs.gnu.org; Tue, 08 Feb 2022 04:47:10 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:35488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHN5V-0004uU-Sa for 52808@debbugs.gnu.org; Tue, 08 Feb 2022 04:47:09 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 4BA7C1EF; Tue, 8 Feb 2022 10:46:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id juZFBe_ntBIB; Tue, 8 Feb 2022 10:46:58 +0100 (CET) Received: from ribbon (unknown [193.50.110.192]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 07188193; Tue, 8 Feb 2022 10:46:57 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: bug#52808: Guix home should not assume that all targets are dot files References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <87o83t9mf8.fsf@gnu.org> <878rutzo1d.fsf@trop.in> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 08 Feb 2022 10:46:57 +0100 In-Reply-To: <878rutzo1d.fsf@trop.in> (Andrew Tropin's message of "Wed, 02 Feb 2022 11:10:54 +0300") Message-ID: <87zgn1bsha.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 4BA7C1EF X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Julien Lepiller , Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, Andrew Tropin skribis: >>> You can elaborate more on what you try to achieve and I can try to give >>> you a recommendation how to implement it. >> >> I=E2=80=99d expect =E2=80=98home-files-service-type=E2=80=99 to do just = that: add files to the >> home directory, without trying to be smart. >> >> Would it make sense to distinguish between =E2=80=98home-files=E2=80=99 = and (say) >> =E2=80=98home-xdg-configuration-files=E2=80=99? > > Yep, I can do that, actually, it will be even better for the purpose I > originally had. I'll make home-files to store files as it is and > symlink manager not to add leading dots and a separate folder for > xdg configs. Neat. > Ludo, Nick, what do you think about following names? > ~/.guix-home/home-dir-files/ > ~/.guix-home/xdg-config-dir-files/ I=E2=80=99d make it =E2=80=98=E2=80=A6/home-files=E2=80=99 and =E2=80=98=E2= =80=A6/xdg-configuration-files=E2=80=99, but that=E2=80=99s a detail. >> I=E2=80=99d also suggest removing special handling of HOME/files in >> symlink-manager.scm. Relations between the various components of Guix >> Home should preferably be made explicit via service extensions, and not >> implicit through conventions like this =E2=80=98files=E2=80=99 sub-direc= tory. >> >> Thoughts? > > Unfortunatelly, I don't know how to implement polymorphic behavior the > other way with current extension mechanism, so I would prefer to keep > this relation implicit, I=E2=80=99m not sure I follow but maybe I should try by myself to get a bet= ter understanding. Thanks for your feedback! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 08 07:58:23 2022 Received: (at 52808) by debbugs.gnu.org; 8 Feb 2022 12:58:23 +0000 Received: from localhost ([127.0.0.1]:45798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHQ4d-0002ZB-Ls for submit@debbugs.gnu.org; Tue, 08 Feb 2022 07:58:23 -0500 Received: from h178-251-242-94.cust.a3fiber.se ([178.251.242.94]:59090 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nHQ4b-0002Yx-IV for 52808@debbugs.gnu.org; Tue, 08 Feb 2022 07:58:22 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yoctocell.xyz; s=mail; t=1644325095; bh=ITeAkys5qmZuUcEXbUjM+PDj0ZmR15JZEZ8UIrK535M=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=Fs25pj4+yAW2+YT3CxCDFysrCyANqS022hNho8liCv8v9fQNV0pljjlHayhjZtYE8 cvzv8Xg/eaHIQc667sR1+ovqRj6GoVT3zoHX8aLeo9eno//3qvVRPvdcIG9OJu62EN co/1tGsWjgshDZUjlzWG3/UwQ0EeqGOLZ2PU02Tc= To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Andrew Tropin Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <87o83t9mf8.fsf@gnu.org> References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <87o83t9mf8.fsf@gnu.org> Date: Tue, 08 Feb 2022 13:58:13 +0100 Message-ID: <875yppzfa2.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, Ludovic schrieb am Sonntag der 30. Januar 2022 um 18:13 +01: > I’d expect ‘home-files-service-type’ to do just that: add files to the > home directory, without trying to be smart. > > Would it make sense to distinguish between ‘home-files’ and (say) > [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, Ludovic schrieb am Sonntag der 30. Januar 2022 um 18:13 +01: > I’d expect ‘home-files-service-type’ to do just that: add files to the > home directory, without trying to be smart. > > Would it make sense to distinguish between ‘home-files’ and (say) > [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] 0.4 RDNS_DYNAMIC Delivered to internal network by host with dynamic-looking rDNS 1.0 BULK_RE_SUSP_NTLD Precedence bulk and RE: from a suspicious TLD 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager 0.0 PDS_RDNS_DYNAMIC_FP RDNS_DYNAMIC with FP steps --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Ludovic schrieb am Sonntag der 30. Januar 2022 um 18:13 +01: > I=E2=80=99d expect =E2=80=98home-files-service-type=E2=80=99 to do just t= hat: add files to the > home directory, without trying to be smart. > > Would it make sense to distinguish between =E2=80=98home-files=E2=80=99 a= nd (say) > =E2=80=98home-xdg-configuration-files=E2=80=99? What about $XDG_DATA_HOME, or any other standard $XDG_* variable? :-) > The latter would copy files to $XDG_CONFIG_DIR at activation time, > whereas the former would just copy them to $HOME. When you say =E2=80=9Ccopy=E2=80=9D, you mean symlinking, right? It would = also be nice to have a service which copies (cp) a file during activation and maybe sets up different permissions for the file, e.g., executable. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmICaOUVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5p5wP/3TXtI9luU2R54gWPU1NQxaWqBnI VDNx4C1BT9B7DfV9jT25FtoXnBrMZGeDY4O/dBu2lZwEh4yePdL2PAyTOT9QWUB1 HzRbb8AI5Be3YOufO3T3ZuL+o2pmmEf3m0FlMxrCB+mTA6SsDfWtDt47lhSx9+v2 VCJHkdpY6EIXFCekO1jZowGZZ/kWB67bckVgbCWxb0i4Tu1MR63gFAX/hgllLzs0 ynaZB/Qrupzflx0tsxELDR8aQbR6y24Mpc8PuXev/NrP7vqcGpLMZOxdQgK9UYIa S/oyCMEd8og77jOL28bhnR0YQ2NOeN3UVRW8BjjFKAHlytko5KwZWwrQ3UnSaotu 2LtIhabzbSObpShZUer4PLobOgRjDFr2k+ENuVqi3wEmoPIcLsX9IXKE6ny2DmTy GTuB1HbO1h2iPXTQdAgprbRvRrRUSM1HhgAjEhSwMG1YqqNDK3sQz4UsBv3gn+al ite3ekMpdNDDMz6t0oVymvsh6a0TXDDXlskzy4mqkzDI8qgHeie8NIjYygZLlVxA k9+7rdx9UhAtkHYxEQGOMrGNsOsK3axIKABqEnD1T80QDkHm+muJUjyr3JHrbgQd vHaRqtII7Pvim4jjwhWWNLatVLfeoo7NLq/56pYtY6YKePvyhaQTNY937/1+wcY9 ayu7EoMe0TrB0uVv =JT36 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 15:32:20 2022 Received: (at 52808) by debbugs.gnu.org; 10 Feb 2022 20:32:20 +0000 Received: from localhost ([127.0.0.1]:57282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIG72-0002uM-BH for submit@debbugs.gnu.org; Thu, 10 Feb 2022 15:32:20 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:38454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIG70-0002u8-Jc for 52808@debbugs.gnu.org; Thu, 10 Feb 2022 15:32:19 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id DA639AD3; Thu, 10 Feb 2022 21:32:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q7sPD6Do4rcl; Thu, 10 Feb 2022 21:32:12 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D25D7174; Thu, 10 Feb 2022 21:32:11 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Xinglu Chen Subject: Re: bug#52808: Guix home should not assume that all targets are dot files References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <87o83t9mf8.fsf@gnu.org> <875yppzfa2.fsf@yoctocell.xyz> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 22 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 10 Feb 2022 21:32:11 +0100 In-Reply-To: <875yppzfa2.fsf@yoctocell.xyz> (Xinglu Chen's message of "Tue, 08 Feb 2022 13:58:13 +0100") Message-ID: <878rui5upg.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: DA639AD3 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, Xinglu Chen skribis: > Ludovic schrieb am Sonntag der 30. Januar 2022 um 18:13 +01: > >> I’d expect ‘home-files-service-type’ to do just that: add files to the >> home directory, without trying to be smart. >> >> Wo [...] Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Nick Zalutskiy , Andrew Tropin X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, Xinglu Chen skribis: > Ludovic schrieb am Sonntag der 30. Januar 2022 um 18:13 +01: > >> I’d expect ‘home-files-service-type’ to do just that: add files to the >> home directory, without trying to be smart. >> >> Wo [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: yoctocell.xyz (xyz)] -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Hi, Xinglu Chen skribis: > Ludovic schrieb am Sonntag der 30. Januar 2022 um 18:13 +01: > >> I=E2=80=99d expect =E2=80=98home-files-service-type=E2=80=99 to do just = that: add files to the >> home directory, without trying to be smart. >> >> Would it make sense to distinguish between =E2=80=98home-files=E2=80=99 = and (say) >> =E2=80=98home-xdg-configuration-files=E2=80=99? > > What about $XDG_DATA_HOME, or any other standard $XDG_* variable? :-) Hmm I don=E2=80=99t know? :-) >> The latter would copy files to $XDG_CONFIG_DIR at activation time, >> whereas the former would just copy them to $HOME. > > When you say =E2=80=9Ccopy=E2=80=9D, you mean symlinking, right?=20 Right. > It would also be nice to have a service which copies (cp) a file > during activation and maybe sets up different permissions for the > file, e.g., executable. Yes. Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 11 10:52:51 2022 Received: (at 52808) by debbugs.gnu.org; 11 Feb 2022 15:52:51 +0000 Received: from localhost ([127.0.0.1]:60827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIYE6-0001He-2v for submit@debbugs.gnu.org; Fri, 11 Feb 2022 10:52:51 -0500 Received: from mail-lf1-f45.google.com ([209.85.167.45]:43580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIYE3-0001HQ-96 for 52808@debbugs.gnu.org; Fri, 11 Feb 2022 10:52:48 -0500 Received: by mail-lf1-f45.google.com with SMTP id x15so194446lfu.10 for <52808@debbugs.gnu.org>; Fri, 11 Feb 2022 07:52:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=NFtpCjKRs1/w6qRZTOz61D5ZQV3/OWX1Z1Ru9l4h5dU=; b=MRwCKirJoGmqgBOPq45ondT86GNrR5pKMZHcrT7Xach/fNQy9SWrFQxX2oDFkAgpUb Ii6fwQyCPRKV1USbxDkeW1RbxPzvYxqTRalwU4SornZtdHUCeQiJRTVg4Oa2czP2XuCL XUAdHi+x2uOtJfiSFfP33WNHN5nGy2NBPf7gdA4lxK+LFJWkYoCxEWEz44UVvGcop6gQ uWmeFSGEDz+dKGxGkh3ZtzamZq9Irt7fXU+Y7mz42vsZA3kzrlE9TBmcbis8AtkjhgSP 91NaTNu588g5myot+R35nRPu02F/5uBT8qdiDgw8iK435Tqgn4x9JQ2euhR6/UbSQUxu Fw+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=NFtpCjKRs1/w6qRZTOz61D5ZQV3/OWX1Z1Ru9l4h5dU=; b=d1LXVisHptH1shy6n7qEm20jFjEUcxcQEwkiHJ5jge0lNRKc6ZkpY8JKmPIzHCxznh 3owbBaNv2/aZ6MOy43vCMAWAaZ3ZjfIAwsDH2aqUob2M2nANbbAG7Ou36SWOpatZsmD3 o564SxeGQumvgS4zL/bH1E9m+W0B2jJ+19rKprJsklEjv7QYZf12ioYPazTnK770Za4q BXREojfySfYDYq8VblvDoDpo2IHZYi0+vgWAJvmoRr1DNKMtOnojh/kdsrB2wnHdlJch qchSxqpUm4aoeBPmFTM7eGxP0XR+JIORKf40AvO51Kdt4QQu4gw0ho69lvRmAg1Ux/5T niXw== X-Gm-Message-State: AOAM5329qoDQQ76sZISRbCwKR0Pu66UTs+YfbFwB0KUBE6NxkxibbyT2 GejXnUXrItwlzLOny7NxsAbUJw== X-Google-Smtp-Source: ABdhPJzHLGip5OVN+BboloNZqd3EBseLMH5H2kt2jp/sAnoAwPNNYYLZSaAHyVut4GLs4pt2Bxi0VQ== X-Received: by 2002:ac2:530c:: with SMTP id c12mr1585919lfh.122.1644594760846; Fri, 11 Feb 2022 07:52:40 -0800 (PST) Received: from localhost ([213.193.20.100]) by smtp.gmail.com with ESMTPSA id h23sm3178140lfv.46.2022.02.11.07.52.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Feb 2022 07:52:39 -0800 (PST) From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <87zgn1bsha.fsf@gnu.org> References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <87o83t9mf8.fsf@gnu.org> <878rutzo1d.fsf@trop.in> <87zgn1bsha.fsf@gnu.org> Date: Fri, 11 Feb 2022 18:52:36 +0300 Message-ID: <87r189s8mz.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Julien Lepiller , Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-02-08 10:46, Ludovic Court=C3=A8s wrote: > Hi, > > Andrew Tropin skribis: > >>>> You can elaborate more on what you try to achieve and I can try to give >>>> you a recommendation how to implement it. >>> >>> I=E2=80=99d expect =E2=80=98home-files-service-type=E2=80=99 to do just= that: add files to the >>> home directory, without trying to be smart. >>> >>> Would it make sense to distinguish between =E2=80=98home-files=E2=80=99= and (say) >>> =E2=80=98home-xdg-configuration-files=E2=80=99? >> >> Yep, I can do that, actually, it will be even better for the purpose I >> originally had. I'll make home-files to store files as it is and >> symlink manager not to add leading dots and a separate folder for >> xdg configs. > > Neat. > >> Ludo, Nick, what do you think about following names? >> ~/.guix-home/home-dir-files/ >> ~/.guix-home/xdg-config-dir-files/ > > I=E2=80=99d make it =E2=80=98=E2=80=A6/home-files=E2=80=99 and =E2=80=98= =E2=80=A6/xdg-configuration-files=E2=80=99, but that=E2=80=99s a > detail. > >>> I=E2=80=99d also suggest removing special handling of HOME/files in >>> symlink-manager.scm. Relations between the various components of Guix >>> Home should preferably be made explicit via service extensions, and not >>> implicit through conventions like this =E2=80=98files=E2=80=99 sub-dire= ctory. >>> >>> Thoughts? >> >> Unfortunatelly, I don't know how to implement polymorphic behavior the >> other way with current extension mechanism, so I would prefer to keep >> this relation implicit, > > I=E2=80=99m not sure I follow but maybe I should try by myself to get a b= etter > understanding. > > Thanks for your feedback! > > Ludo=E2=80=99. I decided to go one step at a time, and prepared a patch series, which: 1. Adds an explicit connection between home-files-service-type and symlink-manager by introducing a global constant used by both services. 2. Adds a home-xdg-configuration-files-service-type, which accepts a list of files for XDG_CONFIG_DIR, `(("mpv/mpv.conf" ,file-like-here)) 3. Migrates all (gnu home services) to xdg-configuration-files. 4. Make symlink-manager respect XDG_CONIFG_HOME and xdg-configuration-files-subdir. After that patch series is merged we can give a time for users to migrate their self-made home services to xdg-configuration-files and after for example 2 weeks, remove special handling of dots for home-files. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-home-Explicitly-connect-home-file-and-symlink-manage.patch Content-Transfer-Encoding: quoted-printable From=200cd37bbc724f9c793898c2655bdd1c335045c5f0 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Feb 2022 10:55:01 +0300 Subject: [PATCH 1/5] home: Explicitly connect home-file and symlink-manager services. * gnu/home/services.scm (home-files-directory): New variable. * gnu/home/symlink-manager.scm (update-symlinks-script): Use home-files-directory variable from (gnu home services). =2D-- gnu/home/services.scm | 23 ++++++++++++++--------- gnu/home/services/symlink-manager.scm | 17 +++++++++-------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 1cd19ce7f9..e4e3717b80 100644 =2D-- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -43,6 +43,8 @@ (define-module (gnu home services) home-run-on-change-service-type home-provenance-service-type =20 + home-files-directory + fold-home-service-types home-provenance =20 @@ -74,12 +76,11 @@ (define-module (gnu home services) ;;; file (details described in the manual). ;;; ;;; home-files-service-type is similar to etc-service-type, but doesn't ex= tend =2D;;; home-activation, because deploy mechanism for config files is plugga= ble and =2D;;; can be different for different home environments: The default one is= called =2D;;; symlink-manager (will be introudced in a separate patch series), whi= ch creates =2D;;; links for various dotfiles (like $XDG_CONFIG_HOME/$APP/...) to store= , but is =2D;;; possible to implement alternative approaches like read-only home fro= m Julien's =2D;;; guix-home-manager. +;;; home-activation, because deploy mechanism for config files is pluggable +;;; and can be different for different home environments: The default one = is +;;; called symlink-manager, which creates links for various dotfiles and x= dg +;;; configuration files to store, but is possible to implement alternative +;;; approaches like read-only home from Julien's guix-home-manager. ;;; ;;; home-run-on-first-login-service-type provides an @file{on-first-login}= guile ;;; script, which runs provided gexps once, when user makes first login. = It can @@ -262,11 +263,14 @@ (define (assert-no-duplicates files) =20 (file-union "files" files)) =20 +;; Used by symlink-manager +(define home-files-directory "files") + (define (files-entry files) "Return an entry for the @file{~/.guix-home/files} directory containing FILES." (with-monad %store-monad =2D (return `(("files" ,(files->files-directory files)))))) + (return `((,home-files-directory ,(files->files-directory files)))))) =20 (define home-files-service-type (service-type (name 'home-files) @@ -276,8 +280,9 @@ (define home-files-service-type (compose concatenate) (extend append) (default-value '()) =2D (description "Configuration files for programs that =2Dwill be put in @file{~/.guix-home/files}."))) + (description (format #f "Files that will be put in +@file{~~/.guix-home/~a}, and further processed during activation." + home-files-directory)))) =20 (define %initialize-gettext #~(begin diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/syml= ink-manager.scm index 314da3ba3e..747bb343d3 100644 =2D-- a/gnu/home/services/symlink-manager.scm +++ b/gnu/home/services/symlink-manager.scm @@ -25,12 +25,11 @@ (define-module (gnu home services symlink-manager) =20 ;;; Comment: ;;; =2D;;; symlink-manager cares about configuration files: it backs up files =2D;;; created by user, removes symlinks and directories created by a =2D;;; previous generation, and creates new directories and symlinks to =2D;;; configuration files according to the content of files/ directory =2D;;; (created by home-files-service) of the current home environment =2D;;; generation. +;;; symlink-manager cares about xdg configurations and other files: it bac= ks +;;; up files created by user, removes symlinks and directories created by a +;;; previous generation, and creates new directories and symlinks to files +;;; according to the content of directories (created by home-files-service= ) of +;;; the current home environment generation. ;;; ;;; Code: =20 @@ -94,7 +93,8 @@ (define ((file-tree-traverse preordering) node) (new-home (getenv "GUIX_NEW_HOME")) (old-home (getenv "GUIX_OLD_HOME")) =20 =2D (new-files-path (string-append new-home "/files")) + (new-files-path (string-append + new-home "/" #$home-files-directory)) ;; Trailing dot is required, because files itself is symlink= and ;; to make file-system-tree works it should be a directory. (new-files-dir-path (string-append new-files-path "/.")) @@ -107,7 +107,8 @@ (define ((file-tree-traverse preordering) node) (old-tree (if old-home ((simplify-file-tree "") (file-system-tree =2D (string-append old-home "/files/."))) + (string-append + old-home "/" #$home-files-directory "/."))) #f)) (new-tree ((simplify-file-tree "") (file-system-tree new-files-dir-path))) =2D-=20 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-home-Add-home-xdg-configuration-files-service.patch Content-Transfer-Encoding: quoted-printable From=2023f7095d60b18b52de0d1aa314c4012cdf55a046 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Feb 2022 11:03:02 +0300 Subject: [PATCH 2/5] home: Add home-xdg-configuration-files service. * gnu/home/services.scm (home-xdg-configuration-files): New variable. =2D-- gnu/home/services.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index e4e3717b80..bf044a0421 100644 =2D-- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -38,12 +38,14 @@ (define-module (gnu home services) home-profile-service-type home-environment-variables-service-type home-files-service-type + home-xdg-configuration-files-service-type home-run-on-first-login-service-type home-activation-service-type home-run-on-change-service-type home-provenance-service-type =20 home-files-directory + xdg-configuration-files-subdir =20 fold-home-service-types home-provenance @@ -284,6 +286,27 @@ (define home-files-service-type @file{~~/.guix-home/~a}, and further processed during activation." home-files-directory)))) =20 +(define xdg-configuration-files-subdir "config") + +(define (xdg-configuration-files files) + (map (lambda (lst) + (cons (string-append xdg-configuration-files-subdir + "/" (car lst)) (cdr lst))) + files)) + +(define home-xdg-configuration-files-service-type + (service-type (name 'home-files) + (extensions + (list (service-extension home-files-service-type + xdg-configuration-files))) + (compose concatenate) + (extend append) + (default-value '()) + (description (format #f "Files that will be put in +@file{~~/.guix-home/~a/~a}, and further processed during activation." + home-files-directory + xdg-configuration-files)))) + (define %initialize-gettext #~(begin (bindtextdomain %gettext-domain =2D-=20 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0003-home-shells-Migrate-zsh-to-xdg-configuration-files.patch Content-Transfer-Encoding: quoted-printable From=2011f23a48d480a91d6bfba0ff55c1a9831585a4ee Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Feb 2022 15:03:44 +0300 Subject: [PATCH 3/5] home: shells: Migrate zsh to xdg-configuration-files. * gnu/home/services.scm (home-zsh-service-type): Additionally extend home-xdg-configuration-files-service-type. =2D-- gnu/home/services/shells.scm | 112 +++++++++++++++++++---------------- 1 file changed, 61 insertions(+), 51 deletions(-) diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index ca7f4ac0ad..4b3618a868 100644 =2D-- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -171,56 +171,27 @@ (define-configuration home-zsh-configuration won't be read in some cases (if the shell terminates by exec'ing another process for example).")) =20 =2D(define (add-zsh-configuration config) =2D (let* ((xdg-flavor? (home-zsh-configuration-xdg-flavor? config))) +(define (zsh-filter-fields field) + (filter-configuration-fields home-zsh-configuration-fields (list field))) =20 =2D (define prefix-file =2D (cut string-append =2D (if xdg-flavor? =2D "config/zsh/." =2D "") <>)) +(define (zsh-serialize-field config field) + (serialize-configuration config (zsh-filter-fields field))) =20 =2D (define (filter-fields field) =2D (filter-configuration-fields home-zsh-configuration-fields =2D (list field))) +(define* (zsh-field-not-empty? config field) + (let ((file-name (symbol->string field)) + (field-obj (car (zsh-filter-fields field)))) + (not (null? ((configuration-field-getter field-obj) config))))) =20 =2D (define (serialize-field field) =2D (serialize-configuration =2D config =2D (filter-fields field))) +(define (zsh-file-zshenv config) + (mixed-text-file + "zshenv" + (zsh-serialize-field config 'zshenv) + (zsh-serialize-field config 'environment-variables))) =20 =2D (define (file-if-not-empty field) =2D (let ((file-name (symbol->string field)) =2D (field-obj (car (filter-fields field)))) =2D (if (not (null? ((configuration-field-getter field-obj) config))) =2D `(,(prefix-file file-name) =2D ,(mixed-text-file =2D file-name =2D (serialize-field field))) =2D '()))) =2D =2D (filter =2D (compose not null?) =2D `(,(if xdg-flavor? =2D `("zshenv" =2D ,(mixed-text-file =2D "auxiliary-zshenv" =2D (if xdg-flavor? =2D "source ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/.zshen= v\n" =2D ""))) =2D '()) =2D (,(prefix-file "zshenv") =2D ,(mixed-text-file =2D "zshenv" =2D (if xdg-flavor? =2D "export ZDOTDIR=3D${XDG_CONFIG_HOME:-$HOME/.config}/zsh\n" =2D "") =2D (serialize-field 'zshenv) =2D (serialize-field 'environment-variables))) =2D (,(prefix-file "zprofile") =2D ,(mixed-text-file =2D "zprofile" =2D "\ +(define (zsh-file-zprofile config) + (mixed-text-file + "zprofile" + "\ # Setups system and user profiles and related variables source /etc/profile # Setups home environment profile @@ -229,11 +200,47 @@ (define (file-if-not-empty field) # It's only necessary if zsh is a login shell, otherwise profiles will # be already sourced by bash " =2D (serialize-field 'zprofile))) + (zsh-serialize-field config 'zprofile))) =20 =2D ,@(list (file-if-not-empty 'zshrc) =2D (file-if-not-empty 'zlogin) =2D (file-if-not-empty 'zlogout)))))) +(define (zsh-file-by-field config field) + (match field + ('zshenv (zsh-file-zshenv config)) + ('zprofile (zsh-file-zprofile config)) + (e (mixed-text-file + (symbol->string field) + (zsh-serialize-field config field))))) + +(define (zsh-get-configuration-files config) + `(("zprofile" ,(zsh-file-by-field config 'zprofile)) ;; Always non-empty + ,@(if (and (zsh-field-not-empty? config 'zshenv) + (zsh-field-not-empty? config 'environment-variables)) + `(("zshenv" ,(zsh-file-by-field config 'zshenv))) '()) + ,@(if (zsh-field-not-empty? config 'zshrc) + `(("zshrc" ,(zsh-file-by-field config 'zshrc))) '()) + ,@(if (zsh-field-not-empty? config 'zlogin) + `(("zlogin" ,(zsh-file-by-field config 'zlogin))) '()) + ,@(if (zsh-field-not-empty? config 'zlogout) + `(("zlogout" ,(zsh-file-by-field config 'zlogout))) '()))) + +(define (zsh-home-files config) + (define zshenv-auxiliary-file + (mixed-text-file + "zshenv-auxiliary" + "export ZDOTDIR=3D${XDG_CONFIG_HOME:-$HOME/.config}/zsh\n" + "[[ -f $ZDOTDIR/.zshenv ]] && source $ZDOTDIR/.zshenv\n")) + + (if (home-zsh-configuration-xdg-flavor? config) + `(("zshenv" ,zshenv-auxiliary-file)) + (zsh-get-configuration-files config))) + +(define (zsh-xdg-configuration-files config) + (if (home-zsh-configuration-xdg-flavor? config) + (map + (lambda (lst) + (cons (string-append "zsh/." (car lst)) + (cdr lst))) + (zsh-get-configuration-files config)) + '())) =20 (define (add-zsh-packages config) (list (home-zsh-configuration-package config))) @@ -291,7 +298,10 @@ (define home-zsh-service-type (extensions (list (service-extension home-files-service-type =2D add-zsh-configuration) + zsh-home-files) + (service-extension + home-xdg-configuration-files-service-type + zsh-xdg-configuration-files) (service-extension home-profile-service-type add-zsh-packages))) =2D-=20 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0004-home-Migrate-fountutils-and-xdg-modules-to-xdg-confi.patch Content-Transfer-Encoding: quoted-printable From=20ef4c3bbcc0c8c1a251f4ad6c494f8ed30adf45f2 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Feb 2022 15:34:46 +0300 Subject: [PATCH 4/5] home: Migrate fountutils and xdg modules to xdg-configuration-files. * gnu/home/services/fontutils.scm (home-fontconfig-service-type): Migrate to xdg-configuration-files. * gnu/home/services/xdg.scm (home-xdg-user-directories-service-type, home-xdg-mime-applications-service-type): Migrate to xdg-configuration-file= s. =2D-- gnu/home/services/fontutils.scm | 4 ++-- gnu/home/services/xdg.scm | 31 +++++++++++++++++-------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/gnu/home/services/fontutils.scm b/gnu/home/services/fontutils.= scm index 772904367d..6062eaed6a 100644 =2D-- a/gnu/home/services/fontutils.scm +++ b/gnu/home/services/fontutils.scm @@ -34,7 +34,7 @@ (define-module (gnu home services fontutils) ;;; Code: =20 (define (add-fontconfig-config-file he-symlink-path) =2D `(("config/fontconfig/fonts.conf" + `(("fontconfig/fonts.conf" ,(mixed-text-file "fonts.conf" " @@ -51,7 +51,7 @@ (define home-fontconfig-service-type (service-type (name 'home-fontconfig) (extensions (list (service-extension =2D home-files-service-type + home-xdg-configuration-files-service-type add-fontconfig-config-file) (service-extension home-run-on-change-service-type diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index d230dd7665..9c43aa93b9 100644 =2D-- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -190,11 +190,11 @@ (define-configuration home-xdg-user-directories-confi= guration "Default directory for videos.")) =20 (define (home-xdg-user-directories-files-service config) =2D `(("config/user-dirs.conf" + `(("user-dirs.conf" ,(mixed-text-file "user-dirs.conf" "enabled=3DFalse\n")) =2D ("config/user-dirs.dirs" + ("user-dirs.dirs" ,(mixed-text-file "user-dirs.dirs" (serialize-configuration @@ -218,7 +218,7 @@ (define home-xdg-user-directories-service-type (service-type (name 'home-xdg-user-directories) (extensions (list (service-extension =2D home-files-service-type + home-xdg-configuration-files-service-type home-xdg-user-directories-files-service) (service-extension home-activation-service-type @@ -417,7 +417,7 @@ (define-configuration home-xdg-mime-applications-config= uration "A list of XDG desktop entries to create. See @code{xdg-desktop-entry}.")) =20 =2D(define (home-xdg-mime-applications-files-service config) +(define (home-xdg-mime-applications-files config) (define (add-xdg-desktop-entry-file entry) (let ((file (first entry)) (config (second entry))) @@ -425,16 +425,16 @@ (define (add-xdg-desktop-entry-file entry) (apply mixed-text-file (format #f "xdg-desktop-~a-entry" file) config)))) + (map (compose add-xdg-desktop-entry-file serialize-xdg-desktop-entry) + (home-xdg-mime-applications-configuration-desktop-entries config))) =20 =2D (append =2D `(("config/mimeapps.list" =2D ,(mixed-text-file =2D "xdg-mime-appplications" =2D (serialize-configuration =2D config =2D home-xdg-mime-applications-configuration-fields)))) =2D (map (compose add-xdg-desktop-entry-file serialize-xdg-desktop-entry) =2D (home-xdg-mime-applications-configuration-desktop-entries config= )))) +(define (home-xdg-mime-applications-xdg-files config) + `(("mimeapps.list" + ,(mixed-text-file + "xdg-mime-appplications" + (serialize-configuration + config + home-xdg-mime-applications-configuration-fields))))) =20 (define (home-xdg-mime-applications-extension old-config extension-configs) (define (extract-fields config) @@ -469,7 +469,10 @@ (define home-xdg-mime-applications-service-type (extensions (list (service-extension home-files-service-type =2D home-xdg-mime-applications-files-service))) + home-xdg-mime-applications-files) + (service-extension + home-xdg-configuration-files-service-type + home-xdg-mime-applications-xdg-files))) (compose identity) (extend home-xdg-mime-applications-extension) (default-value (home-xdg-mime-applications-configuration)) =2D-=20 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0005-home-symlink-manager-Respect-XDG_CONFIG_HOME-during-.patch Content-Transfer-Encoding: quoted-printable From=20089683bbd301f6e085f00fbd53713f335abac40e Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Feb 2022 16:14:23 +0300 Subject: [PATCH 5/5] home: symlink-manager: Respect XDG_CONFIG_HOME during activation. * gnu/home/services/symlink-manager.scm (update-symlinks-script): Respect XDG_CONFIG_HOME during activation. =2D-- gnu/home/services/symlink-manager.scm | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/syml= ink-manager.scm index 747bb343d3..418bfbd98a 100644 =2D-- a/gnu/home/services/symlink-manager.scm +++ b/gnu/home/services/symlink-manager.scm @@ -85,8 +85,8 @@ (define ((file-tree-traverse preordering) node) =20 (use-modules (guix build utils)) =20 =2D (let* ((config-home (or (getenv "XDG_CONFIG_HOME") =2D (string-append (getenv "HOME") "/.conf= ig"))) + (let* ((xdg-config-home (or (getenv "XDG_CONFIG_HOME") + (string-append (getenv "HOME") "/.confi= g"))) =20 (he-path (string-append (getenv "HOME") "/.guix-home")) (new-he-path (string-append he-path ".new")) @@ -117,13 +117,24 @@ (define ((file-tree-traverse preordering) node) (lambda (path) (readlink (string-append new-files-path "/" path)))) =20 + (preprocess-path + (lambda (path) + "If file is in xdg-configuration-files-subdir use +subdirectory from XDG_CONFIG_HOME to generate a target path." + (if (string-prefix? #$xdg-configuration-files-subdir path) + (string-append + (substring xdg-config-home (1+ (string-length home-p= ath))) + (substring + path (string-length #$xdg-configuration-files-subdi= r))) + (string-append "." path)))) + (get-target-path (lambda (path) =2D (string-append home-path "/." path))) + (string-append home-path "/" (preprocess-path path)))) =20 (get-backup-path (lambda (path) =2D (string-append backup-dir "/." path))) + (string-append backup-dir "/" (preprocess-path path)))) =20 (directory? (lambda (path) @@ -224,6 +235,12 @@ (define ((file-tree-traverse preordering) node) (display (G_ " done\n")))) to-create))))) =20 + (format #t "home-path: ~a\nxdg-config-home: ~a\n" + home-path xdg-config-home) + + (format #t "prepr: ~a\n" + (preprocess-path "config/sway/config")) + (when old-tree (cleanup-symlinks)) =20 =2D-=20 2.34.0 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Best regards, Andrew Tropin --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmIGhkQPHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6wFucP/iPnHFKo/gkCj+azi72XXAPUWec60GCh4pfQ gSzE/9NA8e/E+16xnGtVQcAcsB6ujXm7gOpyHCxjrC1OfZewbhCeh9+t5S1vZYGd oOWmJOd4Y6+YnpOkTZmKGOhDSyxO4UfFIowmd1QoFStgSc0uEKTIWmnB+8do9M81 6Hyjb8ygCIh0mDV4osYMob6kg0K3h1I09Ynp3Fa6lKZ62b8MHrGj+3YDI+uaLa6b ygbis7P1k3e0WQ3uZDMuPX32QiQ7cJT1dmFT18siTlmJiIx2LNcYlwRyh34QJhWK j9bKJwRKrJDm2duxtiM3je9KNIwnqkKwLUMqbhjCByu79hWgXJnoOAKmtwhzsTdj sYso2+hJYXhz56jCKNOrTWKD7dWq35sJk4exOfq4tK8PheiTR3/srsA8cIw/mFoD IoKA8hk3uCtroC3S0MZRQvAeUImtfABKWpHeGUETvTXuLvMeSSszuodayLJd9P0T t1GZBCyZux5AvUOeFuwLP2N/omwhjjDYl/3M/fBm/Vv5MpFKDH3FGqcbqv+IxDB3 qR91k6j6F83Q7TYX6FC2mMO2UFv2XjlmsLSMF5SCeFPvf0socbdUUpDRfKceLVwz rkpWnB358sPPH3kshRpFVOJLeOn/l7MP55+/gUqVVtRB+Ux5bYBiB+9CtboI42/E Ik01RWy+ =ns8e -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 26 02:13:41 2022 Received: (at 52808) by debbugs.gnu.org; 26 Feb 2022 07:13:42 +0000 Received: from localhost ([127.0.0.1]:54171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNrGu-0001pJ-Rb for submit@debbugs.gnu.org; Sat, 26 Feb 2022 02:13:41 -0500 Received: from mail-lf1-f45.google.com ([209.85.167.45]:42944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNrGs-0001p1-M9 for 52808@debbugs.gnu.org; Sat, 26 Feb 2022 02:13:40 -0500 Received: by mail-lf1-f45.google.com with SMTP id t13so963976lfd.9 for <52808@debbugs.gnu.org>; Fri, 25 Feb 2022 23:13:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=V8KI9SzLGkYxnSsYggX1A1KOYEek05PbJsg++O6okW8=; b=VGDcNijfXIX1kbxPngcIxebP36FcE5SUeLIfoW3B3kTHBmvH51+2KYOXp9vdGIXiK7 K6ehUgdhCTkCXxdQR/3b/GX4vCV+swICHvo9jySruRKSryvkwN83MItFEbu48NCXIqq4 MpmalekpjMz8/Xwe1dt2LO/nUNNxg5rrTnapZ/oJy9jJBj3Qf6ZAVl3NPrlirkHVi7mP OmbMmprR2TS2Aecwg6H2Zm6V3Q1OmVD19vnnQ3E1KservX3mtb4JgeZuropmq6BREKsu unWM9wJ/rk0jWELGRi9on2MhHYwPDU+c7/IkwSC35GrLRLZb4c+u8zKsWd7OVV7c7oOc KiFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=V8KI9SzLGkYxnSsYggX1A1KOYEek05PbJsg++O6okW8=; b=4YywnGhmOJ2gXqBF5JPkm5itP570h5XRJcocBBBPoMgXBf/eFvnsGwng0xk0UnH5E0 i9a/5aMdAMQbdQ6he69XNnDxfb3pE/K3IGWyhlUTF4YXlhuO0xeL8WFL2d2n387FVLRL PGQlOPd4YfqRf+vNATFkttmJJhqBkn4+PULvpz72FqvjjuVbHyG8YBSzT+V440yHNPS2 FzuAe941GxzkqpIBHbtFbj5B6ELIymxid05zYjQfl7v+ay1yJKLbJa0PlR/vKPi9nrZZ EDAW5Gk/4dTcFFOVa13TY74lDxAECGmVeGihDS1Sl4uG9r63OyXhOsP1yB3n4oxjxqUe az3Q== X-Gm-Message-State: AOAM533I0lLqtlYJd85YDIq8ATnvmpcynsWMaslwCQdFGUS+oz/2+DsR aVNGKEit7m8/U3t00fSZYsytdulIsQ9nYw== X-Google-Smtp-Source: ABdhPJzReUG0GArWWTVqlyVQJ6wDClrrl7w/XYK9pswuaY5Xn8uMXm8B7pfIeZ3SNoDJUdbrD08NWQ== X-Received: by 2002:a05:6512:128b:b0:43c:9b6:55f6 with SMTP id u11-20020a056512128b00b0043c09b655f6mr6911191lfs.196.1645859612744; Fri, 25 Feb 2022 23:13:32 -0800 (PST) Received: from localhost (109-252-135-33.dynamic.spd-mgts.ru. [109.252.135.33]) by smtp.gmail.com with ESMTPSA id b27-20020ac2563b000000b00443bf519186sm388757lff.53.2022.02.25.23.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 23:13:32 -0800 (PST) From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <87r189s8mz.fsf@trop.in> References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <87o83t9mf8.fsf@gnu.org> <878rutzo1d.fsf@trop.in> <87zgn1bsha.fsf@gnu.org> <87r189s8mz.fsf@trop.in> Date: Sat, 26 Feb 2022 10:13:29 +0300 Message-ID: <87lexydrs6.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Julien Lepiller , Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-02-11 18:52, Andrew Tropin wrote: > On 2022-02-08 10:46, Ludovic Court=C3=A8s wrote: > >> Hi, >> >> Andrew Tropin skribis: >> >>>>> You can elaborate more on what you try to achieve and I can try to gi= ve >>>>> you a recommendation how to implement it. >>>> >>>> I=E2=80=99d expect =E2=80=98home-files-service-type=E2=80=99 to do jus= t that: add files to the >>>> home directory, without trying to be smart. >>>> >>>> Would it make sense to distinguish between =E2=80=98home-files=E2=80= =99 and (say) >>>> =E2=80=98home-xdg-configuration-files=E2=80=99? >>> >>> Yep, I can do that, actually, it will be even better for the purpose I >>> originally had. I'll make home-files to store files as it is and >>> symlink manager not to add leading dots and a separate folder for >>> xdg configs. >> >> Neat. >> >>> Ludo, Nick, what do you think about following names? >>> ~/.guix-home/home-dir-files/ >>> ~/.guix-home/xdg-config-dir-files/ >> >> I=E2=80=99d make it =E2=80=98=E2=80=A6/home-files=E2=80=99 and =E2=80=98= =E2=80=A6/xdg-configuration-files=E2=80=99, but that=E2=80=99s a >> detail. >> >>>> I=E2=80=99d also suggest removing special handling of HOME/files in >>>> symlink-manager.scm. Relations between the various components of Guix >>>> Home should preferably be made explicit via service extensions, and not >>>> implicit through conventions like this =E2=80=98files=E2=80=99 sub-dir= ectory. >>>> >>>> Thoughts? >>> >>> Unfortunatelly, I don't know how to implement polymorphic behavior the >>> other way with current extension mechanism, so I would prefer to keep >>> this relation implicit, >> >> I=E2=80=99m not sure I follow but maybe I should try by myself to get a = better >> understanding. >> >> Thanks for your feedback! >> >> Ludo=E2=80=99. > > I decided to go one step at a time, and prepared a patch series, which: > > 1. Adds an explicit connection between home-files-service-type and > symlink-manager by introducing a global constant used by both services. > > 2. Adds a home-xdg-configuration-files-service-type, which accepts a > list of files for XDG_CONFIG_DIR, `(("mpv/mpv.conf" ,file-like-here)) > > 3. Migrates all (gnu home services) to xdg-configuration-files. > > 4. Make symlink-manager respect XDG_CONIFG_HOME and > xdg-configuration-files-subdir. > > After that patch series is merged we can give a time for users to > migrate their self-made home services to xdg-configuration-files and > after for example 2 weeks, remove special handling of dots for > home-files. > > From 0cd37bbc724f9c793898c2655bdd1c335045c5f0 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Fri, 11 Feb 2022 10:55:01 +0300 > Subject: [PATCH 1/5] home: Explicitly connect home-file and symlink-manag= er > services. > > * gnu/home/services.scm (home-files-directory): New variable. > * gnu/home/symlink-manager.scm (update-symlinks-script): Use > home-files-directory variable from (gnu home services). > --- > gnu/home/services.scm | 23 ++++++++++++++--------- > gnu/home/services/symlink-manager.scm | 17 +++++++++-------- > 2 files changed, 23 insertions(+), 17 deletions(-) > > diff --git a/gnu/home/services.scm b/gnu/home/services.scm > index 1cd19ce7f9..e4e3717b80 100644 > --- a/gnu/home/services.scm > +++ b/gnu/home/services.scm > @@ -43,6 +43,8 @@ (define-module (gnu home services) > home-run-on-change-service-type > home-provenance-service-type >=20=20 > + home-files-directory > + > fold-home-service-types > home-provenance >=20=20 > @@ -74,12 +76,11 @@ (define-module (gnu home services) > ;;; file (details described in the manual). > ;;; > ;;; home-files-service-type is similar to etc-service-type, but doesn't = extend > -;;; home-activation, because deploy mechanism for config files is plugga= ble and > -;;; can be different for different home environments: The default one is= called > -;;; symlink-manager (will be introudced in a separate patch series), whi= ch creates > -;;; links for various dotfiles (like $XDG_CONFIG_HOME/$APP/...) to store= , but is > -;;; possible to implement alternative approaches like read-only home fro= m Julien's > -;;; guix-home-manager. > +;;; home-activation, because deploy mechanism for config files is plugga= ble > +;;; and can be different for different home environments: The default on= e is > +;;; called symlink-manager, which creates links for various dotfiles and= xdg > +;;; configuration files to store, but is possible to implement alternati= ve > +;;; approaches like read-only home from Julien's guix-home-manager. > ;;; > ;;; home-run-on-first-login-service-type provides an @file{on-first-logi= n} guile > ;;; script, which runs provided gexps once, when user makes first login.= It can > @@ -262,11 +263,14 @@ (define (assert-no-duplicates files) >=20=20 > (file-union "files" files)) >=20=20 > +;; Used by symlink-manager > +(define home-files-directory "files") > + > (define (files-entry files) > "Return an entry for the @file{~/.guix-home/files} > directory containing FILES." > (with-monad %store-monad > - (return `(("files" ,(files->files-directory files)))))) > + (return `((,home-files-directory ,(files->files-directory files)))))) >=20=20 > (define home-files-service-type > (service-type (name 'home-files) > @@ -276,8 +280,9 @@ (define home-files-service-type > (compose concatenate) > (extend append) > (default-value '()) > - (description "Configuration files for programs that > -will be put in @file{~/.guix-home/files}."))) > + (description (format #f "Files that will be put in > +@file{~~/.guix-home/~a}, and further processed during activation." > + home-files-directory)))) >=20=20 > (define %initialize-gettext > #~(begin > diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/sy= mlink-manager.scm > index 314da3ba3e..747bb343d3 100644 > --- a/gnu/home/services/symlink-manager.scm > +++ b/gnu/home/services/symlink-manager.scm > @@ -25,12 +25,11 @@ (define-module (gnu home services symlink-manager) >=20=20 > ;;; Comment: > ;;; > -;;; symlink-manager cares about configuration files: it backs up files > -;;; created by user, removes symlinks and directories created by a > -;;; previous generation, and creates new directories and symlinks to > -;;; configuration files according to the content of files/ directory > -;;; (created by home-files-service) of the current home environment > -;;; generation. > +;;; symlink-manager cares about xdg configurations and other files: it b= acks > +;;; up files created by user, removes symlinks and directories created b= y a > +;;; previous generation, and creates new directories and symlinks to fil= es > +;;; according to the content of directories (created by home-files-servi= ce) of > +;;; the current home environment generation. > ;;; > ;;; Code: >=20=20 > @@ -94,7 +93,8 @@ (define ((file-tree-traverse preordering) node) > (new-home (getenv "GUIX_NEW_HOME")) > (old-home (getenv "GUIX_OLD_HOME")) >=20=20 > - (new-files-path (string-append new-home "/files")) > + (new-files-path (string-append > + new-home "/" #$home-files-directory)) > ;; Trailing dot is required, because files itself is symli= nk and > ;; to make file-system-tree works it should be a directory. > (new-files-dir-path (string-append new-files-path "/.")) > @@ -107,7 +107,8 @@ (define ((file-tree-traverse preordering) node) > (old-tree (if old-home > ((simplify-file-tree "") > (file-system-tree > - (string-append old-home "/files/."))) > + (string-append > + old-home "/" #$home-files-directory "/."))) > #f)) > (new-tree ((simplify-file-tree "") > (file-system-tree new-files-dir-path))) > --=20 > 2.34.0 > > From 23f7095d60b18b52de0d1aa314c4012cdf55a046 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Fri, 11 Feb 2022 11:03:02 +0300 > Subject: [PATCH 2/5] home: Add home-xdg-configuration-files service. > > * gnu/home/services.scm (home-xdg-configuration-files): New variable. > --- > gnu/home/services.scm | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/gnu/home/services.scm b/gnu/home/services.scm > index e4e3717b80..bf044a0421 100644 > --- a/gnu/home/services.scm > +++ b/gnu/home/services.scm > @@ -38,12 +38,14 @@ (define-module (gnu home services) > home-profile-service-type > home-environment-variables-service-type > home-files-service-type > + home-xdg-configuration-files-service-type > home-run-on-first-login-service-type > home-activation-service-type > home-run-on-change-service-type > home-provenance-service-type >=20=20 > home-files-directory > + xdg-configuration-files-subdir >=20=20 > fold-home-service-types > home-provenance > @@ -284,6 +286,27 @@ (define home-files-service-type > @file{~~/.guix-home/~a}, and further processed during activation." > home-files-directory)))) >=20=20 > +(define xdg-configuration-files-subdir "config") > + > +(define (xdg-configuration-files files) > + (map (lambda (lst) > + (cons (string-append xdg-configuration-files-subdir > + "/" (car lst)) (cdr lst))) > + files)) > + > +(define home-xdg-configuration-files-service-type > + (service-type (name 'home-files) > + (extensions > + (list (service-extension home-files-service-type > + xdg-configuration-files))) > + (compose concatenate) > + (extend append) > + (default-value '()) > + (description (format #f "Files that will be put in > +@file{~~/.guix-home/~a/~a}, and further processed during activation." > + home-files-directory > + xdg-configuration-files)))) > + > (define %initialize-gettext > #~(begin > (bindtextdomain %gettext-domain > --=20 > 2.34.0 > > From 11f23a48d480a91d6bfba0ff55c1a9831585a4ee Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Fri, 11 Feb 2022 15:03:44 +0300 > Subject: [PATCH 3/5] home: shells: Migrate zsh to xdg-configuration-files. > > * gnu/home/services.scm (home-zsh-service-type): Additionally extend > home-xdg-configuration-files-service-type. > --- > gnu/home/services/shells.scm | 112 +++++++++++++++++++---------------- > 1 file changed, 61 insertions(+), 51 deletions(-) > > diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm > index ca7f4ac0ad..4b3618a868 100644 > --- a/gnu/home/services/shells.scm > +++ b/gnu/home/services/shells.scm > @@ -171,56 +171,27 @@ (define-configuration home-zsh-configuration > won't be read in some cases (if the shell terminates by exec'ing > another process for example).")) >=20=20 > -(define (add-zsh-configuration config) > - (let* ((xdg-flavor? (home-zsh-configuration-xdg-flavor? config))) > +(define (zsh-filter-fields field) > + (filter-configuration-fields home-zsh-configuration-fields (list field= ))) >=20=20 > - (define prefix-file > - (cut string-append > - (if xdg-flavor? > - "config/zsh/." > - "") <>)) > +(define (zsh-serialize-field config field) > + (serialize-configuration config (zsh-filter-fields field))) >=20=20 > - (define (filter-fields field) > - (filter-configuration-fields home-zsh-configuration-fields > - (list field))) > +(define* (zsh-field-not-empty? config field) > + (let ((file-name (symbol->string field)) > + (field-obj (car (zsh-filter-fields field)))) > + (not (null? ((configuration-field-getter field-obj) config))))) >=20=20 > - (define (serialize-field field) > - (serialize-configuration > - config > - (filter-fields field))) > +(define (zsh-file-zshenv config) > + (mixed-text-file > + "zshenv" > + (zsh-serialize-field config 'zshenv) > + (zsh-serialize-field config 'environment-variables))) >=20=20 > - (define (file-if-not-empty field) > - (let ((file-name (symbol->string field)) > - (field-obj (car (filter-fields field)))) > - (if (not (null? ((configuration-field-getter field-obj) config))) > - `(,(prefix-file file-name) > - ,(mixed-text-file > - file-name > - (serialize-field field))) > - '()))) > - > - (filter > - (compose not null?) > - `(,(if xdg-flavor? > - `("zshenv" > - ,(mixed-text-file > - "auxiliary-zshenv" > - (if xdg-flavor? > - "source ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/.zshen= v\n" > - ""))) > - '()) > - (,(prefix-file "zshenv") > - ,(mixed-text-file > - "zshenv" > - (if xdg-flavor? > - "export ZDOTDIR=3D${XDG_CONFIG_HOME:-$HOME/.config}/zsh\n" > - "") > - (serialize-field 'zshenv) > - (serialize-field 'environment-variables))) > - (,(prefix-file "zprofile") > - ,(mixed-text-file > - "zprofile" > - "\ > +(define (zsh-file-zprofile config) > + (mixed-text-file > + "zprofile" > + "\ > # Setups system and user profiles and related variables > source /etc/profile > # Setups home environment profile > @@ -229,11 +200,47 @@ (define (file-if-not-empty field) > # It's only necessary if zsh is a login shell, otherwise profiles will > # be already sourced by bash > " > - (serialize-field 'zprofile))) > + (zsh-serialize-field config 'zprofile))) >=20=20 > - ,@(list (file-if-not-empty 'zshrc) > - (file-if-not-empty 'zlogin) > - (file-if-not-empty 'zlogout)))))) > +(define (zsh-file-by-field config field) > + (match field > + ('zshenv (zsh-file-zshenv config)) > + ('zprofile (zsh-file-zprofile config)) > + (e (mixed-text-file > + (symbol->string field) > + (zsh-serialize-field config field))))) > + > +(define (zsh-get-configuration-files config) > + `(("zprofile" ,(zsh-file-by-field config 'zprofile)) ;; Always non-emp= ty > + ,@(if (and (zsh-field-not-empty? config 'zshenv) > + (zsh-field-not-empty? config 'environment-variables)) > + `(("zshenv" ,(zsh-file-by-field config 'zshenv))) '()) > + ,@(if (zsh-field-not-empty? config 'zshrc) > + `(("zshrc" ,(zsh-file-by-field config 'zshrc))) '()) > + ,@(if (zsh-field-not-empty? config 'zlogin) > + `(("zlogin" ,(zsh-file-by-field config 'zlogin))) '()) > + ,@(if (zsh-field-not-empty? config 'zlogout) > + `(("zlogout" ,(zsh-file-by-field config 'zlogout))) '()))) > + > +(define (zsh-home-files config) > + (define zshenv-auxiliary-file > + (mixed-text-file > + "zshenv-auxiliary" > + "export ZDOTDIR=3D${XDG_CONFIG_HOME:-$HOME/.config}/zsh\n" > + "[[ -f $ZDOTDIR/.zshenv ]] && source $ZDOTDIR/.zshenv\n")) > + > + (if (home-zsh-configuration-xdg-flavor? config) > + `(("zshenv" ,zshenv-auxiliary-file)) > + (zsh-get-configuration-files config))) > + > +(define (zsh-xdg-configuration-files config) > + (if (home-zsh-configuration-xdg-flavor? config) > + (map > + (lambda (lst) > + (cons (string-append "zsh/." (car lst)) > + (cdr lst))) > + (zsh-get-configuration-files config)) > + '())) >=20=20 > (define (add-zsh-packages config) > (list (home-zsh-configuration-package config))) > @@ -291,7 +298,10 @@ (define home-zsh-service-type > (extensions > (list (service-extension > home-files-service-type > - add-zsh-configuration) > + zsh-home-files) > + (service-extension > + home-xdg-configuration-files-service-type > + zsh-xdg-configuration-files) > (service-extension > home-profile-service-type > add-zsh-packages))) > --=20 > 2.34.0 > > From ef4c3bbcc0c8c1a251f4ad6c494f8ed30adf45f2 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Fri, 11 Feb 2022 15:34:46 +0300 > Subject: [PATCH 4/5] home: Migrate fountutils and xdg modules to > xdg-configuration-files. > > * gnu/home/services/fontutils.scm (home-fontconfig-service-type): Migrate= to > xdg-configuration-files. > * gnu/home/services/xdg.scm (home-xdg-user-directories-service-type, > home-xdg-mime-applications-service-type): Migrate to xdg-configuration-fi= les. > --- > gnu/home/services/fontutils.scm | 4 ++-- > gnu/home/services/xdg.scm | 31 +++++++++++++++++-------------- > 2 files changed, 19 insertions(+), 16 deletions(-) > > diff --git a/gnu/home/services/fontutils.scm b/gnu/home/services/fontutil= s.scm > index 772904367d..6062eaed6a 100644 > --- a/gnu/home/services/fontutils.scm > +++ b/gnu/home/services/fontutils.scm > @@ -34,7 +34,7 @@ (define-module (gnu home services fontutils) > ;;; Code: >=20=20 > (define (add-fontconfig-config-file he-symlink-path) > - `(("config/fontconfig/fonts.conf" > + `(("fontconfig/fonts.conf" > ,(mixed-text-file > "fonts.conf" > " > @@ -51,7 +51,7 @@ (define home-fontconfig-service-type > (service-type (name 'home-fontconfig) > (extensions > (list (service-extension > - home-files-service-type > + home-xdg-configuration-files-service-type > add-fontconfig-config-file) > (service-extension > home-run-on-change-service-type > diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm > index d230dd7665..9c43aa93b9 100644 > --- a/gnu/home/services/xdg.scm > +++ b/gnu/home/services/xdg.scm > @@ -190,11 +190,11 @@ (define-configuration home-xdg-user-directories-con= figuration > "Default directory for videos.")) >=20=20 > (define (home-xdg-user-directories-files-service config) > - `(("config/user-dirs.conf" > + `(("user-dirs.conf" > ,(mixed-text-file > "user-dirs.conf" > "enabled=3DFalse\n")) > - ("config/user-dirs.dirs" > + ("user-dirs.dirs" > ,(mixed-text-file > "user-dirs.dirs" > (serialize-configuration > @@ -218,7 +218,7 @@ (define home-xdg-user-directories-service-type > (service-type (name 'home-xdg-user-directories) > (extensions > (list (service-extension > - home-files-service-type > + home-xdg-configuration-files-service-type > home-xdg-user-directories-files-service) > (service-extension > home-activation-service-type > @@ -417,7 +417,7 @@ (define-configuration home-xdg-mime-applications-conf= iguration > "A list of XDG desktop entries to create. See > @code{xdg-desktop-entry}.")) >=20=20 > -(define (home-xdg-mime-applications-files-service config) > +(define (home-xdg-mime-applications-files config) > (define (add-xdg-desktop-entry-file entry) > (let ((file (first entry)) > (config (second entry))) > @@ -425,16 +425,16 @@ (define (add-xdg-desktop-entry-file entry) > (apply mixed-text-file > (format #f "xdg-desktop-~a-entry" file) > config)))) > + (map (compose add-xdg-desktop-entry-file serialize-xdg-desktop-entry) > + (home-xdg-mime-applications-configuration-desktop-entries config)= )) >=20=20 > - (append > - `(("config/mimeapps.list" > - ,(mixed-text-file > - "xdg-mime-appplications" > - (serialize-configuration > - config > - home-xdg-mime-applications-configuration-fields)))) > - (map (compose add-xdg-desktop-entry-file serialize-xdg-desktop-entry) > - (home-xdg-mime-applications-configuration-desktop-entries config= )))) > +(define (home-xdg-mime-applications-xdg-files config) > + `(("mimeapps.list" > + ,(mixed-text-file > + "xdg-mime-appplications" > + (serialize-configuration > + config > + home-xdg-mime-applications-configuration-fields))))) >=20=20 > (define (home-xdg-mime-applications-extension old-config extension-confi= gs) > (define (extract-fields config) > @@ -469,7 +469,10 @@ (define home-xdg-mime-applications-service-type > (extensions > (list (service-extension > home-files-service-type > - home-xdg-mime-applications-files-service))) > + home-xdg-mime-applications-files) > + (service-extension > + home-xdg-configuration-files-service-type > + home-xdg-mime-applications-xdg-files))) > (compose identity) > (extend home-xdg-mime-applications-extension) > (default-value (home-xdg-mime-applications-configuration= )) > --=20 > 2.34.0 > > From 089683bbd301f6e085f00fbd53713f335abac40e Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Fri, 11 Feb 2022 16:14:23 +0300 > Subject: [PATCH 5/5] home: symlink-manager: Respect XDG_CONFIG_HOME during > activation. > > * gnu/home/services/symlink-manager.scm (update-symlinks-script): Respect > XDG_CONFIG_HOME during activation. > --- > gnu/home/services/symlink-manager.scm | 25 +++++++++++++++++++++---- > 1 file changed, 21 insertions(+), 4 deletions(-) > > diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/sy= mlink-manager.scm > index 747bb343d3..418bfbd98a 100644 > --- a/gnu/home/services/symlink-manager.scm > +++ b/gnu/home/services/symlink-manager.scm > @@ -85,8 +85,8 @@ (define ((file-tree-traverse preordering) node) >=20=20 > (use-modules (guix build utils)) >=20=20 > - (let* ((config-home (or (getenv "XDG_CONFIG_HOME") > - (string-append (getenv "HOME") "/.conf= ig"))) > + (let* ((xdg-config-home (or (getenv "XDG_CONFIG_HOME") > + (string-append (getenv "HOME") "/.con= fig"))) >=20=20 > (he-path (string-append (getenv "HOME") "/.guix-home")) > (new-he-path (string-append he-path ".new")) > @@ -117,13 +117,24 @@ (define ((file-tree-traverse preordering) node) > (lambda (path) > (readlink (string-append new-files-path "/" path)))) >=20=20 > + (preprocess-path > + (lambda (path) > + "If file is in xdg-configuration-files-subdir use > +subdirectory from XDG_CONFIG_HOME to generate a target path." > + (if (string-prefix? #$xdg-configuration-files-subdir pa= th) > + (string-append > + (substring xdg-config-home (1+ (string-length home= -path))) > + (substring > + path (string-length #$xdg-configuration-files-sub= dir))) > + (string-append "." path)))) > + > (get-target-path > (lambda (path) > - (string-append home-path "/." path))) > + (string-append home-path "/" (preprocess-path path)))) >=20=20 > (get-backup-path > (lambda (path) > - (string-append backup-dir "/." path))) > + (string-append backup-dir "/" (preprocess-path path)))) >=20=20 > (directory? > (lambda (path) > @@ -224,6 +235,12 @@ (define ((file-tree-traverse preordering) node) > (display (G_ " done\n")))) > to-create))))) >=20=20 > + (format #t "home-path: ~a\nxdg-config-home: ~a\n" > + home-path xdg-config-home) > + > + (format #t "prepr: ~a\n" > + (preprocess-path "config/sway/config")) > + > (when old-tree > (cleanup-symlinks)) >=20=20 > --=20 > 2.34.0 A gentle reminder/request for code-review. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmIZ0xkPHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6wg5IQAJP2X3Jkz4e1I9JKEQ0t5xVvpRcN23mbomMr Aogn4GTPU6MjitAjqZK/uYD/wEwOU5auHivffiUTr3MkVjTDXoj0dZw2fGHHcqs/ PDaxUiMwxZVm9Ktt3iFdjs7IFtBr5SmgGhh+K9ELMsx3ZbDD2Mxa22x5BaxObPDK 9jMse2d1bo2EIeYWJ/7GyqN2M6gAfWax84CQhuX1eLAteSg/NCDUxHXt5Eze3llf YLm+NyrzEMdHAUV7ZFyN8V2EeRkkBkoEp1HDzfGwEvzt93sgRLfGjTVawV+TpT36 HDbVI3SNbuJuKfFN5aUHzVqXaegAkxZi77YHs3FGYKv66EJAwBEMOsiN0rh+BtA1 /8X7x57NBBoVupWtmKKdgRwZhtzxVpj2aeuMpOyJfrHSBqLrMJxqXQZjeEx26DK+ W+6YzDIUD6YgSDOdhEcNX1KOcX241HJ7OoAZQo6qpXjUwubmmGydn6ko6QFQ0bfM tjSY+SagGwsvTaCwZanXWvAa7bCMKoHkEHcFescAd3ZUjHQ2S9VSv06ZNh/Uc1JG UzoRfvKXR52ne05LFN0I4uiSHFXztt67RRvA2PC6Aq5W6gUuuhae1ZpHAHCrdz12 LTGUkk3UyX5KewxPUA6SFDnjvVIShrOZhZlAHOwuc4RwTvUXkBWlyV72kTOr5IQ+ ByvcFsol =DPup -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 05 17:44:39 2022 Received: (at 52808) by debbugs.gnu.org; 5 Mar 2022 22:44:39 +0000 Received: from localhost ([127.0.0.1]:49332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQd8g-0005TW-Hl for submit@debbugs.gnu.org; Sat, 05 Mar 2022 17:44:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQd8f-0005TJ-8g for 52808@debbugs.gnu.org; Sat, 05 Mar 2022 17:44:37 -0500 Received: from [2001:470:142:3::e] (port=37196 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQd8Y-0003wf-TO; Sat, 05 Mar 2022 17:44:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=uGLgHVaqZxCuBSjdYSUBPJF7YwRAN+2+XoqeZNes5ik=; b=Z5/O3NY1AyjKuqdO9diU paiChd4e2TAhFO1Nz9qrAPJW0VcPgpOXfpXXNVYWtjryqrU/kyvU/BnpGuAPr++aPjqSk9sr2n71p thC4dEvid6btrTFyKNPKtROmjEZgI4+JTNsJxU0dAYcyDk6SWrOBBvY0XB7ecyBp3f8FHYGDwXzDd GfWflfbHvXCdI5QC/L0Z4UJyUA/YhLxVlB/yRtNPnLbTBq+nHFYovW9u4FFquT6amzNpCRKT+LGZ4 mRBOPKyLuz75hKfA6DHBoIlOTuxNZfW/VbPGF4vDduSZ/mrGw6+lXiLO9c6uDYWU+uuKG7RQ+2e1T XeeaVKTKidfNlg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:50130 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQd8Y-0004em-Bc; Sat, 05 Mar 2022 17:44:30 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: bug#52808: Guix home should not assume that all targets are dot files References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <87o83t9mf8.fsf@gnu.org> <878rutzo1d.fsf@trop.in> <87zgn1bsha.fsf@gnu.org> <87r189s8mz.fsf@trop.in> Date: Sat, 05 Mar 2022 23:44:27 +0100 In-Reply-To: <87r189s8mz.fsf@trop.in> (Andrew Tropin's message of "Fri, 11 Feb 2022 18:52:36 +0300") Message-ID: <871qzgm33o.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Julien Lepiller , Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Andrew, The patches reached my mailbox around the time I went on vacation and then fell through the cracks. Sorry about that! Andrew Tropin skribis: > After that patch series is merged we can give a time for users to > migrate their self-made home services to xdg-configuration-files and > after for example 2 weeks, remove special handling of dots for > home-files. Sounds like a plan! > From 0cd37bbc724f9c793898c2655bdd1c335045c5f0 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Fri, 11 Feb 2022 10:55:01 +0300 > Subject: [PATCH 1/5] home: Explicitly connect home-file and symlink-manag= er > services. > > * gnu/home/services.scm (home-files-directory): New variable. > * gnu/home/symlink-manager.scm (update-symlinks-script): Use > home-files-directory variable from (gnu home services). [...] > - (description "Configuration files for programs that > -will be put in @file{~/.guix-home/files}."))) > + (description (format #f "Files that will be put in > +@file{~~/.guix-home/~a}, and further processed during activation." > + home-files-directory)))) This hunk would prevent i18n so I suggest dropping it (you can mention =E2=80=98home-files-directory=E2=80=99 in a margin comment for good measure= ). Otherwise LGTM. > From 23f7095d60b18b52de0d1aa314c4012cdf55a046 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Fri, 11 Feb 2022 11:03:02 +0300 > Subject: [PATCH 2/5] home: Add home-xdg-configuration-files service. > > * gnu/home/services.scm (home-xdg-configuration-files): New variable. [...] > +(define xdg-configuration-files-subdir "config") > > +(define (xdg-configuration-files files) > + (map (lambda (lst) > + (cons (string-append xdg-configuration-files-subdir > + "/" (car lst)) (cdr lst))) > + files)) I=E2=80=99d just call it =E2=80=9C.config=E2=80=9D (instead of =E2=80=9Ccon= fig=E2=80=9D). That way, there wouldn=E2=80=99t be any special treatment. WDYT? Also: s/subdir/directory/, and please use =E2=80=98match=E2=80=99 instead o= f car/cdr (info "(guix) Coding Style"). > + (description (format #f "Files that will be put in > +@file{~~/.guix-home/~a/~a}, and further processed during activation." > + home-files-directory > + xdg-configuration-files)))) Same as above: drop =E2=80=98format=E2=80=99 and write ~/.guix-home/files/.= config. > From 11f23a48d480a91d6bfba0ff55c1a9831585a4ee Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Fri, 11 Feb 2022 15:03:44 +0300 > Subject: [PATCH 3/5] home: shells: Migrate zsh to xdg-configuration-files. > > * gnu/home/services.scm (home-zsh-service-type): Additionally extend > home-xdg-configuration-files-service-type. [...] > From ef4c3bbcc0c8c1a251f4ad6c494f8ed30adf45f2 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Fri, 11 Feb 2022 15:34:46 +0300 > Subject: [PATCH 4/5] home: Migrate fountutils and xdg modules to > xdg-configuration-files. > > * gnu/home/services/fontutils.scm (home-fontconfig-service-type): Migrate= to > xdg-configuration-files. > * gnu/home/services/xdg.scm (home-xdg-user-directories-service-type, > home-xdg-mime-applications-service-type): Migrate to xdg-configuration-fi= les. Neat! > From 089683bbd301f6e085f00fbd53713f335abac40e Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Fri, 11 Feb 2022 16:14:23 +0300 > Subject: [PATCH 5/5] home: symlink-manager: Respect XDG_CONFIG_HOME during > activation. > > * gnu/home/services/symlink-manager.scm (update-symlinks-script): Respect > XDG_CONFIG_HOME during activation. I propose to postpone this one after , and I even offer to rebase it myself if you want. :-) Could you send updated patches? Thanks in advance, and apologies again for the delay! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 08 23:26:20 2022 Received: (at 52808) by debbugs.gnu.org; 9 Mar 2022 04:26:21 +0000 Received: from localhost ([127.0.0.1]:58282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRnu0-00038k-Hn for submit@debbugs.gnu.org; Tue, 08 Mar 2022 23:26:20 -0500 Received: from mail-lj1-f174.google.com ([209.85.208.174]:43530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRnty-00038X-A1 for 52808@debbugs.gnu.org; Tue, 08 Mar 2022 23:26:18 -0500 Received: by mail-lj1-f174.google.com with SMTP id 25so1350459ljv.10 for <52808@debbugs.gnu.org>; Tue, 08 Mar 2022 20:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=6EeOUWUJWZzNGjto3Z6iWae2sFQb5osGwCBLi4YSR/k=; b=JhFgRlAjixFvlVawBNPfET0GmPdAM2YPn5AMJjOTkMs6CL1qJaBnIVosnkIxlS06du ON6c4O5XORh2hCXfRk3hOavJzSqjnADRes3S7qiOM9FnMxMt2kzBjK1sXvxkLmdYcSxm O9vih0mfF/Q5O+67Zafyk6YfGsrmaqVxh5Lt4kMzKaRJ3MnKETB5kez9pL8A4jIYrbBs T4Jfuswb4H/TLtbQ89E/vQJWPD68swwMTIKh4n4JW1rXwX6o5XGBWYKT3kxlr0f/fRvN bYgW4sk1yPIoB4bA2i90qMpdLhIF96rt5z3r36MnaOs4wvF6AvNzOWXR5KUso3aCRdiC 8YCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=6EeOUWUJWZzNGjto3Z6iWae2sFQb5osGwCBLi4YSR/k=; b=kryXzZXc+TuWWH4h/ys3FnYspKenpiu9cUHUTGjLPbzuguSrOfHtrMqMiDne+/imdg M6GVa4BcudqpGAuD9ory0OaOeHIZtP67BZ5UPhVyuZosyjnfc5FmhIkth8zLWeVtWam/ 6sF3/deH5MyKNFkRqiRxZ5fzOYbRdyh7JP3TW2mzsLqNRhdbqTMrOd783kZa1HP2xVr5 fnyCD/9dGqn1Gkrv3k+xKdaEgbR04FzakmLykT4X9lhqrG+e9eFYOlown4t4OJnTFVLY YzIhl25U+Nm63J23Q/skz0uiEdtDljf5ZBayVeTHbLvx+I5dbV73qIa5e/MDNiCXlv6M yiQg== X-Gm-Message-State: AOAM531Yv3BmwpXRALb/SJjCQtIB8tPksIqjqH5ZYq46sGlyHd8fCinv 2ScJ9Pf0uxGulrGd1KVyKHaQ8A== X-Google-Smtp-Source: ABdhPJyx8d5qvchOZuqKBrrLfk/5jpGdV34W6aDROoIVUlRgvl1Rz+xZ13gYWRG+Eqjams49+IGyHg== X-Received: by 2002:a05:651c:516:b0:247:a27c:60fd with SMTP id o22-20020a05651c051600b00247a27c60fdmr12755458ljp.73.1646799972110; Tue, 08 Mar 2022 20:26:12 -0800 (PST) Received: from localhost (109-252-135-33.dynamic.spd-mgts.ru. [109.252.135.33]) by smtp.gmail.com with ESMTPSA id m14-20020a19520e000000b004483213f607sm162962lfb.103.2022.03.08.20.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 20:26:11 -0800 (PST) From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <871qzgm33o.fsf@gnu.org> References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <87o83t9mf8.fsf@gnu.org> <878rutzo1d.fsf@trop.in> <87zgn1bsha.fsf@gnu.org> <87r189s8mz.fsf@trop.in> <871qzgm33o.fsf@gnu.org> Date: Wed, 09 Mar 2022 07:26:07 +0300 Message-ID: <87o82fwy3k.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Julien Lepiller , Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-03-05 23:44, Ludovic Court=C3=A8s wrote: > Hi Andrew, > > The patches reached my mailbox around the time I went on vacation and > then fell through the cracks. Sorry about that! No problem, I hope you had a good rest and got some fun! > > Andrew Tropin skribis: > >> After that patch series is merged we can give a time for users to >> migrate their self-made home services to xdg-configuration-files and >> after for example 2 weeks, remove special handling of dots for >> home-files. > > Sounds like a plan! > >> From 0cd37bbc724f9c793898c2655bdd1c335045c5f0 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Fri, 11 Feb 2022 10:55:01 +0300 >> Subject: [PATCH 1/5] home: Explicitly connect home-file and symlink-mana= ger >> services. >> >> * gnu/home/services.scm (home-files-directory): New variable. >> * gnu/home/symlink-manager.scm (update-symlinks-script): Use >> home-files-directory variable from (gnu home services). > > [...] > >> - (description "Configuration files for programs that >> -will be put in @file{~/.guix-home/files}."))) >> + (description (format #f "Files that will be put in >> +@file{~~/.guix-home/~a}, and further processed during activation." >> + home-files-directory)))) > > This hunk would prevent i18n so I suggest dropping it (you can mention > =E2=80=98home-files-directory=E2=80=99 in a margin comment for good measu= re). > > Otherwise LGTM. > Will fix it. >> From 23f7095d60b18b52de0d1aa314c4012cdf55a046 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Fri, 11 Feb 2022 11:03:02 +0300 >> Subject: [PATCH 2/5] home: Add home-xdg-configuration-files service. >> >> * gnu/home/services.scm (home-xdg-configuration-files): New variable. > > [...] > >> +(define xdg-configuration-files-subdir "config") >> >> +(define (xdg-configuration-files files) >> + (map (lambda (lst) >> + (cons (string-append xdg-configuration-files-subdir >> + "/" (car lst)) (cdr lst))) >> + files)) > > I=E2=80=99d just call it =E2=80=9C.config=E2=80=9D (instead of =E2=80=9Cc= onfig=E2=80=9D). That way, there > wouldn=E2=80=99t be any special treatment. WDYT? This is a patch series, which introduces preliminary changes and keeps backward compatibility, so people, who have their personal home services will be able to gradually migrate them to home-xdg-configuration-files. In the next patch series special treatment of the dots will be removed and this directory will become ".config". > > Also: s/subdir/directory/, and please use =E2=80=98match=E2=80=99 instead= of car/cdr > (info "(guix) Coding Style"). > Sure. >> + (description (format #f "Files that will be put in >> +@file{~~/.guix-home/~a/~a}, and further processed during activation." >> + home-files-directory >> + xdg-configuration-files)))) > > Same as above: drop =E2=80=98format=E2=80=99 and write ~/.guix-home/files= /.config. > >> From 11f23a48d480a91d6bfba0ff55c1a9831585a4ee Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Fri, 11 Feb 2022 15:03:44 +0300 >> Subject: [PATCH 3/5] home: shells: Migrate zsh to xdg-configuration-file= s. >> >> * gnu/home/services.scm (home-zsh-service-type): Additionally extend >> home-xdg-configuration-files-service-type. > > [...] > >> From ef4c3bbcc0c8c1a251f4ad6c494f8ed30adf45f2 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Fri, 11 Feb 2022 15:34:46 +0300 >> Subject: [PATCH 4/5] home: Migrate fountutils and xdg modules to >> xdg-configuration-files. >> >> * gnu/home/services/fontutils.scm (home-fontconfig-service-type): Migrat= e to >> xdg-configuration-files. >> * gnu/home/services/xdg.scm (home-xdg-user-directories-service-type, >> home-xdg-mime-applications-service-type): Migrate to xdg-configuration-f= iles. > > Neat! > >> From 089683bbd301f6e085f00fbd53713f335abac40e Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Fri, 11 Feb 2022 16:14:23 +0300 >> Subject: [PATCH 5/5] home: symlink-manager: Respect XDG_CONFIG_HOME duri= ng >> activation. >> >> * gnu/home/services/symlink-manager.scm (update-symlinks-script): Respect >> XDG_CONFIG_HOME during activation. > > I propose to postpone this one after > , and I even offer to rebase it > myself if you want. :-) > > Could you send updated patches? Sure, I even replied to bug#54180 ticket :) Waiting for the merge, after that will update patches to address your comments and will rebase them on top of bug#54180. Also, I need to update the manual as well. > > Thanks in advance, and apologies again for the delay! > > Ludo=E2=80=99. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmIoLF8PHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6wBjQP/jVYHKadKL5KesHSs5O6wGMQYjxJPQPx4ruA /fSlNWl5k5P0wVa5ew38Lwx0sfC2Q4yAJJFkMc7hnaELcexM1kzmshNR3uQEJKhD +pBqus03ZZEFNRls6Z7BdRFSmQAzTBGcLRuy8FSOC9fQLGQEIvXUv02m1W+q1rU+ asU9vOY7DQCCeHENOhJ82K7IoklKrOqxK/8onBD4RP97OvsR9qRR2rSREm/U0gG+ h0PNZnP9t54/xGVzc0nJZg+smUCkSPeanxEkm/leIJxEW5DyteMIhgH6zpYkyVZ3 QkA6FTlHl76GheQfVoyG0AWpAsIZGBn2lT6wAnmGELQG2uLah6+wrznslYqRzUOY fDNbrvVtsS+y0hWsyn/1zY9X/qaNNHWpLz+s5nzAr856Nuvz6P0LTEn+JQKxDwbn hjSYnwm62SE1Z5LXEkWXVlH+7RlvrpG9jzcxKnYy5JA4Plc6papk9UVWshPmgW9a Uunoz7KZBWk2ET24ZsEs8rbka06lOd2SXm85sE8oh1lfBowM09aD/DHajnxeKSLa ZXdtD1sPCsHQ67aeMT76uPEa5Pkwrwo3Od/eUqfX6n6PiU7aTwCzevIWOAlF7EeI SsqJOJkPO5Cjc0uZJUmBKzA/qyTlt1U3WM3vRHQVE168nGlfjwIT0N2x8roa9fLX a2+guCL+ =yd+/ -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 10 05:56:11 2022 Received: (at 52808) by debbugs.gnu.org; 10 Mar 2022 10:56:11 +0000 Received: from localhost ([127.0.0.1]:33439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSGSo-0004uU-V3 for submit@debbugs.gnu.org; Thu, 10 Mar 2022 05:56:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSGSn-0004uJ-RU for 52808@debbugs.gnu.org; Thu, 10 Mar 2022 05:56:10 -0500 Received: from [2001:470:142:3::e] (port=53878 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSGSi-0002lD-6b; Thu, 10 Mar 2022 05:56:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=wWSv1cfouS7Yu/BKzWQy/4R6ma5LjHPXHqZYuYq2t0U=; b=FGbkES/ZoQEVkJsqxd9x CkOQDCID4bCStcZ1ompY0LKrZSrHW6uRko//GBgxrFBgNhcTROpPLQH/gdUD9a9xhggbU7c9onEgA iU/53TpDMKku//bk+0h4lCwECm/FZgRFsbHGMrWWB8mkWIUzOiak4vsqmcMoBCHy+qr89jebm+FK5 l72mRsNi1brXDC1In5fmoVkqiTL90tUlWcKmEdrAYbJj6Ne+1fYz8RcwQGS+ZpaSVzDOC5LoxzHHa jJnd2S4ujMy64V5yuReccAgV2/TOpxfhRDR//Sna2slhPyWhj9ForM52m8Koy36uZlbuu3abmBDl8 0IIyWAJnm+Q71w==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:51497 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nSGSh-0004Kc-PO; Thu, 10 Mar 2022 05:56:03 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: bug#52808: Guix home should not assume that all targets are dot files References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <87o83t9mf8.fsf@gnu.org> <878rutzo1d.fsf@trop.in> <87zgn1bsha.fsf@gnu.org> <87r189s8mz.fsf@trop.in> <871qzgm33o.fsf@gnu.org> <87o82fwy3k.fsf@trop.in> Date: Thu, 10 Mar 2022 11:56:01 +0100 In-Reply-To: <87o82fwy3k.fsf@trop.in> (Andrew Tropin's message of "Wed, 09 Mar 2022 07:26:07 +0300") Message-ID: <87r17axeim.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Julien Lepiller , Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Andrew, Andrew Tropin skribis: > On 2022-03-05 23:44, Ludovic Court=C3=A8s wrote: [...] >> I propose to postpone this one after >> , and I even offer to rebase it >> myself if you want. :-) >> >> Could you send updated patches? > > Sure, I even replied to bug#54180 ticket :) Waiting for the merge, after > that will update patches to address your comments and will rebase them > on top of bug#54180. Also, I need to update the manual as well. Oh sorry, I had misunderstood your comment in . I=E2=80=99ve now pushed it so you can happily rebase. :-) Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 11 02:41:41 2022 Received: (at 52808) by debbugs.gnu.org; 11 Mar 2022 07:41:41 +0000 Received: from localhost ([127.0.0.1]:36381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSZu8-00012v-K6 for submit@debbugs.gnu.org; Fri, 11 Mar 2022 02:41:41 -0500 Received: from mail-lj1-f181.google.com ([209.85.208.181]:38647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nSZu5-00012e-8x for 52808@debbugs.gnu.org; Fri, 11 Mar 2022 02:41:38 -0500 Received: by mail-lj1-f181.google.com with SMTP id s25so10993251lji.5 for <52808@debbugs.gnu.org>; Thu, 10 Mar 2022 23:41:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=yvyD4Or/dc3kSMQyPu20xK4rd2cZosJvOpo1gSwY7/s=; b=w6EMxyt0PjPvaZ2Hqr1sTjkoO3PquxGmUvogyHEcKpY/utTwUlpX8kK6snRydRgyJB yECUV7YyjnPuRl2dGhNFTBs5soICtkOVK3BQBSIgdCvEIOzjzz0Jj0J6CLO+M+/qisWZ 5s99WYZdII0IHihlb5KyaDFSmrNZCutRzMvSCxj1JqatIgkG6VABo1Mhh9f+D/jIFuWG G4WnJqemisEIrc81zCXXlIteTtC+J9MWLVd8h70W0SdvWa2PgN/HUCMHCv/qpuda1dS0 rqoaW3CuGXzMLpGcvBhq4UFm8w7tOBe4Kaz1YbpKbyItZ4T+RAMTqMPa6cudyDIePB/q 2EPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=yvyD4Or/dc3kSMQyPu20xK4rd2cZosJvOpo1gSwY7/s=; b=3FBw5PFces/19sRzFl/pJMUN7Q5+5Oqb1uWBIJ27eEEeg1GaEjSb5TlMjh8uVzeHLO BfvtJxcPkz9+eHEtZ3yf3z9y/Yo76uUfomXXqF4ocNbCvGE62OY//4WluQiqV89UG7jt 4eDODfyHtAZUagHeOBTvyX7jd2P4nxaQaRYT7HiWttSc5/XhaVwgsNV2jV2WbAkzThkz eoHLa5xXxtCI4aahpMZ8eqCbJSa/9eap7qOBrgkAGhef2qTW3hzeR8MjOJLpkrAnYJaj 5xyQ3+g7TseiRuIdK/gFtv5pMWV+jGf5ugvPD4MDcrV4bdT0FFFGvF/Czr1/kbQKfda3 li+A== X-Gm-Message-State: AOAM531YF68R9AFZtBIHgKzcMumUuvvX4bso/rh36SuXaVyOEiZ7Tn+u GEkD9rCTS5S8PsOv+ggh7Oxkwg== X-Google-Smtp-Source: ABdhPJxh3v4jpAkj8nudUdOj7aAZ/eQ/dx2SLJJiQ/Wxs02xDFOjuw76tufPirGuLDj/hqKuFEZ7lA== X-Received: by 2002:a2e:7c13:0:b0:247:feee:d202 with SMTP id x19-20020a2e7c13000000b00247feeed202mr5122292ljc.35.1646984490915; Thu, 10 Mar 2022 23:41:30 -0800 (PST) Received: from localhost (109-252-135-33.dynamic.spd-mgts.ru. [109.252.135.33]) by smtp.gmail.com with ESMTPSA id a19-20020a2e88d3000000b00246585ccd51sm1582122ljk.14.2022.03.10.23.41.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Mar 2022 23:41:30 -0800 (PST) From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <871qzgm33o.fsf@gnu.org> References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <87o83t9mf8.fsf@gnu.org> <878rutzo1d.fsf@trop.in> <87zgn1bsha.fsf@gnu.org> <87r189s8mz.fsf@trop.in> <871qzgm33o.fsf@gnu.org> Date: Fri, 11 Mar 2022 10:41:26 +0300 Message-ID: <87o82dkkbd.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Julien Lepiller , Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-03-05 23:44, Ludovic Court=C3=A8s wrote: > Hi Andrew, > > The patches reached my mailbox around the time I went on vacation and > then fell through the cracks. Sorry about that! > > Andrew Tropin skribis: > >> After that patch series is merged we can give a time for users to >> migrate their self-made home services to xdg-configuration-files and >> after for example 2 weeks, remove special handling of dots for >> home-files. > > Sounds like a plan! > >> From 0cd37bbc724f9c793898c2655bdd1c335045c5f0 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Fri, 11 Feb 2022 10:55:01 +0300 >> Subject: [PATCH 1/5] home: Explicitly connect home-file and symlink-mana= ger >> services. >> >> * gnu/home/services.scm (home-files-directory): New variable. >> * gnu/home/symlink-manager.scm (update-symlinks-script): Use >> home-files-directory variable from (gnu home services). > > [...] > >> - (description "Configuration files for programs that >> -will be put in @file{~/.guix-home/files}."))) >> + (description (format #f "Files that will be put in >> +@file{~~/.guix-home/~a}, and further processed during activation." >> + home-files-directory)))) > > This hunk would prevent i18n so I suggest dropping it (you can mention > =E2=80=98home-files-directory=E2=80=99 in a margin comment for good measu= re). > > Otherwise LGTM. > Done. > >> From 23f7095d60b18b52de0d1aa314c4012cdf55a046 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Fri, 11 Feb 2022 11:03:02 +0300 >> Subject: [PATCH 2/5] home: Add home-xdg-configuration-files service. >> >> * gnu/home/services.scm (home-xdg-configuration-files): New variable. > > [...] > >> +(define xdg-configuration-files-subdir "config") >> >> +(define (xdg-configuration-files files) >> + (map (lambda (lst) >> + (cons (string-append xdg-configuration-files-subdir >> + "/" (car lst)) (cdr lst))) >> + files)) > > I=E2=80=99d just call it =E2=80=9C.config=E2=80=9D (instead of =E2=80=9Cc= onfig=E2=80=9D). That way, there > wouldn=E2=80=99t be any special treatment. WDYT? Will be done in next patch series. > > Also: s/subdir/directory/, and please use =E2=80=98match=E2=80=99 instead= of car/cdr > (info "(guix) Coding Style"). Done, done. > > >> + (description (format #f "Files that will be put in >> +@file{~~/.guix-home/~a/~a}, and further processed during activation." >> + home-files-directory >> + xdg-configuration-files)))) > > Same as above: drop =E2=80=98format=E2=80=99 and write ~/.guix-home/files= /.config. > Done. > >> From 11f23a48d480a91d6bfba0ff55c1a9831585a4ee Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Fri, 11 Feb 2022 15:03:44 +0300 >> Subject: [PATCH 3/5] home: shells: Migrate zsh to xdg-configuration-file= s. >> >> * gnu/home/services.scm (home-zsh-service-type): Additionally extend >> home-xdg-configuration-files-service-type. > > [...] > >> From ef4c3bbcc0c8c1a251f4ad6c494f8ed30adf45f2 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Fri, 11 Feb 2022 15:34:46 +0300 >> Subject: [PATCH 4/5] home: Migrate fountutils and xdg modules to >> xdg-configuration-files. >> >> * gnu/home/services/fontutils.scm (home-fontconfig-service-type): Migrat= e to >> xdg-configuration-files. >> * gnu/home/services/xdg.scm (home-xdg-user-directories-service-type, >> home-xdg-mime-applications-service-type): Migrate to xdg-configuration-f= iles. > > Neat! > >> From 089683bbd301f6e085f00fbd53713f335abac40e Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Fri, 11 Feb 2022 16:14:23 +0300 >> Subject: [PATCH 5/5] home: symlink-manager: Respect XDG_CONFIG_HOME duri= ng >> activation. >> >> * gnu/home/services/symlink-manager.scm (update-symlinks-script): Respect >> XDG_CONFIG_HOME during activation. > > I propose to postpone this one after > , and I even offer to rebase it > myself if you want. :-) > > Could you send updated patches? > > Thanks in advance, and apologies again for the delay! > > Ludo=E2=80=99. Added two minor patches for symlink-manager. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-home-symlink-manager-Use-existing-home-directory-sym.patch Content-Transfer-Encoding: quoted-printable From=203a6dc64d3366aa37507c83c598cbddb0f0815b6d Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Mar 2022 08:43:04 +0300 Subject: [PATCH 1/2] home: symlink-manager: Use existing home-directory symbol. * gnu/home/services/symlink-manager.scm (update-symlinks-script): Use existing home-directory symbol instead of additional getenv call. =2D-- gnu/home/services/symlink-manager.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/syml= ink-manager.scm index 767b1bdc01..bce5c85b56 100644 =2D-- a/gnu/home/services/symlink-manager.scm +++ b/gnu/home/services/symlink-manager.scm @@ -185,7 +185,7 @@ (define (source-file file) =20 #$%initialize-gettext =20 =2D (let* ((home (string-append (getenv "HOME") "/.guix-home")) + (let* ((home (string-append home-directory "/.guix-home")) (pivot (string-append home ".new")) (new-home (getenv "GUIX_NEW_HOME")) (old-home (getenv "GUIX_OLD_HOME"))) =2D-=20 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-home-symlink-manager-Add-missing-done-word-in-messag.patch Content-Transfer-Encoding: quoted-printable From=20aaef728aaf621884cce49539d47abb09a9f1e32d Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Mar 2022 09:21:41 +0300 Subject: [PATCH 2/2] home: symlink-manager: Add missing 'done' word in message. * gnu/home/services/symlink-manager.scm (update-symlinks-script): Add missi= ng 'done' word in message, keep code width below 80 column. =2D-- gnu/home/services/symlink-manager.scm | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/syml= ink-manager.scm index bce5c85b56..eb13d60496 100644 =2D-- a/gnu/home/services/symlink-manager.scm +++ b/gnu/home/services/symlink-manager.scm @@ -107,9 +107,10 @@ (define (strip file) (format #t (G_ "Removing ~a...") file) (delete-file file) (display (G_ " done\n"))) =2D (format #t =2D (G_ "Skipping ~a (not a symlink to store).= .. done\n") =2D file))))) + (format + #t + (G_ "Skipping ~a (not a symlink to store)... done\n= ") + file))))) =20 (const #t) ;down (lambda (directory stat _) ;up @@ -121,14 +122,15 @@ (define (strip file) (format #t (G_ "Removed ~a.\n") directory)) (lambda args (let ((errno (system-error-errno args))) =2D (cond ((=3D ENOTEMPTY errno) =2D (format =2D #t =2D (G_ "Skipping ~a (not an empty directory= )...\n") =2D directory)) =2D ((=3D ENOTDIR errno) #t) =2D (else =2D (apply throw args))))))))) + (cond + ((=3D ENOTEMPTY errno) + (format + #t + (G_ "Skipping ~a (not an empty directory)... do= ne\n") + directory)) + ((=3D ENOTDIR errno) #t) + (else + (apply throw args))))))))) (const #t) ;skip (const #t) ;error #t ;init =2D-=20 2.34.0 --=-=-= Content-Type: text/plain Thank you for cleaning up symlink-manager, now it's much nicer, simplier and I believe easier to maintain. Rebased previous patch series and addressed all the comments. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0001-home-Explicitly-connect-home-file-and-symlink-man.patch Content-Transfer-Encoding: quoted-printable From=201509c974029d161009b35bfd76132a86425bdecc Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Feb 2022 10:55:01 +0300 Subject: [PATCH v2 1/5] home: Explicitly connect home-file and symlink-mana= ger services. * gnu/home/services.scm (home-files-directory): New variable. * gnu/home/symlink-manager.scm (update-symlinks-script): Use home-files-directory variable from (gnu home services). =2D-- gnu/home/services.scm | 22 +++++++++++++--------- gnu/home/services/symlink-manager.scm | 15 +++++++-------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 1cd19ce7f9..32b10e99aa 100644 =2D-- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -43,6 +43,8 @@ (define-module (gnu home services) home-run-on-change-service-type home-provenance-service-type =20 + home-files-directory + fold-home-service-types home-provenance =20 @@ -74,12 +76,11 @@ (define-module (gnu home services) ;;; file (details described in the manual). ;;; ;;; home-files-service-type is similar to etc-service-type, but doesn't ex= tend =2D;;; home-activation, because deploy mechanism for config files is plugga= ble and =2D;;; can be different for different home environments: The default one is= called =2D;;; symlink-manager (will be introudced in a separate patch series), whi= ch creates =2D;;; links for various dotfiles (like $XDG_CONFIG_HOME/$APP/...) to store= , but is =2D;;; possible to implement alternative approaches like read-only home fro= m Julien's =2D;;; guix-home-manager. +;;; home-activation, because deploy mechanism for config files is pluggable +;;; and can be different for different home environments: The default one = is +;;; called symlink-manager, which creates links for various dotfiles and x= dg +;;; configuration files to store, but is possible to implement alternative +;;; approaches like read-only home from Julien's guix-home-manager. ;;; ;;; home-run-on-first-login-service-type provides an @file{on-first-login}= guile ;;; script, which runs provided gexps once, when user makes first login. = It can @@ -262,11 +263,14 @@ (define (assert-no-duplicates files) =20 (file-union "files" files)) =20 +;; Used by symlink-manager +(define home-files-directory "files") + (define (files-entry files) "Return an entry for the @file{~/.guix-home/files} directory containing FILES." (with-monad %store-monad =2D (return `(("files" ,(files->files-directory files)))))) + (return `((,home-files-directory ,(files->files-directory files)))))) =20 (define home-files-service-type (service-type (name 'home-files) @@ -276,8 +280,8 @@ (define home-files-service-type (compose concatenate) (extend append) (default-value '()) =2D (description "Configuration files for programs that =2Dwill be put in @file{~/.guix-home/files}."))) + (description "Files that will be put in +@file{~~/.guix-home/files}, and further processed during activation."))) =20 (define %initialize-gettext #~(begin diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/syml= ink-manager.scm index eb13d60496..16031ea5d3 100644 =2D-- a/gnu/home/services/symlink-manager.scm +++ b/gnu/home/services/symlink-manager.scm @@ -26,12 +26,11 @@ (define-module (gnu home services symlink-manager) =20 ;;; Comment: ;;; =2D;;; symlink-manager cares about configuration files: it backs up files =2D;;; created by user, removes symlinks and directories created by a =2D;;; previous generation, and creates new directories and symlinks to =2D;;; configuration files according to the content of files/ directory =2D;;; (created by home-files-service) of the current home environment =2D;;; generation. +;;; symlink-manager cares about xdg configurations and other files: it bac= ks +;;; up files created by user, removes symlinks and directories created by a +;;; previous generation, and creates new directories and symlinks to files +;;; according to the content of directories (created by home-files-service= ) of +;;; the current home environment generation. ;;; ;;; Code: =20 @@ -84,7 +83,7 @@ (define (cleanup-symlinks home-generation) ;; store item containing a home generation. (define config-file-directory ;; Note: Trailing slash is needed because "files" is a symlin= k. =2D (string-append home-generation "/files/")) + (string-append home-generation "/" #$home-files-directory "/"= )) =20 (define (strip file) (string-drop file @@ -143,7 +142,7 @@ (define (create-symlinks home-generation) ;; Create in $HOME symlinks for the files in HOME-GENERATION. (define config-file-directory ;; Note: Trailing slash is needed because "files" is a symlin= k. =2D (string-append home-generation "/files/")) + (string-append home-generation "/" #$home-files-directory "/"= )) =20 (define (strip file) (string-drop file =2D-=20 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0002-home-Add-home-xdg-configuration-files-service.patch Content-Transfer-Encoding: quoted-printable From=20e98e5ee520fada9c6d100f40fcafa6358b626365 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Feb 2022 11:03:02 +0300 Subject: [PATCH v2 2/5] home: Add home-xdg-configuration-files service. * gnu/home/services.scm (home-xdg-configuration-files): New variable. =2D-- gnu/home/services.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 32b10e99aa..2f441eb968 100644 =2D-- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -38,12 +38,14 @@ (define-module (gnu home services) home-profile-service-type home-environment-variables-service-type home-files-service-type + home-xdg-configuration-files-service-type home-run-on-first-login-service-type home-activation-service-type home-run-on-change-service-type home-provenance-service-type =20 home-files-directory + xdg-configuration-files-directory =20 fold-home-service-types home-provenance @@ -283,6 +285,27 @@ (define home-files-service-type (description "Files that will be put in @file{~~/.guix-home/files}, and further processed during activation."))) =20 +(define xdg-configuration-files-directory "config") + +(define (xdg-configuration-files files) + "Add config/ prefix to each file-path in FILES." + (map (match-lambda + ((file-path . rest) + (cons (string-append xdg-configuration-files-directory "/" file-= path) + rest))) + files)) + +(define home-xdg-configuration-files-service-type + (service-type (name 'home-files) + (extensions + (list (service-extension home-files-service-type + xdg-configuration-files))) + (compose concatenate) + (extend append) + (default-value '()) + (description "Files that will be put in +@file{~~/.guix-home/files/config}, and further processed during activation= ."))) + (define %initialize-gettext #~(begin (bindtextdomain %gettext-domain =2D-=20 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0003-home-shells-Migrate-zsh-to-xdg-configuration-file.patch Content-Transfer-Encoding: quoted-printable From=202dcb5da4991607b01b479c12617c00bf0785d247 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Feb 2022 15:03:44 +0300 Subject: [PATCH v2 3/5] home: shells: Migrate zsh to xdg-configuration-file= s. * gnu/home/services.scm (home-zsh-service-type): Additionally extend home-xdg-configuration-files-service-type. =2D-- gnu/home/services/shells.scm | 122 +++++++++++++++++++---------------- 1 file changed, 66 insertions(+), 56 deletions(-) diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index ca7f4ac0ad..4b3618a868 100644 =2D-- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -171,56 +171,27 @@ (define-configuration home-zsh-configuration won't be read in some cases (if the shell terminates by exec'ing another process for example).")) =20 =2D(define (add-zsh-configuration config) =2D (let* ((xdg-flavor? (home-zsh-configuration-xdg-flavor? config))) =2D =2D (define prefix-file =2D (cut string-append =2D (if xdg-flavor? =2D "config/zsh/." =2D "") <>)) =2D =2D (define (filter-fields field) =2D (filter-configuration-fields home-zsh-configuration-fields =2D (list field))) =2D =2D (define (serialize-field field) =2D (serialize-configuration =2D config =2D (filter-fields field))) =2D =2D (define (file-if-not-empty field) =2D (let ((file-name (symbol->string field)) =2D (field-obj (car (filter-fields field)))) =2D (if (not (null? ((configuration-field-getter field-obj) config))) =2D `(,(prefix-file file-name) =2D ,(mixed-text-file =2D file-name =2D (serialize-field field))) =2D '()))) =2D =2D (filter =2D (compose not null?) =2D `(,(if xdg-flavor? =2D `("zshenv" =2D ,(mixed-text-file =2D "auxiliary-zshenv" =2D (if xdg-flavor? =2D "source ${XDG_CONFIG_HOME:-$HOME/.config}/zsh/.zshen= v\n" =2D ""))) =2D '()) =2D (,(prefix-file "zshenv") =2D ,(mixed-text-file =2D "zshenv" =2D (if xdg-flavor? =2D "export ZDOTDIR=3D${XDG_CONFIG_HOME:-$HOME/.config}/zsh\n" =2D "") =2D (serialize-field 'zshenv) =2D (serialize-field 'environment-variables))) =2D (,(prefix-file "zprofile") =2D ,(mixed-text-file =2D "zprofile" =2D "\ +(define (zsh-filter-fields field) + (filter-configuration-fields home-zsh-configuration-fields (list field))) + +(define (zsh-serialize-field config field) + (serialize-configuration config (zsh-filter-fields field))) + +(define* (zsh-field-not-empty? config field) + (let ((file-name (symbol->string field)) + (field-obj (car (zsh-filter-fields field)))) + (not (null? ((configuration-field-getter field-obj) config))))) + +(define (zsh-file-zshenv config) + (mixed-text-file + "zshenv" + (zsh-serialize-field config 'zshenv) + (zsh-serialize-field config 'environment-variables))) + +(define (zsh-file-zprofile config) + (mixed-text-file + "zprofile" + "\ # Setups system and user profiles and related variables source /etc/profile # Setups home environment profile @@ -229,11 +200,47 @@ (define (file-if-not-empty field) # It's only necessary if zsh is a login shell, otherwise profiles will # be already sourced by bash " =2D (serialize-field 'zprofile))) =2D =2D ,@(list (file-if-not-empty 'zshrc) =2D (file-if-not-empty 'zlogin) =2D (file-if-not-empty 'zlogout)))))) + (zsh-serialize-field config 'zprofile))) + +(define (zsh-file-by-field config field) + (match field + ('zshenv (zsh-file-zshenv config)) + ('zprofile (zsh-file-zprofile config)) + (e (mixed-text-file + (symbol->string field) + (zsh-serialize-field config field))))) + +(define (zsh-get-configuration-files config) + `(("zprofile" ,(zsh-file-by-field config 'zprofile)) ;; Always non-empty + ,@(if (and (zsh-field-not-empty? config 'zshenv) + (zsh-field-not-empty? config 'environment-variables)) + `(("zshenv" ,(zsh-file-by-field config 'zshenv))) '()) + ,@(if (zsh-field-not-empty? config 'zshrc) + `(("zshrc" ,(zsh-file-by-field config 'zshrc))) '()) + ,@(if (zsh-field-not-empty? config 'zlogin) + `(("zlogin" ,(zsh-file-by-field config 'zlogin))) '()) + ,@(if (zsh-field-not-empty? config 'zlogout) + `(("zlogout" ,(zsh-file-by-field config 'zlogout))) '()))) + +(define (zsh-home-files config) + (define zshenv-auxiliary-file + (mixed-text-file + "zshenv-auxiliary" + "export ZDOTDIR=3D${XDG_CONFIG_HOME:-$HOME/.config}/zsh\n" + "[[ -f $ZDOTDIR/.zshenv ]] && source $ZDOTDIR/.zshenv\n")) + + (if (home-zsh-configuration-xdg-flavor? config) + `(("zshenv" ,zshenv-auxiliary-file)) + (zsh-get-configuration-files config))) + +(define (zsh-xdg-configuration-files config) + (if (home-zsh-configuration-xdg-flavor? config) + (map + (lambda (lst) + (cons (string-append "zsh/." (car lst)) + (cdr lst))) + (zsh-get-configuration-files config)) + '())) =20 (define (add-zsh-packages config) (list (home-zsh-configuration-package config))) @@ -291,7 +298,10 @@ (define home-zsh-service-type (extensions (list (service-extension home-files-service-type =2D add-zsh-configuration) + zsh-home-files) + (service-extension + home-xdg-configuration-files-service-type + zsh-xdg-configuration-files) (service-extension home-profile-service-type add-zsh-packages))) =2D-=20 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0004-home-Migrate-fountutils-and-xdg-modules-to-xdg-co.patch Content-Transfer-Encoding: quoted-printable From=2099ef9ce7d0796642a54497e3a080e94a78fbb03c Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Feb 2022 15:34:46 +0300 Subject: [PATCH v2 4/5] home: Migrate fountutils and xdg modules to xdg-configuration-files. * gnu/home/services/fontutils.scm (home-fontconfig-service-type): Migrate to xdg-configuration-files. * gnu/home/services/xdg.scm (home-xdg-user-directories-service-type, home-xdg-mime-applications-service-type): Migrate to xdg-configuration-file= s. =2D-- gnu/home/services/fontutils.scm | 4 ++-- gnu/home/services/xdg.scm | 31 +++++++++++++++++-------------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/gnu/home/services/fontutils.scm b/gnu/home/services/fontutils.= scm index 772904367d..6062eaed6a 100644 =2D-- a/gnu/home/services/fontutils.scm +++ b/gnu/home/services/fontutils.scm @@ -34,7 +34,7 @@ (define-module (gnu home services fontutils) ;;; Code: =20 (define (add-fontconfig-config-file he-symlink-path) =2D `(("config/fontconfig/fonts.conf" + `(("fontconfig/fonts.conf" ,(mixed-text-file "fonts.conf" " @@ -51,7 +51,7 @@ (define home-fontconfig-service-type (service-type (name 'home-fontconfig) (extensions (list (service-extension =2D home-files-service-type + home-xdg-configuration-files-service-type add-fontconfig-config-file) (service-extension home-run-on-change-service-type diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index 2833198cdf..361a2a6148 100644 =2D-- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -190,11 +190,11 @@ (define-configuration home-xdg-user-directories-confi= guration "Default directory for videos.")) =20 (define (home-xdg-user-directories-files-service config) =2D `(("config/user-dirs.conf" + `(("user-dirs.conf" ,(mixed-text-file "user-dirs.conf" "enabled=3DFalse\n")) =2D ("config/user-dirs.dirs" + ("user-dirs.dirs" ,(mixed-text-file "user-dirs.dirs" (serialize-configuration @@ -218,7 +218,7 @@ (define home-xdg-user-directories-service-type (service-type (name 'home-xdg-user-directories) (extensions (list (service-extension =2D home-files-service-type + home-xdg-configuration-files-service-type home-xdg-user-directories-files-service) (service-extension home-activation-service-type @@ -417,7 +417,7 @@ (define-configuration home-xdg-mime-applications-config= uration "A list of XDG desktop entries to create. See @code{xdg-desktop-entry}.")) =20 =2D(define (home-xdg-mime-applications-files-service config) +(define (home-xdg-mime-applications-files config) (define (add-xdg-desktop-entry-file entry) (let ((file (first entry)) (config (second entry))) @@ -425,16 +425,16 @@ (define (add-xdg-desktop-entry-file entry) (apply mixed-text-file (format #f "xdg-desktop-~a-entry" file) config)))) + (map (compose add-xdg-desktop-entry-file serialize-xdg-desktop-entry) + (home-xdg-mime-applications-configuration-desktop-entries config))) =20 =2D (append =2D `(("config/mimeapps.list" =2D ,(mixed-text-file =2D "xdg-mime-appplications" =2D (serialize-configuration =2D config =2D home-xdg-mime-applications-configuration-fields)))) =2D (map (compose add-xdg-desktop-entry-file serialize-xdg-desktop-entry) =2D (home-xdg-mime-applications-configuration-desktop-entries config= )))) +(define (home-xdg-mime-applications-xdg-files config) + `(("mimeapps.list" + ,(mixed-text-file + "xdg-mime-appplications" + (serialize-configuration + config + home-xdg-mime-applications-configuration-fields))))) =20 (define (home-xdg-mime-applications-extension old-config extension-configs) (define (extract-fields config) @@ -469,7 +469,10 @@ (define home-xdg-mime-applications-service-type (extensions (list (service-extension home-files-service-type =2D home-xdg-mime-applications-files-service))) + home-xdg-mime-applications-files) + (service-extension + home-xdg-configuration-files-service-type + home-xdg-mime-applications-xdg-files))) (compose identity) (extend home-xdg-mime-applications-extension) (default-value (home-xdg-mime-applications-configuration)) =2D-=20 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=v2-0005-home-symlink-manager-Respect-XDG_CONFIG_HOME-duri.patch Content-Transfer-Encoding: quoted-printable From=20f34175838dac46093a26971798b08c0679691b34 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 11 Mar 2022 10:12:30 +0300 Subject: [PATCH v2 5/5] home: symlink-manager: Respect XDG_CONFIG_HOME duri= ng activation. * gnu/home/services/symlink-manager.scm (update-symlinks-script): Respect XDG_CONFIG_HOME during activation. =2D-- gnu/home/services/symlink-manager.scm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/syml= ink-manager.scm index 16031ea5d3..3b851229f3 100644 =2D-- a/gnu/home/services/symlink-manager.scm +++ b/gnu/home/services/symlink-manager.scm @@ -50,14 +50,29 @@ (define (update-symlinks-script) (define home-directory (getenv "HOME")) =20 + (define xdg-config-home + (or (getenv "XDG_CONFIG_HOME") + (string-append (getenv "HOME") "/.config"))) + (define backup-directory (string-append home-directory "/" (number->string (current-time= )) "-guix-home-legacy-configs-backup")) =20 + (define (preprocess-file file) + "If file is in XDG-CONFIGURATION-FILES-DIRECTORY use +subdirectory from XDG_CONFIG_HOME to generate a target path." + (if (string-prefix? #$xdg-configuration-files-directory file) + (string-append + (substring xdg-config-home + (1+ (string-length home-directory))) + (substring file + (string-length #$xdg-configuration-files-direct= ory))) + (string-append "." file))) + (define (target-file file) ;; Return the target of FILE, a config file name sans leading d= ot ;; such as "config/fontconfig/fonts.conf" or "bashrc". =2D (string-append home-directory "/." file)) + (string-append home-directory "/" (preprocess-file file))) =20 (define (symlink-to-store? file) (catch 'system-error @@ -70,7 +85,7 @@ (define (symlink-to-store? file) =20 (define (backup-file file) (define backup =2D (string-append backup-directory "/." file)) + (string-append backup-directory "/" (preprocess-file file))) =20 (mkdir-p backup-directory) (format #t (G_ "Backing up ~a...") (target-file file)) =2D-=20 2.34.0 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I plan to prepare documentation, second patch series and announcement next week. =2D-=20 Best regards, Andrew Tropin --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmIq/ScPHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6wulAQAIV0kkYIifh66/uDx/80aZ8xJZlJEYv+/64O z4ZOzZVWuPvzOPcL/JwumIz1GC78tioWlVCaoKivs0x+3NH1N4wQVBc3SUKbxfqU WIIMxoq02Wt/slGwNdt60Bzi7SBitoLiiH4MS1TUJTqr09x79G7vLs8q7zPCvcvo c1usaibWFThdtA5Y07cFqa6rZgqrQDWQrOdxka+SRbiIJ8485ILovafdjDBfA+PG HVa3PxEitdCdU4QaN/seBIDn6ap4ziFzXtMzefyasoV0mLYaShWW4mu2Rq8P83nx DG0E8hzU1LgSjfkb4LZIx+epp3KcFa0Y3abwTOAfgYqKoodlSKJQnjOHmcHe78oh F52K7696PwVXqOn+mETTeVNOnhFlQzNS5s3MLQEnNCOpCqHyc4ByzP9v/NdpJC0i 3SfHt7b3azoKi11HO1T3yUnd6Zp7yRTu7aS1crYZg449vSOeY7ueDEZz1SaZdI2N YyV31vEVaZvwEM8SEwifGM9ljWy3kfx+q3sWWOrD/mYWzeflx/NIzak8ri7mfXEv z5GnJ9nYzW5gVvm06s9zo/kpRYb+g7I6KN07o8Qe1yW1VWkCBx4taeoNjrNrcrq1 dnnda9e/q78F9k97LlveYUQRCr5LH5RMzS2yccnTxxLVhJQKdwQbyGsWtju9gPxR /BKOc+9T =HkF5 -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 20 14:07:44 2022 Received: (at 52808-done) by debbugs.gnu.org; 20 Mar 2022 18:07:44 +0000 Received: from localhost ([127.0.0.1]:35118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVzxw-0000nK-Jt for submit@debbugs.gnu.org; Sun, 20 Mar 2022 14:07:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nVzxu-0000n8-SH for 52808-done@debbugs.gnu.org; Sun, 20 Mar 2022 14:07:43 -0400 Received: from [2001:470:142:3::e] (port=55926 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVzxh-0006yr-NH; Sun, 20 Mar 2022 14:07:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=WIdlWipGvYxwyMYcb5/+6buDLxga/mjGLQSRao2z8ok=; b=rxdn9NZxOOSMCMkA2RrL gzhPF+s233dBxgF/odSRhEbkBkSx9kE+/kSuY381fU+i0rte2FJ3/YG7HksAbAiCL3ByqEn0Z0oN/ 0xLj/MzgqIv6pSiK0b33FFHLXc5Wb6Fl6m/5yJDGnzMOYoys13vKiE47gLk+N4Ioip7ly4sVK+nHo QoNUV1yB8DWO931/BcexJrgqcPkKkJuE1a4hLm1HSzN/y2a25KFaQwWOtL7hrCqipj6HBsgXHdgGl vQi4SZXG39pR8UpitoS4QHVrGNbqVdXUtlDmZl7t1bOiThIqmHObVt6B/gbeRRJ9npYrpUCW+WQkA 84J4qP3+pEUTQQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:61996 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nVzxh-0007Mr-AU; Sun, 20 Mar 2022 14:07:29 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: bug#52808: Guix home should not assume that all targets are dot files References: <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87bkzw2kvm.fsf@trop.in> <87o83t9mf8.fsf@gnu.org> <878rutzo1d.fsf@trop.in> <87zgn1bsha.fsf@gnu.org> <87r189s8mz.fsf@trop.in> <871qzgm33o.fsf@gnu.org> <87o82dkkbd.fsf@trop.in> Date: Sun, 20 Mar 2022 19:07:26 +0100 In-Reply-To: <87o82dkkbd.fsf@trop.in> (Andrew Tropin's message of "Fri, 11 Mar 2022 10:41:26 +0300") Message-ID: <87mthklcpt.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52808-done Cc: 52808-done@debbugs.gnu.org, Julien Lepiller , Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Andrew, I finally got around to committing it as 6da2a5a5655668f42ec5b26f875ddbc498e132b6. Thank you! Ludo=E2=80=99. From unknown Wed Jun 18 23:11:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: Did not alter fixed versions and reopened. Date: Sun, 20 Mar 2022 20:59:01 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # Did not alter fixed versions and reopened. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 20 17:00:35 2022 Received: (at 52808) by debbugs.gnu.org; 20 Mar 2022 21:00:35 +0000 Received: from localhost ([127.0.0.1]:35225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nW2fD-0005cF-9l for submit@debbugs.gnu.org; Sun, 20 Mar 2022 17:00:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nW2fB-0005UY-Ox for 52808@debbugs.gnu.org; Sun, 20 Mar 2022 17:00:34 -0400 Received: from [2001:470:142:3::e] (port=58278 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nW2f6-0000sz-5v; Sun, 20 Mar 2022 17:00:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=akssbjkwc1kiaQW1cqH49Pf/jFzPWq9lrM9d5gVPGyU=; b=c9tpW7KjoHduVO8/hHzf iUU+utMjKUrCFglXvOFX8gtvBE8pznzTFGwk4PNoEjia3RRQwW6GuZJ98x1l2zzFtKQlD1SpkZtrt LHzSHNR3gQEyjTWjlu88QiHCQjfRJ3NSa9NV6V6ipGyGnFfd2ITOdtZTQhwgdFGJIlkKlQojPK7fz RQ3sMX+ZiX6PcbybR99A9GY5MtPzd+nJHO63YEYzxAqfRZy11fulmGKL5OuKWBiONjs+JRkEYR1jx 3JTXzeY0ii217k1bJ0ICs0FZ1CkAjNwps2gmSDrVqQfE99qD8uwNLS0PVAzPx1wviW6ybCoWcFmX0 lGvTsQxspnH4ow==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:59441 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nW2f0-00051s-6W; Sun, 20 Mar 2022 17:00:27 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Nick Zalutskiy" , 52808@debbugs.gnu.org, Andrew Tropin Subject: Re: bug#52808: Guix home should not assume that all targets are dot files References: <87mthklcpt.fsf@gnu.org> <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> Date: Sun, 20 Mar 2022 22:00:20 +0100 In-Reply-To: (GNU bug Tracking System's message of "Sun, 20 Mar 2022 18:08:01 +0000") Message-ID: <87h77sl4pn.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52808 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) I wrote: > I finally got around to committing it as > 6da2a5a5655668f42ec5b26f875ddbc498e132b6. Thank you! I hit =E2=80=9Cclose=E2=80=9D too quickly: we still need the patch that cha= nges =E2=80=98home-files-service-type=E2=80=99 and/or symlink-manager.scm to not= prepend a dot, so reopening! :-) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 28 05:17:53 2022 Received: (at 52808) by debbugs.gnu.org; 28 Mar 2022 09:17:53 +0000 Received: from localhost ([127.0.0.1]:57302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYlVZ-0007Ox-3V for submit@debbugs.gnu.org; Mon, 28 Mar 2022 05:17:53 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:33757) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYlVX-0007Ok-3R for 52808@debbugs.gnu.org; Mon, 28 Mar 2022 05:17:51 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 798346000E; Mon, 28 Mar 2022 09:17:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1648459065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iFWC/qqTugSMSZC6Co7Z0M3SFZQUPKbTABs42eyKk4k=; b=Vr3t/liaNXbfnLAQORn1qwgPJRZxP1TaTExhJbruYDSSj78C5qQtQeUgggpqrrD7Fe0uhP R7RVczf8J8eG4utFLqT/iUrjz6slsgsr/mgmaa9fAtNMT9VjNpV8xijnNGdBoVshbUZ6x/ D608oG5/q494RzaqwHh+eaDde26BRZyIUCfBZcM5B5sHt4485tZyGIavFU9HMPU2lPBat+ IGZmr+kavwR9/qHhOGdJ50s+BjG9GmlvhEKrSsWIK7ZfiTvkySwwhCHZhszXMgf3Nu9RyX cq1kIKL48wtA8G7jfF/qCHIV/burXhxY255qDLUikijb4vqERQg10Cul6awdnA== From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Nick Zalutskiy , 52808@debbugs.gnu.org Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <87h77sl4pn.fsf_-_@gnu.org> References: <87mthklcpt.fsf@gnu.org> <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87h77sl4pn.fsf_-_@gnu.org> Date: Mon, 28 Mar 2022 12:17:41 +0300 Message-ID: <87y20ubfm2.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 52808 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-03-20 22:00, Ludovic Court=C3=A8s wrote: > I wrote: > >> I finally got around to committing it as >> 6da2a5a5655668f42ec5b26f875ddbc498e132b6. Thank you! > > I hit =E2=80=9Cclose=E2=80=9D too quickly: we still need the patch that c= hanges > =E2=80=98home-files-service-type=E2=80=99 and/or symlink-manager.scm to n= ot prepend a > dot, so reopening! :-) > > Ludo=E2=80=99. Forgot to update fish home service in previous patch series, please apply this patch as well: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-home-shells-Migrate-fish-to-xdg-configuration-files.patch Content-Transfer-Encoding: quoted-printable From=207d9cf53ab574c8ab468bfdae2798de65af6c00b5 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Mon, 28 Mar 2022 12:14:10 +0300 Subject: [PATCH] home: shells: Migrate fish to xdg-configuration-files. * gnu/home/services.scm (home-fish-service-type): Migrate to home-xdg-configuration-files-service-type. =2D-- gnu/home/services/shells.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index 7b9769bcf3..fb728893e3 100644 =2D-- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -586,7 +586,7 @@ (define-configuration home-fish-configuration serialize-fish-abbreviations)) =20 (define (fish-files-service config) =2D `(("config/fish/config.fish" + `(("fish/config.fish" ,(mixed-text-file "fish-config.fish" #~(string-append "\ @@ -650,7 +650,7 @@ (define home-fish-service-type (service-type (name 'home-fish) (extensions (list (service-extension =2D home-files-service-type + home-xdg-configuration-files-service-type fish-files-service) (service-extension home-profile-service-type =2D-=20 2.34.0 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Best regards, Andrew Tropin --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmJBfTUPHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6wSj8P/24ucilDoqq2r7Epzp6yExhE26xNfgOzmUeN wJ2kdhoQyNhDEZwqaGC+ccYkX+HFVni0Ph0eZg+icthSTpc9qIqZ4FmrkmtMcnJF Acu6IkB7LfQvUhQZA655YLMPzLHanZ1kgK7bnmf/sHL/2yQfY+Mdiy2odqhPhX3+ MJTjhfu2sL5NWFZQUlqXbv7qj0W1blP2XO7MPRwa+hLb7Kw7I8E/cDStuiX7Ed5e K4marusmb8rPzIQE/Z3WqparRGf5h35bYXGgcs/pkY0XQps5lfiMnEbhAX84Xv+g KaxSZhISMylugw5pXuNWapfZ3OzWpxe5HI6AQQSRqVf15M9uQs9QaW0aB92yDOy1 pa4k1dFo1/kOcbDvG/6OCoKvkJvYJnc5+sHAikAO+0kf0X39LWqKCT56ErxDQoxY cUotLiy+2Pe35rpSr4JElh1h5aMlICzNXNcwLoXio5FOIDVqPFON9FLB4UWA/rd2 XQ25HRuZ01AKNAOCwXneJ0SEick9tQ7WQ1Tc8O7NUr3Q1n5ovmtDPTT6jKXR60+I 4tc2ZilKpZAn8k3hKmRM8RsCtM8HsgSXWIOfqbZ6bvhfNlL5HLGsaCEsG47gxzIh GEGevNWAK4Cgcc/5iGMBhBu3yn++D7h/cTB78TbOsH8PyWsMa+sEDS5GtipSD5BW JktceF3a =4VGR -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 29 05:52:11 2022 Received: (at 52808) by debbugs.gnu.org; 29 Mar 2022 09:52:11 +0000 Received: from localhost ([127.0.0.1]:59883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZ8WJ-0003sJ-C5 for submit@debbugs.gnu.org; Tue, 29 Mar 2022 05:52:11 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:33497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZ8WH-0003s4-PA for 52808@debbugs.gnu.org; Tue, 29 Mar 2022 05:52:10 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id E1BE2C0005; Tue, 29 Mar 2022 09:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1648547523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jYT7pJu3PZ705oFT+Gc+hXGgVcXRIysf0vWJcAVuPqc=; b=EP8q6ImWi+muSmaQpqMRDm+mIjuEjawIr0XBYWaTiG3reh9ebUVZ9+PwXZo56BmDxIoRbE KDMe08HMu0nTqgKtsp1AN/OeypMe+fQTBP3I3LwOQTFvxMd9u42tFok6UN46MiLGA0WoNS YLPkWgNEjps8Jr7Z3u6S4tK6PRcsazSwHn+DfJqjqifk1I8BBA9zDPaFxXFkeUfDGhvqPN 5ANhdbB1ESn+72JcsTW0RTcLM6PLGo7fElYmHcM+4fRVhsSXIDfWWaOwl68GO9q+/ald1L uJd0oB+MswXieC5az5+oOxr4ZGbalOILSVP6smFYO7yvY4WL/kjYSoPaoX3mGg== From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Nick Zalutskiy , 52808@debbugs.gnu.org Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <87h77sl4pn.fsf_-_@gnu.org> References: <87mthklcpt.fsf@gnu.org> <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87h77sl4pn.fsf_-_@gnu.org> Date: Tue, 29 Mar 2022 12:51:59 +0300 Message-ID: <87fsn1f5mo.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 52808 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-03-20 22:00, Ludovic Court=C3=A8s wrote: > I wrote: > >> I finally got around to committing it as >> 6da2a5a5655668f42ec5b26f875ddbc498e132b6. Thank you! > > I hit =E2=80=9Cclose=E2=80=9D too quickly: we still need the patch that c= hanges > =E2=80=98home-files-service-type=E2=80=99 and/or symlink-manager.scm to n= ot prepend a > dot, so reopening! :-) > > Ludo=E2=80=99. A few more minor fixes: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-home-shells-Rename-zsh-related-functions.patch Content-Transfer-Encoding: quoted-printable From=20629466d23308e135c4a46951e5ea568677c5ec00 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Tue, 29 Mar 2022 11:15:56 +0300 Subject: [PATCH 1/2] home: shells: Rename zsh related functions. * gnu/home/services/shells.scm (home-zsh-service-type): Make zsh related private functions more consistently named. =2D-- gnu/home/services/shells.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index fb728893e3..086fe7d8c4 100644 =2D-- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -222,7 +222,7 @@ (define (zsh-get-configuration-files config) ,@(if (zsh-field-not-empty? config 'zlogout) `(("zlogout" ,(zsh-file-by-field config 'zlogout))) '()))) =20 =2D(define (zsh-home-files config) +(define (add-zsh-dot-configuration config) (define zshenv-auxiliary-file (mixed-text-file "zshenv-auxiliary" @@ -233,7 +233,7 @@ (define zshenv-auxiliary-file `(("zshenv" ,zshenv-auxiliary-file)) (zsh-get-configuration-files config))) =20 =2D(define (zsh-xdg-configuration-files config) +(define (add-zsh-xdg-configuration config) (if (home-zsh-configuration-xdg-flavor? config) (map (lambda (lst) @@ -298,10 +298,10 @@ (define home-zsh-service-type (extensions (list (service-extension home-files-service-type =2D zsh-home-files) + add-zsh-dot-configuration) (service-extension home-xdg-configuration-files-service-type =2D zsh-xdg-configuration-files) + add-zsh-xdg-configuration) (service-extension home-profile-service-type add-zsh-packages))) =2D-=20 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-home-symlink-manager-Handle-non-existing-directory-d.patch Content-Transfer-Encoding: quoted-printable From=20a71346b059691a982a7dc0c7f4fd708b49566500 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Tue, 29 Mar 2022 11:56:48 +0300 Subject: [PATCH 2/2] home: symlink-manager: Handle non-existing directory during cleanup. * gnu/home/services/symlink-manager.scm (update-symlinks-script): Handle non-existing directory during cleanup. =2D-- gnu/home/services/symlink-manager.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/syml= ink-manager.scm index 3b851229f3..80ca73fed8 100644 =2D-- a/gnu/home/services/symlink-manager.scm +++ b/gnu/home/services/symlink-manager.scm @@ -142,6 +142,7 @@ (define (strip file) #t (G_ "Skipping ~a (not an empty directory)... do= ne\n") directory)) + ((=3D ENOENT errno) #t) ((=3D ENOTDIR errno) #t) (else (apply throw args))))))))) =2D-=20 2.34.0 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Best regards, Andrew Tropin --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmJC1r8PHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6wW+gP/irj2SRC6zaFIjLeJ5NTj6/1qglobQ6td/of SrKWdjtkhHOdFw8fGSh+sxsnbddSx55Z6VlF1INpbNu+dexVjj/k8+xTkn2FNT/J xVE37UHzxMrHwTr9+LV+FZauzhJzCh1uf50OX6S7TUYRXKz58hWKcGT2ziN6hG9T Nk2s22yEbd06hmqN0KiznPxWZuS9KL4yKZ1zi/NbUEYkbhauyOGzJ0UO59XLKXKg pKS9L0TZBvbTUIJoKzZ8LpdzV3wTgzeCWuV/7Du1GyVfZvZMiqrL5uc+uuw+92y5 rRt+vHnrLI7ZMdVeyUaJAlUXiCRZGGxJ2BSJm+yzvqmDjM+T2Ql6MMii4bTfwyLc bODoCApwYkdk6xao+G2u0f3L7qSxbn+smu+AY6eWJS7li5d2hfS2Re2rc+/+ZeED gsJnJfuZbSFCCfbr7AMxkx0IacpIZl/lt6FFkkgyO1uhwG4PBkSbvtPdgNH+xDE2 EnK7rAG+NM0kB7UdcnawFByAJfNSDpTUVBULnQx6BBd5sUIq2wEzPwDt1U39hxX1 NK2EyimijMZd5uWQyWlBUFYx4dl3HqDs7447UBn7yPLi8rfTad9a4kS7w0tEbGRy O2M8Aq9EAJ9tFkKVwO+dSJkz8T6LfbZrZetDPrNI5osRTo0882WCIiq6gDefurQJ NSgEW1cs =S+qk -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 29 06:24:25 2022 Received: (at 52808) by debbugs.gnu.org; 29 Mar 2022 10:24:25 +0000 Received: from localhost ([127.0.0.1]:59963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZ91U-0000bY-Vj for submit@debbugs.gnu.org; Tue, 29 Mar 2022 06:24:25 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:47285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZ91S-0000bD-IW for 52808@debbugs.gnu.org; Tue, 29 Mar 2022 06:24:23 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 5F707240011; Tue, 29 Mar 2022 10:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1648549456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qdIoBvu/eBOiZBtVR0Ejy61Kt4D1R+xbJW4yJxH6grw=; b=XYmh2ZX2SdnBjncqmZG0Tmg4xahen75FPfxIpBtgyDpHsE0gdKZ2gR/AvUVLdlSWd0nH0e oBbAdAwL6xv8nbWFjGu7nhsNsIoP4bOcY9S24AXkxG8+3vWuOrdlkBbgROx4URDNm7CahM moETQ7TqrWRO84Ayr9mJTUuddciRkpG4iLnWv+OlI+d6J2fiDJJG9FYkTCaSFudWJZaGQs 4/nSBGOvDCPly+5jzRT303hBWNXczYXmXsNmZO3bS3yOSiSFwlYkFisNHPaXu7hohrNirN aCBcJGlCTJzh7n17dbtuS5az2/FSvqcsB7fzmh/MJCwyhRxg+E1bFkNFPXtoxw== From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Nick Zalutskiy , 52808@debbugs.gnu.org Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <87h77sl4pn.fsf_-_@gnu.org> References: <87mthklcpt.fsf@gnu.org> <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87h77sl4pn.fsf_-_@gnu.org> Date: Tue, 29 Mar 2022 13:24:12 +0300 Message-ID: <878rstf44z.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 52808 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-03-20 22:00, Ludovic Court=C3=A8s wrote: > I wrote: > >> I finally got around to committing it as >> 6da2a5a5655668f42ec5b26f875ddbc498e132b6. Thank you! > > I hit =E2=80=9Cclose=E2=80=9D too quickly: we still need the patch that c= hanges > =E2=80=98home-files-service-type=E2=80=99 and/or symlink-manager.scm to n= ot prepend a > dot, so reopening! :-) > > Ludo=E2=80=99. Those patches introduce a breaking change, but the surface and number of people affected should be small if everyone migrated to xdg-configuration-files. It removes the special handling of dot files in symlink-manager and doesn't add a leading dot automatically. Please, merge them on April 8. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-home-symlink-manager-Remove-appending-of-leading-dot.patch Content-Transfer-Encoding: quoted-printable From=201b556cda9716eba31a8a6dd9d3c263988de26ccf Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Tue, 29 Mar 2022 11:28:30 +0300 Subject: [PATCH 1/2] home: symlink-manager: Remove appending of leading dot. * gnu/home/services.scm (xdg-configuration-files-directory): Add leading do= t. * gnu/home/services.scm (xdg-configuration-files-service-type): Change name. * gnu/home/services/shells.scm (add-shell-profile-file, zsh-get-configuration-files, add-zsh-dot-configuration, add-zsh-xdg-configuration, add-bash-configuration): Add leading dots. * gnu/home/services/symlink-manager.scm (update-symlinks-script): Remove leading dot. =2D-- gnu/home/services.scm | 8 ++++---- gnu/home/services/shells.scm | 20 ++++++++++---------- gnu/home/services/symlink-manager.scm | 2 +- gnu/home/services/xdg.scm | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 2f441eb968..17acfcdb09 100644 =2D-- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -285,10 +285,10 @@ (define home-files-service-type (description "Files that will be put in @file{~~/.guix-home/files}, and further processed during activation."))) =20 =2D(define xdg-configuration-files-directory "config") +(define xdg-configuration-files-directory ".config") =20 (define (xdg-configuration-files files) =2D "Add config/ prefix to each file-path in FILES." + "Add .config/ prefix to each file-path in FILES." (map (match-lambda ((file-path . rest) (cons (string-append xdg-configuration-files-directory "/" file-= path) @@ -296,7 +296,7 @@ (define (xdg-configuration-files files) files)) =20 (define home-xdg-configuration-files-service-type =2D (service-type (name 'home-files) + (service-type (name 'home-xdg-configuration) (extensions (list (service-extension home-files-service-type xdg-configuration-files))) @@ -304,7 +304,7 @@ (define home-xdg-configuration-files-service-type (extend append) (default-value '()) (description "Files that will be put in =2D@file{~~/.guix-home/files/config}, and further processed during activati= on."))) +@file{~~/.guix-home/files/.config}, and further processed during activatio= n."))) =20 (define %initialize-gettext #~(begin diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm index 086fe7d8c4..8389968c96 100644 =2D-- a/gnu/home/services/shells.scm +++ b/gnu/home/services/shells.scm @@ -77,7 +77,7 @@ (define-configuration home-shell-profile-configuration really know what you do.")) =20 (define (add-shell-profile-file config) =2D `(("profile" + `((".profile" ,(mixed-text-file "shell-profile" "\ @@ -211,16 +211,16 @@ (define (zsh-file-by-field config field) (zsh-serialize-field config field))))) =20 (define (zsh-get-configuration-files config) =2D `(("zprofile" ,(zsh-file-by-field config 'zprofile)) ;; Always non-emp= ty + `((".zprofile" ,(zsh-file-by-field config 'zprofile)) ;; Always non-empty ,@(if (and (zsh-field-not-empty? config 'zshenv) (zsh-field-not-empty? config 'environment-variables)) =2D `(("zshenv" ,(zsh-file-by-field config 'zshenv))) '()) + `((".zshenv" ,(zsh-file-by-field config 'zshenv))) '()) ,@(if (zsh-field-not-empty? config 'zshrc) =2D `(("zshrc" ,(zsh-file-by-field config 'zshrc))) '()) + `((".zshrc" ,(zsh-file-by-field config 'zshrc))) '()) ,@(if (zsh-field-not-empty? config 'zlogin) =2D `(("zlogin" ,(zsh-file-by-field config 'zlogin))) '()) + `((".zlogin" ,(zsh-file-by-field config 'zlogin))) '()) ,@(if (zsh-field-not-empty? config 'zlogout) =2D `(("zlogout" ,(zsh-file-by-field config 'zlogout))) '()))) + `((".zlogout" ,(zsh-file-by-field config 'zlogout))) '()))) =20 (define (add-zsh-dot-configuration config) (define zshenv-auxiliary-file @@ -230,14 +230,14 @@ (define zshenv-auxiliary-file "[[ -f $ZDOTDIR/.zshenv ]] && source $ZDOTDIR/.zshenv\n")) =20 (if (home-zsh-configuration-xdg-flavor? config) =2D `(("zshenv" ,zshenv-auxiliary-file)) + `((".zshenv" ,zshenv-auxiliary-file)) (zsh-get-configuration-files config))) =20 (define (add-zsh-xdg-configuration config) (if (home-zsh-configuration-xdg-flavor? config) (map (lambda (lst) =2D (cons (string-append "zsh/." (car lst)) + (cons (string-append "zsh/" (car lst)) (cdr lst))) (zsh-get-configuration-files config)) '())) @@ -430,7 +430,7 @@ (define* (file-if-not-empty field #:optional (extra-con= tent #f)) (field-obj (car (filter-fields field)))) (if (or extra-content (not (null? ((configuration-field-getter field-obj) config))= )) =2D `(,(object->snake-case-string file-name) + `(,(string-append "." (object->snake-case-string file-name)) ,(apply mixed-text-file (object->snake-case-string file-name) (append (or extra-content '()) @@ -439,7 +439,7 @@ (define* (file-if-not-empty field #:optional (extra-con= tent #f)) =20 (filter (compose not null?) =2D `(("bash_profile" + `((".bash_profile" ,(mixed-text-file "bash_profile" "\ diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/syml= ink-manager.scm index 80ca73fed8..23ab1e3955 100644 =2D-- a/gnu/home/services/symlink-manager.scm +++ b/gnu/home/services/symlink-manager.scm @@ -67,7 +67,7 @@ (define (preprocess-file file) (1+ (string-length home-directory))) (substring file (string-length #$xdg-configuration-files-direct= ory))) =2D (string-append "." file))) + file)) =20 (define (target-file file) ;; Return the target of FILE, a config file name sans leading d= ot diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index 361a2a6148..3b504d7d09 100644 =2D-- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -421,7 +421,7 @@ (define (home-xdg-mime-applications-files config) (define (add-xdg-desktop-entry-file entry) (let ((file (first entry)) (config (second entry))) =2D (list (format #f "local/share/applications/~a" file) + (list (format #f ".local/share/applications/~a" file) (apply mixed-text-file (format #f "xdg-desktop-~a-entry" file) config)))) =2D-=20 2.34.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-home-Add-home-xdg-data-files-service-type.patch Content-Transfer-Encoding: quoted-printable From=205e1f45fa9ea1aca16843dc85d7d21fd46f3cfcb8 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Tue, 29 Mar 2022 12:47:39 +0300 Subject: [PATCH 2/2] home: Add home-xdg-data-files-service-type. * gnu/home/services.scm (home-xdg-data-files-service-type): New variable. * gnu/home/services/symlink-manager.scm (update-symlinks-script): Add a pro= per handling for XDG_DATA_HOME value. * gnu/home/services/xdg.scm (home-xdg-mime-applications-service-type): Use home-xdg-data-files service. =2D-- gnu/home/services.scm | 25 +++++++++++++++++++++++++ gnu/home/services/symlink-manager.scm | 25 ++++++++++++++++++------- gnu/home/services/xdg.scm | 5 +++-- 3 files changed, 46 insertions(+), 9 deletions(-) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 17acfcdb09..49bd6e3555 100644 =2D-- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -39,6 +39,7 @@ (define-module (gnu home services) home-environment-variables-service-type home-files-service-type home-xdg-configuration-files-service-type + home-xdg-data-files-service-type home-run-on-first-login-service-type home-activation-service-type home-run-on-change-service-type @@ -46,6 +47,7 @@ (define-module (gnu home services) =20 home-files-directory xdg-configuration-files-directory + xdg-data-files-directory =20 fold-home-service-types home-provenance @@ -306,6 +308,29 @@ (define home-xdg-configuration-files-service-type (description "Files that will be put in @file{~~/.guix-home/files/.config}, and further processed during activatio= n."))) =20 +(define xdg-data-files-directory ".local/share") + +(define (xdg-data-files files) + "Add .local/share prefix to each file-path in FILES." + (map (match-lambda + ((file-path . rest) + (cons (string-append xdg-data-files-directory "/" file-path) + rest))) + files)) + +(define home-xdg-data-files-service-type + (service-type (name 'home-xdg-data) + (extensions + (list (service-extension home-files-service-type + xdg-data-files))) + (compose concatenate) + (extend append) + (default-value '()) + (description "Files that will be put in +@file{~~/.guix-home/files/.local/share}, and further processed during +activation."))) + + (define %initialize-gettext #~(begin (bindtextdomain %gettext-domain diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/syml= ink-manager.scm index 23ab1e3955..6d19258ec7 100644 =2D-- a/gnu/home/services/symlink-manager.scm +++ b/gnu/home/services/symlink-manager.scm @@ -54,6 +54,10 @@ (define xdg-config-home (or (getenv "XDG_CONFIG_HOME") (string-append (getenv "HOME") "/.config"))) =20 + (define xdg-data-home + (or (getenv "XDG_DATA_HOME") + (string-append (getenv "HOME") "/.local/share"))) + (define backup-directory (string-append home-directory "/" (number->string (current-time= )) "-guix-home-legacy-configs-backup")) @@ -61,13 +65,20 @@ (define backup-directory (define (preprocess-file file) "If file is in XDG-CONFIGURATION-FILES-DIRECTORY use subdirectory from XDG_CONFIG_HOME to generate a target path." =2D (if (string-prefix? #$xdg-configuration-files-directory file) =2D (string-append =2D (substring xdg-config-home =2D (1+ (string-length home-directory))) =2D (substring file =2D (string-length #$xdg-configuration-files-dire= ctory))) =2D file)) + (cond + ((string-prefix? #$xdg-configuration-files-directory file) + (string-append + (substring xdg-config-home + (1+ (string-length home-directory))) + (substring file + (string-length #$xdg-configuration-files-director= y)))) + ((string-prefix? #$xdg-data-files-directory file) + (string-append + (substring xdg-data-home + (1+ (string-length home-directory))) + (substring file + (string-length #$xdg-data-files-directory)))) + (else file))) =20 (define (target-file file) ;; Return the target of FILE, a config file name sans leading d= ot diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index 3b504d7d09..71c028c788 100644 =2D-- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -421,7 +421,8 @@ (define (home-xdg-mime-applications-files config) (define (add-xdg-desktop-entry-file entry) (let ((file (first entry)) (config (second entry))) =2D (list (format #f ".local/share/applications/~a" file) + ;; TODO: Use xdg-data-files instead of home-files here + (list (format #f "applications/~a" file) (apply mixed-text-file (format #f "xdg-desktop-~a-entry" file) config)))) @@ -468,7 +469,7 @@ (define home-xdg-mime-applications-service-type (service-type (name 'home-xdg-mime-applications) (extensions (list (service-extension =2D home-files-service-type + home-xdg-data-files-service-type home-xdg-mime-applications-files) (service-extension home-xdg-configuration-files-service-type =2D-=20 2.34.0 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Best regards, Andrew Tropin --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmJC3kwPHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6wemYQAIqGizTv/391UhCfwRYj2ha/yeNHdMgaRfaW DjF2C7VgbwSvVzMJULFaZb+NWOjJwATtSMkBzM/2vY32vXBlJYBDfchWDSWZqPQM 9LwwO5HTU5GekwG1ZMPyiTgh+cNE8gy9M84vkTdJg8zKmb0jTvRDDv+DueQXxaCv 83uwBxPuP2KksrxY+MWexzxDd3CIeSfkm3xTbmIUMS8CGkgsaqO/hQpjlcT2KiXm cIusfRJ2FwP/BsyPIk0aSvgw4eJqTuNxBVJw7YxDRkuvFvtpqkE9kffets4PjZpj rIAL9OisDmmbB8U36Qr1EGkMayh+7UEZjjSGIj7UlfIUblY7fipz+pJtNjUp+w96 VmqJmSoM4vJ3HbQFYCswppw1LlnX9HssfA9MvJikv/J4sOkSHsoVXnCEWuRj/RL2 nLQr7SpRahZUibIPdsOPTwzzQg9dKH57LHmnH8lpKCU13aoi/JaQkeQZCd6hcsFe +6Y+QY0zjN5/ssd6Okq54Qt5g37yX1DIpTibnfRhuctmBwdBrwwt81Wc4cOXyaLL Ep2XYdZVtACMNgBOGUA+yLp5ILZoMnvYyPxbMb4qQ7ZQBgD3Ljp0TYAZBni9prP8 cod5jPyhG7oB/z/yrOthN2wQf93tV8WymL7p4rC1JOgY9hcAMWY4mXm+Uzo/c+dV u+JXwOrI =wmIG -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 30 15:51:11 2022 Received: (at 52808) by debbugs.gnu.org; 30 Mar 2022 19:51:11 +0000 Received: from localhost ([127.0.0.1]:37060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZeLX-00016N-Bq for submit@debbugs.gnu.org; Wed, 30 Mar 2022 15:51:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZeLV-00016B-Ol for 52808@debbugs.gnu.org; Wed, 30 Mar 2022 15:51:10 -0400 Received: from [2001:470:142:3::e] (port=42806 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZeLP-0004a8-Np; Wed, 30 Mar 2022 15:51:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=7cq4e4FVYyklpuml/h1TzPqV0QMXCK8aps/qasxTS/4=; b=VWXhq6nOkSgTsKZJWYOw TDtPhu5bt9JYFPHLb1xfa+bmBRwP0kmg+JK0qPbK9OwdQjNAZVauv7Aw5i8chg8nTwiSBuB+qI/pi fnwC4OJkL+Un+XzE6vhiuOxeg1Z/IPC3mLWl1eURoVNxMZE/EFEbD8/mCZS9kKMeWWj2aQJ0TxfPW lE8MWpYlf26Ot9oAswRy0xHJFQMqGzs3UM4MpHCqKcJvLnRc/K3GU3UGc0vWFIUI7t0mhjrV8KfxV Xwo9tpoRd/CsGrwucAVUQsNWML3pwq8WI6RYxX3sYpS/Ax5Gne2S5YDUqC2QiUzqo7pdbrdcmKqlr MQQen2FGK+Uc4g==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:62572 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZeLP-00067s-BV; Wed, 30 Mar 2022 15:51:03 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: bug#52808: Guix home should not assume that all targets are dot files References: <87mthklcpt.fsf@gnu.org> <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87h77sl4pn.fsf_-_@gnu.org> <878rstf44z.fsf@trop.in> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 Germinal an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 30 Mar 2022 21:51:00 +0200 In-Reply-To: <878rstf44z.fsf@trop.in> (Andrew Tropin's message of "Tue, 29 Mar 2022 13:24:12 +0300") Message-ID: <87mth7te1n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Andrew, Andrew Tropin skribis: > Those patches introduce a breaking change, but the surface and number of > people affected should be small if everyone migrated to > xdg-configuration-files. It removes the special handling of dot files > in symlink-manager and doesn't add a leading dot automatically. Wonderful. At first sight the patches LGTM. > Please, merge them on April 8. Will do, thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 08 14:18:53 2022 Received: (at 52808-done) by debbugs.gnu.org; 8 Apr 2022 18:18:53 +0000 Received: from localhost ([127.0.0.1]:35880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nctC8-0003R9-NA for submit@debbugs.gnu.org; Fri, 08 Apr 2022 14:18:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nctC7-0003Qw-0o for 52808-done@debbugs.gnu.org; Fri, 08 Apr 2022 14:18:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44196) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nctC0-0000ob-LI; Fri, 08 Apr 2022 14:18:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=+JvT1pcgrRdgYgm0E7gIFDbkkr6XTQA5ZTiI33M5Y40=; b=I3kn8l+s/wCRmUpaNhIw KbJUn/4SVo8llt4pnqI68NkC7N24SZ7aIeD5FXO9PZjbSgphibHuHUV1nA/AzDIIDbLaAQCOpmUxc k9ncwqy2tifyJUUj+ybgwXJ1CoD3xqSSfrWIztdmIVzLUZBIWSKK97m1yW8TR9+fT2A3abn2J0AeV vYMFfSVi7OOUroTPIZUrm+PM3jy3pkzl/lIbqB2hO4s37dCPC0qzPQS25VFyW9voqDNYyNVu8C2uH J/GpMdQ10h/HEKlqwFja5cvKZLeQ1huB3YckBp/qUmDUeAnlvApGV8cvHRieSbcwlvtSA3lF+Lt5Z +zg1b+U5rku61g==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56717 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nctC0-0001KN-99; Fri, 08 Apr 2022 14:18:44 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: bug#52808: Guix home should not assume that all targets are dot files References: <87mthklcpt.fsf@gnu.org> <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87h77sl4pn.fsf_-_@gnu.org> <878rstf44z.fsf@trop.in> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 Germinal an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 08 Apr 2022 20:18:41 +0200 In-Reply-To: <878rstf44z.fsf@trop.in> (Andrew Tropin's message of "Tue, 29 Mar 2022 13:24:12 +0300") Message-ID: <87ee27bfr2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52808-done Cc: 52808-done@debbugs.gnu.org, Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Andrew, Andrew Tropin skribis: > Those patches introduce a breaking change, but the surface and number of > people affected should be small if everyone migrated to > xdg-configuration-files. It removes the special handling of dot files > in symlink-manager and doesn't add a leading dot automatically. > > Please, merge them on April 8. > > From 1b556cda9716eba31a8a6dd9d3c263988de26ccf Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Tue, 29 Mar 2022 11:28:30 +0300 > Subject: [PATCH 1/2] home: symlink-manager: Remove appending of leading d= ot. > > * gnu/home/services.scm (xdg-configuration-files-directory): Add leading = dot. > * gnu/home/services.scm (xdg-configuration-files-service-type): Change na= me. > * gnu/home/services/shells.scm (add-shell-profile-file, > zsh-get-configuration-files, add-zsh-dot-configuration, > add-zsh-xdg-configuration, add-bash-configuration): Add leading dots. > * gnu/home/services/symlink-manager.scm (update-symlinks-script): Remove > leading dot. [...] > From 5e1f45fa9ea1aca16843dc85d7d21fd46f3cfcb8 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Tue, 29 Mar 2022 12:47:39 +0300 > Subject: [PATCH 2/2] home: Add home-xdg-data-files-service-type. > > * gnu/home/services.scm (home-xdg-data-files-service-type): New variable. > * gnu/home/services/symlink-manager.scm (update-symlinks-script): Add a p= roper > handling for XDG_DATA_HOME value. > * gnu/home/services/xdg.scm (home-xdg-mime-applications-service-type): Use > home-xdg-data-files service. Pushed as 20645d8467852990413c1ea9cf81cec82d23defd. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 09 10:29:02 2022 Received: (at 52808-done) by debbugs.gnu.org; 9 Apr 2022 14:29:02 +0000 Received: from localhost ([127.0.0.1]:38397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndC5G-0002JI-GT for submit@debbugs.gnu.org; Sat, 09 Apr 2022 10:29:02 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:41281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndC5E-0002Ip-Eu for 52808-done@debbugs.gnu.org; Sat, 09 Apr 2022 10:29:01 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 1DB37240004; Sat, 9 Apr 2022 14:28:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1649514533; h=from:from: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; bh=TmYF+PG+X4+wviHAHPdCnzqaxjajucaqeQOnZ+neg/w=; b=MMLGllnPykr8rtBzLcZK5w+Sl495Hu2vMOoK+aZMKEAaufq+ZV93ZWJjbB0q0uhc4q5aPs +gFL6lBzkYlDBnRKfRGtJ4oAT5Idsl+2NNqP8smkIItjUqelCSrzVkTtBNx9VKkxG5NuY4 5KSUJo2xl1yKwaQ0UVgNm3ItGJjG8i1xO4v/jr3mCALKhA6F3ORNei4PC/Q+b6zbYzYB35 zfc0n1QsTfJjv86/L+gcpZfbJKiwyRtIj0VydhpSLRyuP5tuoaSbN5Cd5tAfjNiRBybiVB HX1bMM5CAyWKDpDWm8py7x6XBdr79VvLPeXd7tET8UwW62UqyZ68q/zIiao7UQ== From: Andrew Tropin To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#52808: Guix home should not assume that all targets are dot files In-Reply-To: <87ee27bfr2.fsf@gnu.org> References: <87mthklcpt.fsf@gnu.org> <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87h77sl4pn.fsf_-_@gnu.org> <878rstf44z.fsf@trop.in> <87ee27bfr2.fsf@gnu.org> Date: Sat, 09 Apr 2022 17:28:49 +0300 Message-ID: <87y20e2uvy.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 52808-done Cc: 52808-done@debbugs.gnu.org, Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-04-08 20:18, Ludovic Court=C3=A8s wrote: > Hi Andrew, > > Andrew Tropin skribis: > >> Those patches introduce a breaking change, but the surface and number of >> people affected should be small if everyone migrated to >> xdg-configuration-files. It removes the special handling of dot files >> in symlink-manager and doesn't add a leading dot automatically. >> >> Please, merge them on April 8. >> >> From 1b556cda9716eba31a8a6dd9d3c263988de26ccf Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Tue, 29 Mar 2022 11:28:30 +0300 >> Subject: [PATCH 1/2] home: symlink-manager: Remove appending of leading = dot. >> >> * gnu/home/services.scm (xdg-configuration-files-directory): Add leading= dot. >> * gnu/home/services.scm (xdg-configuration-files-service-type): Change n= ame. >> * gnu/home/services/shells.scm (add-shell-profile-file, >> zsh-get-configuration-files, add-zsh-dot-configuration, >> add-zsh-xdg-configuration, add-bash-configuration): Add leading dots. >> * gnu/home/services/symlink-manager.scm (update-symlinks-script): Remove >> leading dot. > > [...] > >> From 5e1f45fa9ea1aca16843dc85d7d21fd46f3cfcb8 Mon Sep 17 00:00:00 2001 >> From: Andrew Tropin >> Date: Tue, 29 Mar 2022 12:47:39 +0300 >> Subject: [PATCH 2/2] home: Add home-xdg-data-files-service-type. >> >> * gnu/home/services.scm (home-xdg-data-files-service-type): New variable. >> * gnu/home/services/symlink-manager.scm (update-symlinks-script): Add a = proper >> handling for XDG_DATA_HOME value. >> * gnu/home/services/xdg.scm (home-xdg-mime-applications-service-type): U= se >> home-xdg-data-files service. > > Pushed as 20645d8467852990413c1ea9cf81cec82d23defd. > > Thanks! > > Ludo=E2=80=99. Hi Ludo, Thank you very much! Can you merge other patches from this thread too, please? =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJDBAEBCgAtFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmJRmCEPHGFuZHJld0B0 cm9wLmluAAoJECII0glYwd6wwzUP/j6cJLKdLHzHwdUNXJ4OY9R7H7RnEn+N23kC yuTW4oibtX1k9zZ4hnZuE8H8pnfD/p8pilb5QgpeqSBKf26YzpAblrPZ78i0U4GP 39mTjDZa/Fh/8ja/YNW4FaLdrQKSOpVNol1ckfTAIR/4Lqq3E25BTpgeoNBinfAG 5j6+O/lErrOqA9vNdktiIcl3UqTHdp46Exmb9rib7zAUZh32K2+qYeJiK8u3K/r1 xM7vAkelLFFs3Wh1ZVZi5vpypw3uZvtRt3kHVChskSQbMYha2WlIWxWgYqxIkNRM eJ37Lxp9nDjb2HkA3yKWEVnpNe7rguQBpTLFmUD/0q2EKiB2HdO9kZbcjuoULlSg 4kBqQcvm4x2Eboa/oyhIxqxbspitW0/3PwAiWSjWkUWGbz9B9l1Cr3sbVC0xJTHq p+0a5pTydSRfnKZuXKLr38DwZNzNc2tQkS7pvamBltNuOHnZV0D88UN5qjm+u+NO KZTp2wj1lW4WWT4o+NbJSCUAjuWRuaZwafl0HD+LV3pbFfsStUOF2WnOroNpQ978 C911weQz2WxMv5x0/p+ll00NoLeoxAnAW+bnsW07/9JB+9yO5d1Y9bxIywtRWzM0 kYwQsNb2fQYl9wdYZRJAW3TnHqkZ+rLTwCLstNqCWO1I/tskYpf3bmmlsTz6I+P/ sBKUPfGh =9+R9 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 10 16:52:48 2022 Received: (at 52808) by debbugs.gnu.org; 10 Apr 2022 20:52:48 +0000 Received: from localhost ([127.0.0.1]:41720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndeYC-0002RK-3n for submit@debbugs.gnu.org; Sun, 10 Apr 2022 16:52:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndeY9-0002R7-Vx for 52808@debbugs.gnu.org; Sun, 10 Apr 2022 16:52:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49344) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndeY2-0005uI-QE; Sun, 10 Apr 2022 16:52:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=PwfQthm6wrC9yY0APbMMm9JHlhTMoe6x7nBn2ocQeM8=; b=BDNZzdRkV6gIpXA7DKvh 1Fjpat/CEu89f0jf0NByy0BOjUvxHmJ/6NWp5SpjhdS+asu91ti44vAH8qZgg9Mnd2hQpA1Hrmy59 wmp+3LJrwS6z7k4taDaFVn0LuH5ZA0XGj3TElSI/i2mH1XW3Du/SH7ht8rmmVIpJn/wAXze8DIY6I gLHUdVePhMucniR3cAubu3OtIjwC8joZoytIWFkiVGjM2VqvXW/hHewGdWcktvB/Z4cwIvaUwWXsv leXPddBDxIFZ5h+gIqekhxDGWhV7B0Gha8L/hQ9ED56iifu74/195bg5GKlLLAYADd/f38f4vBqpA Rkoc36wLfu+Ibw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:59604 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndeY2-0008LI-Df; Sun, 10 Apr 2022 16:52:38 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Andrew Tropin Subject: Re: bug#52808: Guix home should not assume that all targets are dot files References: <87mthklcpt.fsf@gnu.org> <6050c325-9ae9-406a-97fe-91bdf9bcd12a@www.fastmail.com> <87h77sl4pn.fsf_-_@gnu.org> <87fsn1f5mo.fsf@trop.in> Date: Sun, 10 Apr 2022 22:52:36 +0200 In-Reply-To: <87fsn1f5mo.fsf@trop.in> (Andrew Tropin's message of "Tue, 29 Mar 2022 12:51:59 +0300") Message-ID: <87bkx84q5n.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 52808 Cc: 52808@debbugs.gnu.org, Nick Zalutskiy X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Andrew Tropin skribis: > From 629466d23308e135c4a46951e5ea568677c5ec00 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Tue, 29 Mar 2022 11:15:56 +0300 > Subject: [PATCH 1/2] home: shells: Rename zsh related functions. > > * gnu/home/services/shells.scm (home-zsh-service-type): Make zsh related > private functions more consistently named. [...] > From a71346b059691a982a7dc0c7f4fd708b49566500 Mon Sep 17 00:00:00 2001 > From: Andrew Tropin > Date: Tue, 29 Mar 2022 11:56:48 +0300 > Subject: [PATCH 2/2] home: symlink-manager: Handle non-existing directory > during cleanup. > > * gnu/home/services/symlink-manager.scm (update-symlinks-script): Handle > non-existing directory during cleanup. Applied as well. I hope I didn=E2=80=99t miss anything else. Otherwise let=E2=80=99s open a= new issue! Thanks, Ludo=E2=80=99. From unknown Wed Jun 18 23:11:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 09 May 2022 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator