all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sergiu Ivanov <sivanov@colimite.fr>
To: Gottfried <gottfried@posteo.de>
Cc: help-guix@gnu.org
Subject: Re: open config.scm with sudo and gedit or emacs
Date: Sat, 11 Mar 2023 18:05:01 +0100	[thread overview]
Message-ID: <87a60jdx0m.fsf@colimite.fr> (raw)
In-Reply-To: <ac17882d-5ef3-9914-84a8-1a63071fbe8f@posteo.de>

Hi Gottfried,

Gottfried <gottfried@posteo.de> [2023-03-11T11:33:33+0100]:
>
> because of my limited knowledge
> when opening my config.scm 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.scm.

More concretely, I store my system configuration in
~/.config/guix/system-config.scm.  I edit it with Emacs, as I would edit
any other normal file.  When I am done editing, I do what essentially is

sudo cp ~/.config/guix/system-config.scm /etc/config.scm

I use Emacs's Dired mode + Tramp to actually do the copy, but that's
inessential to the strategy.

One advantage of this approach is that you can version your local file
using Git or some other version control system (VCS).  Even without VCS,
editing a local copy of your system configuration may prevent some
silly mistakes.

-
Sergiu


  parent reply	other threads:[~2023-03-11 17:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-11 10:33 open config.scm with sudo and gedit or emacs Gottfried
2023-03-11 10:57 ` Thanos Apollo
2023-03-11 11:03 ` Bruno Victal
2023-03-11 17:05 ` Sergiu Ivanov [this message]
2023-03-11 18:58   ` Kyle
2023-03-11 23:42   ` SeerLite
2023-03-12  7:07     ` Boris A. Dekshteyn
2023-03-12  9:33       ` SeerLite
2023-03-12 11:00     ` Sergiu Ivanov
2023-03-12 18:13       ` Luis Felipe
2023-03-12 19:05         ` Sergiu Ivanov
2023-03-12 13:27     ` Felix Lechner via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a60jdx0m.fsf@colimite.fr \
    --to=sivanov@colimite.fr \
    --cc=gottfried@posteo.de \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.