From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qFXcL34L9GEjYwEAgWs5BA (envelope-from ) for ; Fri, 28 Jan 2022 16:27:58 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id ULeJKH4L9GEQCAEAG6o9tA (envelope-from ) for ; Fri, 28 Jan 2022 16:27:58 +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 408B63A61D for ; Fri, 28 Jan 2022 16:27:58 +0100 (CET) Received: from localhost ([::1]:55052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDTAL-0006sO-FA for larch@yhetil.org; Fri, 28 Jan 2022 10:27:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDT5a-0001Gu-TZ for bug-guix@gnu.org; Fri, 28 Jan 2022 10:23:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39071) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nDT5a-0005Cd-Hg for bug-guix@gnu.org; Fri, 28 Jan 2022 10:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nDT5a-00053t-Fd for bug-guix@gnu.org; Fri, 28 Jan 2022 10:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52808: Guix home should not assume that all targets are dot files Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 28 Jan 2022 15:23: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: Nick Zalutskiy , 52808@debbugs.gnu.org Received: via spool by 52808-submit@debbugs.gnu.org id=B52808.164338333719363 (code B ref 52808); Fri, 28 Jan 2022 15:23:02 +0000 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 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-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=1643383678; 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=39XGu+bE5oXcZWuugE2YC43jUkxGniCe00t20OMpmmo=; b=h6+Cplx7LtwhhkthXZoLj80B1wzlWtcXEw8BIlOJuJ+L5L5PjOTjCo37fSBEdsAswHHlzR n3X8BZS4mQ9rgb8NXlYgqVUtc6+GOuT0L7xDfHjvWrISAYbFMbvA3/BA94Zp3m2jmoMbiS oAaCCxqVHLBylrrLX5itwbZwztXE6m3AIF0oWwN5F7n5SNV6dBP8Ap0LOywlamY9v1gwV9 hQn+K54zRE9AQUGFmfBW8cRVVU7hegh5lb8sYGHe5bKbg95Z6muM9YcOuxWuXiI2flFwAL 4C2Xu9SXUsgfvEQzBziGI5AXLLEQmMgTDCKk0hD7J5baCQJUrPxpEKm7oOnHBQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643383678; a=rsa-sha256; cv=none; b=igEeMMH3W5jBYcW7dq8QDEbY3r+4bPLJmDiaNWDYks1gNLVo6gkSXyY0lWy1BIP4/4TXno YDIW/8usAnYnkiMOosSF6mz1R0vCQ8sFEG1N/dFuzJlzy5Xo6G5JersKwueQbl2ag6aye7 LjwrPiVdcSKDbq7B0sYBCi4trVFmRowKiczLla3XLv+iVEx0yVuD8CpJp3YiGF0hn2fWKy 2tsjR2PQz3hmO73rZNyQTud72WtHQBMgckCft1YgPIcLWX9zkwbwM28PrIRhlYxG8qdNM2 1FeAXKRIDiVbqkSfBmb8lmhf1NlDyPNBq5dNpQxNe0QHVD2FkL++OlHaCGjrug== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20210112.gappssmtp.com header.s=20210112 header.b=u65j7D4y; 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: -4.53 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop-in.20210112.gappssmtp.com header.s=20210112 header.b=u65j7D4y; 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: 408B63A61D X-Spam-Score: -4.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: Ok0K7oXYebwE --=-=-= 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----- --=-=-=--