From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6BReHZo8gmEFMwEAgWs5BA (envelope-from ) for ; Wed, 03 Nov 2021 08:39:06 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aEYQGZo8gmHVKAAAB5/wlQ (envelope-from ) for ; Wed, 03 Nov 2021 07:39:06 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D1846E8BB for ; Wed, 3 Nov 2021 08:39:05 +0100 (CET) Received: from localhost ([::1]:43756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miArR-0003fk-1Y for larch@yhetil.org; Wed, 03 Nov 2021 03:39:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miAdj-0000XE-Mv for help-guix@gnu.org; Wed, 03 Nov 2021 03:24:55 -0400 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]:33778) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1miAdf-0006dg-B3 for help-guix@gnu.org; Wed, 03 Nov 2021 03:24:53 -0400 Received: by mail-lj1-x22a.google.com with SMTP id 17so2322647ljq.0 for ; Wed, 03 Nov 2021 00:24:49 -0700 (PDT) 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=MrCoau5J4U7FbdBGcGFAtbaLVhF3zjiCdgeYiB/B6zA=; b=8H5c/jFLecyczmAWpZqpmZwfcO/eUTURRftT8+c3wuAu2tVup5LtDg3QB6TB53Gm78 eBfnFlPmBzZ8L7Xf6P1QXzLWYrLc+D4BUEUW6p6UYyySzqbZncoMgs+/DfghU4zHtlce +u95+8DxOtix22tX0fVEq0XzcSJ8UX4OPqufpy1k5m4yiH+lGFLj5PqSZetWotQK8rHA eSx44m6BDGxzDwRiMxoia5NmnivE1gl6SRtZq2BSvYIngQo0axc5UnDi1+LQ1CR9BRzj HFMCIKl3NgJKaFkrDG9lb8ALUCnpxeIEFCkbSYU5WFf/Wn0839EjS6VbREYSyK/1YKvs Yj3g== 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=MrCoau5J4U7FbdBGcGFAtbaLVhF3zjiCdgeYiB/B6zA=; b=MAW0Q83fr0yJJA6QO0PbSyVkz/fQblCKDrfP8FylvSyLhEv9Nnig6N/4Nabq2Uk0MS TBgzYnBhx95f7hJi48MdAP0j1YE6KjBCRU8ZLabfP6FtknW9wW3RTFQFW5E9ZQtGI9Hy /xlv/3vaUys1czu7X+XlwYpNGBszG54nEYB85oTU09zf9lUdA8L8KV4VeMTEm2GaA9Rx DNw48N2wJIthRJO46Rz/1RtO6i5Z+ED4Hf+M9LAoVoIEvkzb/qzAHRAcv6yps4J2Ex8B 61mWk86Rfm1uU7HpPMKnCrhBr8AFy2zESd3IFMzjgmUsjLOD1pqfpTmlwATptkl3E0vq Ah0w== X-Gm-Message-State: AOAM530Cb0BTYKrWHCoebxxGUzdEQUtXjj/M5HpAiHVeluOes3ObDozQ eKHFYwb4OKfdEv0Yp/qMVh5yIw== X-Google-Smtp-Source: ABdhPJwIAXsQjGoOEuigvxiag7inwtvGACXtz10x6qkzkSeyITBBANTLaUEGUt5i/Na16mmzZWzQnA== X-Received: by 2002:a05:651c:105a:: with SMTP id x26mr3833669ljm.129.1635924288285; Wed, 03 Nov 2021 00:24:48 -0700 (PDT) Received: from localhost (109-252-140-132.dynamic.spd-mgts.ru. [109.252.140.132]) by smtp.gmail.com with ESMTPSA id x7sm104432lfu.116.2021.11.03.00.24.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Nov 2021 00:24:47 -0700 (PDT) From: Andrew Tropin To: phodina , help-guix Subject: Re: home-files-service-type file permissions In-Reply-To: References: Date: Wed, 03 Nov 2021 10:24:43 +0300 Message-ID: <874k8t7lc4.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: none client-ip=2a00:1450:4864:20::22a; envelope-from=andrew@trop.in; helo=mail-lj1-x22a.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 03 Nov 2021 03:38:53 -0400 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635925146; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=MrCoau5J4U7FbdBGcGFAtbaLVhF3zjiCdgeYiB/B6zA=; b=U+bvY7qg7V/cq96Efyqrox1vgp6Oyg0Tdw179ajOo5IoRQMyTL/Vb8WWxJWYXFLkEFZX28 ZdZZlYHLXP5a1Bu6XANk9GLz56aJYNjxikonwbJ2+I1WYPBX71mdMnOXkmnmffR03Abr/G l3+yZMkQVDAGGGoS8mdaDnTAOfyAs0avVxt9k4yxq6d/K+e02itGwKnCNnL0P5nMjaXvfw HvTj8Wk9HZAnuIaBRLB5PB+vjS4+D2qA0cnIjFeXyiUFxN1nthA7ue6tLJdgL+65HwcP1x eJzMgB/fn1ry2w2rthdzpisHxosIxCm4OenZ0HnJou0+PibEVw4HEzEAPXxrDw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635925146; a=rsa-sha256; cv=none; b=W+YB0lQYAllxht63bSk6Kr/lBMeVRqyBbxvcw9j7/SKQyvvJMGhVwnANzctLi9ibBP5mtj cSoZs8+flQ+fwLaa+gjyzEDjCeGatoggB/rsbnfK/q4PiU4oTYx5jno6xkh7g0t3TdYBzl r/bwHza/E2pZywLlwzyUoSEYq3XOXnO1riK1g7fTiuNA9X5GVzpWhKvRzxB8YiO+oK2QCt tW+GWsOkiCfUGmrT9FwxXVixHryTBb2f20zh43ejIznxZ3hyw5M5Qxddoieu3wcRL5+1L4 zKpod6gacKGTWI+n5MEGIBdgWWpZ04ILnDP/Nji7gpZg5wSccWpNbeNbvBHGJA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=trop-in.20210112.gappssmtp.com header.s=20210112 header.b="8H5c/jFL"; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.22 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=trop-in.20210112.gappssmtp.com header.s=20210112 header.b="8H5c/jFL"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: D1846E8BB X-Spam-Score: -2.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: pGyJg7UeWOGs --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2021-11-02 11:31, phodina@protonmail.com wrote: > Hi Andrew, > > Thanks for the development of Guix home. I've recently switch to it from = my dotfiles. > > However, there is one thing that I do not know how to set. > > When using the service home-files-service-type I encountered a situation = where I'm copying a script: > > (simple-service 'dotfiles > home-files-service-type > (list > ... > `("config/sway/wallpaper-change.sh" ,(local-file "config/sway/wallpaper-c= hange.sh")))) > > However, after guix home reconfigure the file has only read flags set not= execute. Even though the original file has execute flags. > > Is the home-files-service-type the correct service to use? > > Petr If there is no specific home service for your use case, which generates all necessary configs and executables for you the answer is probably yes, using home-files-service-type directly is a way to go. > Or do I have to patch it in order to keep the permissions? AFAIK, local-file, mixed-text-file create non-executable files in the store by design. If you want to make an executable file you have at least a few options: 0. You can use recursive? flag to keep permissions. (local-file "blabla" #:recursive? #t) The quote from documentation: > if file designates a flat file and recursive? is true, its contents > are added, and its permission bits are kept. http://guix.gnu.org/en/manual/devel/en/guix.html#index-local_002dfile 1. Use program-file http://guix.gnu.org/en/manual/devel/en/guix.html#index-program_002dfile For example I do it for generating screenshot scripts: https://git.sr.ht/~abcdw/rde/tree/master/item/rde/features/wm.scm#L188 2. Use computed-file, which will call chmod with apropriate arguments inside gexp. Take a look at "empty-tree" example in the manual, you can create a file and set apropriate permissions in the same way. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmGCOTsACgkQIgjSCVjB 3rCj6g//WZEAUDMN3JuEUUpEw/b29TkyUYb3gxw0+FmL6itAsu7kOGLMU2PTNRkM 9toVEDBb0iGBQNTRo3sYKsptJotw8pOTyCZdCF4ZzP8iXKmlHi0eKkFj1DaOYG2k ltGsiMWul8znjKVsjmFADqD9EaGnPKVfjWRAzLLKLYZ9nFvvkw/uu8aLVU1F88yJ 8c+WfVG15mth1+Ah6uGHZBQF5KBBA1la0J+Y7jYNNuIkDB1UqQyE5pUN1jffDI68 uiXQbeeqnfik0UtETy4ja+C7j0fRZ3BVhLdIQj1rqibrh/rXL9+a4r8NnC5rBxr5 DsqdixUj4G2VboCO+dC16n25DFeGAwx9WyC1JyXmzhVfv+F9qvJ3rRNVMROv6kfl PZDtXw5DxgzbS8k+DbnjDbVNNSLqZf6xLib4i5+NCryJEktvdbGnZSrPotghs3ve rZnJEeWQxq2K9AE9SwoxxXvTOBWr0wsp2Pa69bUFyejmluW3LaJitMSHWdopmnaS J6cMpi2Fdsp/N4ExCHEGQgdwr2EiqsSL+o9wB3sCTCmCaciKmThiy4E78Yd+yJPU aFCiq91tN4hrooGX9ErzukuEl2Duao2z0dwZfm/lOHtJrh/3zZwewhZ4VdR4zc5l QtmCMNeb0YFLDyTaIvtMW/IPwcbktCojx5IhY/DA3it5guAdxNo= =9qH2 -----END PGP SIGNATURE----- --=-=-=--