From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gLuwNpADsGHJLgAAgWs5BA (envelope-from ) for ; Wed, 08 Dec 2021 02:00:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QAqNMpADsGEJQQAA1q6Kng (envelope-from ) for ; Wed, 08 Dec 2021 01:00:00 +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 41FFF28913 for ; Wed, 8 Dec 2021 02:00:00 +0100 (CET) Received: from localhost ([::1]:53482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mulJO-0005J0-Ka for larch@yhetil.org; Tue, 07 Dec 2021 19:59:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mulJC-0005Ip-Rh for help-guix@gnu.org; Tue, 07 Dec 2021 19:59:46 -0500 Received: from [2607:f8b0:4864:20::b2c] (port=41978 helo=mail-yb1-xb2c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mulJA-0003t1-ON for help-guix@gnu.org; Tue, 07 Dec 2021 19:59:46 -0500 Received: by mail-yb1-xb2c.google.com with SMTP id v138so2098384ybb.8 for ; Tue, 07 Dec 2021 16:59:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NYufSgyMaPw/SDSD2ShBKEhTv3gKe9B4g4FuFmsCs+Y=; b=KjdV2NFc+8gkKs8VbfG4Gq0sZ85x4VzKAz/amPBByWfT3e5rDz/mW8oqrc6UGEYM/a TjqgLayNL6Jnm/rXy99HI4Ddnd6ZjEmMitybloXCP/+TCChEi0N36xnqm8Ls1gOOEW70 FVjell5Q5cIOtwvqJPkHqqqF1ci4fFoCLYzgEOu6oS0+XDM7t730fXIeqFWNtzOCprSk N1tE8F/45EwH7iwf7G7d5f63hxyFUKB1voOxr5u0WrRokbFf+Pnur/cO48fRVk0JmrnX JsDfwHwVWkRLCRTMcW7unMVWkEYpRb1fvTYta6aOIZ870DkZsp9YClycqM/rz4Wj2FBJ AT1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NYufSgyMaPw/SDSD2ShBKEhTv3gKe9B4g4FuFmsCs+Y=; b=GW0Z9I1gNFoEgv/J8f0M+HAyyI9OE0cI7LqNUi7ZKzc0i0P+NWODKu2YRq9ZyzUg5n h3sdzw0RORpcgmSVf6uMDjsTlcE6i6V3gfwbM3C0KOir6xTNXi6oCoP9WmREz83A22DK 9PyoTw3o0Kl/tjlDDxeiOM/GcHHlYw1gxrEHrT0z6y7HLlQcoAgu06xKUEm3wxP48sMz 5O74euio3zxFFs30+N1ctSRZEP3u61s+g5cM/Z4yBw6qTHHIri+1odJ44B+kcOHZ5nBg MhpmPUkdVkE2dMjTxGILzUHghFRfwASgokeiC/+dde81yp1RW6d3Ds+vsrfGLeUZOpK9 K+Lw== X-Gm-Message-State: AOAM533mI3yrfw40sIu7FYvY0qedENbCv3TYfPsxgImaX4h67DgRCEAW 53/LSe0f3QuknNOQFSvJxDDmv9e5EETV8leg0AWdttj09eU= X-Google-Smtp-Source: ABdhPJwq2JYLWv5jyIL2i8zGxj82LAZRbq9xZlXHDJWdSYsgf+P7qMCqC2iswh6p5Tu+qwgDbXTJ5UJPQM4iQNxhg4E= X-Received: by 2002:a25:da10:: with SMTP id n16mr54057461ybf.24.1638925183261; Tue, 07 Dec 2021 16:59:43 -0800 (PST) MIME-Version: 1.0 References: <874k7mihb6.fsf@disroot.org> In-Reply-To: <874k7mihb6.fsf@disroot.org> From: Nathan Dehnel Date: Tue, 7 Dec 2021 18:59:31 -0600 Message-ID: Subject: Re: How to put a file in /gnu/store and set its permissions To: Gary Johnson Content-Type: text/plain; charset="UTF-8" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::b2c (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::b2c; envelope-from=ncdehnel@gmail.com; helo=mail-yb1-xb2c.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-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=1638925200; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=NYufSgyMaPw/SDSD2ShBKEhTv3gKe9B4g4FuFmsCs+Y=; b=Z83RVdY6yZPSD/6gl0ilFZZVh11Cxmtmz6SYlqsB3TMcTDeZW8onhYI6a6+et7SDX5L3z9 HtgDQ+IotwyNP7CRpGeIM8SeIGTWpHtFffwjdBRwKPKyja2VO8+adNWxKql2ZkLsaWwRtZ 2fJmOocNacTPXD8ki0CWfTfri1KN6hZJoLmsaJ7tvONLFCjuNnkGWn/hA2uAgNJJEHJTBm zaXY+o2R2TqzDQuUO77SwkVs5/QmSKT9rJPy0c1lfQOI/BCl747jQhkxWaeLNtiGO0bR4u SQb7YIu6bU0qhWrBw41b9zkXAXC8l2PLjvmwtwJaJXqoXRexJdqtFUYq9aPU+A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638925200; a=rsa-sha256; cv=none; b=nl6EW8AaasIqaQbjC4NTToL+jZwvo74EPLyxl+BMl0HQstWp1TFlOqAjD9qohS47HGgZhh kbILE2wuE0gHCDy9pExIowJ+v803dXiO6niKsCWvWU1XcCDC2iLCntJyDZyCprueRvcA/J rSnAglfPxO3fa14CvrArIE4kHlyh3n/NFTiUgbxqr73LQF1wttN8glrOtxyPSDu7tjFro4 WdJSUsUU8vLRdE2NWRR92LY63b5ZylfmoVMf96MjDVSnyspRW+6TDBNKeYUIhXpWXgdWEl JKJ1TsA1dDXeaAgQYkQz3bca4JhKtFCIzQNmjYwq2Zolha8ZRulY+HCzfT9OWg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=KjdV2NFc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.15 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=KjdV2NFc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 41FFF28913 X-Spam-Score: -2.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: CoEyLWWd98E+ Thanks. Though that code causes "guix system: error: symlink: File exists: "/etc/ssh"" when I use it, and by the looks of it, would still be putting the key in the store, which is insecure. On Sun, Dec 5, 2021 at 8:44 PM Gary Johnson wrote: > > Nathan Dehnel writes: > > > Thanks. I guess then I need to know how to put a file in /etc/ssh > > without putting it in the store. > > To programmatically add a file to /etc, you can extend the > etc-service-type in your operating-system's services field like so: > > ``` > (use-modules > ((gnu services) #:select (simple-service etc-service-type)) > ((gnu services desktop) #:select (%desktop-services)) > ((gnu system) #:select (operating-system)) > ((guix gexp) #:select (local-file))) > > (define guixrig_host_rsa_key > (local-file "ssh/guixrig_host_rsa_key" #:recursive? #t)) > > (operating-system > ... > (services (cons* (simple-service 'my-secret-service etc-service-type > `(("ssh/guixrig_host_rsa_key" ,guixrig_host_rsa_key))) > %desktop-services))) > ``` > > Have fun and happy hacking! > ~Gary > > -- > GPG Key ID: 7BC158ED > Use `gpg --search-keys lambdatronic' to find me > Protect yourself from surveillance: https://emailselfdefense.fsf.org > ======================================================================= > () ascii ribbon campaign - against html e-mail > /\ www.asciiribbon.org - against proprietary attachments > > Why is HTML email a security nightmare? See https://useplaintext.email/ > > Please avoid sending me MS-Office attachments. > See http://www.gnu.org/philosophy/no-word-attachments.html