From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 0GEqNW7PDGSXfwEASxT56A (envelope-from ) for ; Sat, 11 Mar 2023 19:58:54 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aIFtNW7PDGTCqwAAauVa8A (envelope-from ) for ; Sat, 11 Mar 2023 19:58:54 +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 B6AAD29CE2 for ; Sat, 11 Mar 2023 19:58:53 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pb4Q7-0001OF-3R; Sat, 11 Mar 2023 13:58:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pb4Q5-0001O0-FA for help-guix@gnu.org; Sat, 11 Mar 2023 13:58:17 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pb4Q2-0007id-US for help-guix@gnu.org; Sat, 11 Mar 2023 13:58:16 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B0DF724015B for ; Sat, 11 Mar 2023 19:58:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1678561091; bh=0DD+rTY1OfZPl8xvOwXuhBBhJ+2m3cW5aVRwMJNVnvE=; h=Date:From:To:Subject:From; b=l7brndds2C4mUuk8g72dEtRT/xiyGSq8+LL1UccxTFVYzaTlNlGHMA9RMW/b8J7CY 9UUQohbUN+L7ZBM89VQJOyPme0LvBPB4e6bRSlew7alZ+L31i1+gT7+o2ONCdTKi4q gZ9PcbBUAvbYUEO38dhvMoeEA7siYg4NH85b5fBuy0qPZarZB5rooBG/TgwpPNaN3P RBAMDWnlVPCBuBESxnmhNsUAbmxbqwsT2oXajHMzvwRI0hFjzljn2Q9JM8HfXZp0WG JGmrBUR8X01Qpg96i97B2zgWGZdqvzSzqS8HobUDWbbVt454oSYOi11t+SlEhZXOq1 hMtXxDN4UP9wA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PYscy40Ddz6trg; Sat, 11 Mar 2023 19:58:09 +0100 (CET) Date: Sat, 11 Mar 2023 18:58:04 +0000 From: Kyle To: help-guix@gnu.org, Sergiu Ivanov , Gottfried Subject: Re: open config.scm with sudo and gedit or emacs In-Reply-To: <87a60jdx0m.fsf@colimite.fr> References: <87a60jdx0m.fsf@colimite.fr> Message-ID: <0113AC57-CB4E-4592-828F-9C2108139C61@posteo.net> MIME-Version: 1.0 Received-SPF: pass client-ip=185.67.36.66; envelope-from=kyle@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=posteo.net header.s=2017 header.b=l7brndds; 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"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678561133; a=rsa-sha256; cv=none; b=lmWvcGw8K5srEflZ7kDvtoqaF0w+fdC0LnGtaM/fh4MSDTP2Qn54Oefe29NpJRc9Arb/AI NHQwQYOYPsBjBqtLNlvyiBD9/oubf59ezoAOXBKYiKKbQgfeqQ2Xk15KQVC4hjk2W07JsQ CSrm94CTaxhiwgJx/Ihr5mxv0c/Ir0uI0BWktwieAmr8XASuTFNspJ3iObMMqCcSrtDLEj uGhGdEPIwazax/HJ4U7cw9R5ABNTZ8/sbKcAFr25qexx4Km6Vc6I7degeNW6nq3JJ2TQbn oqOMaOwNrW+gZtV+ds6QHusp/3iFlzWKymMLiUIkxP7wlrzgu+qxhsQLUwONCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678561133; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=yNtA2AVIyTUjCrpVEMUDzoNm7mN79gyKe4ibQNv5TrE=; b=DRizKr6K5tHmKtBZyuRdfX/RIWsEThpwLX6vnJptwNgiNvNqoPq1XliMcbrDCW24MsPIxh fEdjH7QZA7eKFxQ72OGMzM9kF8/BAUqAuuYSJqCcmseETSprQ5v6OJIW4R4Vl0jR4Hw/7C +FJQiZY8zNW06V3puO7ogF7hSzdabdVoQz3E0VVWGUGO3dkKTfkEH+RMGJmEK1gu7XyA71 MkeOpvCL8Jsjtglmt4rAtU2dFFW6W8Xj5WBIUbYtDWA+y7tFkLveqaQUzt89OZI1sWYz4j Qs6kCY83wPdoOKdFX5m5Udd+ETcgp0uFXkPlvomlWpwM0PwsBbUSMEQESGKn8g== X-Migadu-Spam-Score: -2.10 X-Spam-Score: -2.10 X-Migadu-Queue-Id: B6AAD29CE2 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=posteo.net header.s=2017 header.b=l7brndds; 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"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) X-TUID: WPPqW6G4miJF Hi Gottfried,=20 I had some success editing things owned by the root user in emacs using Tr= amp=2E The syntax a bit confusing=2E You search for the file in the usual way in = Emacs, but you delete all the text it fills in for you and instead replace = it with: ``` /sudo:$USER@localhost:/etc/config=2Escm ``` You can replace $USER with your username=2E On March 11, 2023 12:05:01 PM EST, Sergiu Ivanov w= rote: >Hi Gottfried, > >Gottfried [2023-03-11T11:33:33+0100]: >> >> because of my limited knowledge >> when opening my config=2Escm file with sudo >> I can do it only with nano > >The strategy I personally prefer is to edit a file in my home directory >and then sudo cp to /etc/config=2Escm=2E > >More concretely, I store my system configuration in >~/=2Econfig/guix/system-config=2Escm=2E I edit it with Emacs, as I would= edit >any other normal file=2E When I am done editing, I do what essentially i= s > >sudo cp ~/=2Econfig/guix/system-config=2Escm /etc/config=2Escm > >I use Emacs's Dired mode + Tramp to actually do the copy, but that's >inessential to the strategy=2E > >One advantage of this approach is that you can version your local file >using Git or some other version control system (VCS)=2E Even without VCS= , >editing a local copy of your system configuration may prevent some >silly mistakes=2E > >- >Sergiu >