From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MEoaKoL+82Gg4QAAgWs5BA (envelope-from ) for ; Fri, 28 Jan 2022 15:32:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id ADWfJoL+82GP4AAAauVa8A (envelope-from ) for ; Fri, 28 Jan 2022 15:32:34 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D56083F37D for ; Fri, 28 Jan 2022 15:32:33 +0100 (CET) Received: from localhost ([::1]:60198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDSIh-000815-EQ for larch@yhetil.org; Fri, 28 Jan 2022 09:32:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDRO6-0007jI-Ql for bug-guix@gnu.org; Fri, 28 Jan 2022 08:34:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36570) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDRO6-0003Fw-G2 for bug-guix@gnu.org; Fri, 28 Jan 2022 08:34:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDRO6-0002rm-Bm for bug-guix@gnu.org; Fri, 28 Jan 2022 08:34:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52808: Guix home should not assume that all targets are dot files Resent-From: "Nick Zalutskiy" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Jan 2022 13:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52808 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "Andrew Tropin" , 52808@debbugs.gnu.org Received: via spool by 52808-submit@debbugs.gnu.org id=B52808.164337682110984 (code B ref 52808); Fri, 28 Jan 2022 13:34:02 +0000 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" Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643380354; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=3HtbrTLjOUkQgWjFjUP16tgyrVHCQY9KVXEAWjU85zQ=; b=omnDTrxcn/F71ggmqA9nv7Sj3jh+byevRjFtZGLi6h2ia8eI2Ma5qIrtE/Xev6EUPXUYZH dScRK0ndAcaKS1uJBc8VS5LipFpkqIseQlK1bNrtZ6CB/8G2xQmS7vAzsoRTQah8PHg/HM nCP7QM5Z2GmfkUZr4XNyR5h/ppyi6acNCB1Dx4JVwfLQkDWfnMSulSycGkciumm582Gb7e q4jfTtN3+79A7wfKBHSCovyVK7dvKh1yNS8gyNaVxAT4MsEt40qhSaM7angabKT9pziuDz EpVwf7eL36rTuy6j3isYodyK80QA3goL8A3BPlLzJ4VyHX8kCfIG471ZalBk4w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643380354; a=rsa-sha256; cv=none; b=Xk+GMNSyt1WhdGdTqv5fXBIfdsnkqopw0Etn9zCI+pompV5Oskm6LpyhRZVFEAQvMf7/GV NecyVAWmAkcjSlMBcO4Y4/zBim9I7HSKwRE4ccZOvEVwH6tQye7wcLgfi0CqpGhLxbiOw6 XR+/ddZ9jZNGTaN8EB9wMwKPaHcQQ8fMS7iltXzZ0gyCBXCEWVbbB3KOv3pdZzc97sSzbk scLcSxsSqi2m5BeGKffSpKyjAnyFjxifycy4r2CKjA5ay1Bk2hnQ/Yc49BDI2tqatXgWFT otxkeguD3h6xCXvd218PUv8qM2DTKUJqLb0Xg8YJgNactHLmK6zU28WERSGy9Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=const.fun header.s=fm2 header.b=Uet3XM8K; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=BPCIsZwi; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.52 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=const.fun header.s=fm2 header.b=Uet3XM8K; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=BPCIsZwi; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D56083F37D X-Spam-Score: -2.52 X-Migadu-Scanner: scn0.migadu.com X-TUID: cF2UrCzCzqKB 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