unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Luis Felipe <sirgazil@zoho.com>
To: Sergiu Ivanov <sivanov@colimite.fr>, SeerLite <seerlite@disroot.org>
Cc: help-guix@gnu.org, Gottfried <gottfried@posteo.de>
Subject: Re: open config.scm with sudo and gedit or emacs
Date: Sun, 12 Mar 2023 18:13:54 +0000	[thread overview]
Message-ID: <2e4f8c03-7a9d-e34c-418c-70efa0227e87@zoho.com> (raw)
In-Reply-To: <875yb6rzww.fsf@colimite.fr>


[-- Attachment #1.1.1: Type: text/plain, Size: 2410 bytes --]

Hello people,

El 12/03/23 a las 11:00, Sergiu Ivanov escribió:
> Hi SeerLite,
>
> SeerLite <seerlite@disroot.org> [2023-03-12T00:42:42+0100]:
>> On March 11, 2023 2:05:01 PM GMT-03:00, Sergiu Ivanov <sivanov@colimite.fr> wrote:
>>> 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
>> Why not use the configuration from ~/.config directly? Why copy at all? I do
>>
>>      sudo guix system reconfigure ~/.config/guix/system-config.scm
> You are right, it's probably even better.
>
> I prefer keeping my system config in /etc/config.scm because this is
> what everyone seems to do, but that's probably a bad reason, supported
> by unreliable data :D
I don't think there is any need to edit /etc/config.scm at all (maybe 
something in the manual needs clarification?). Once you have installed 
the Guix System, you can

 1. Open /etc/config.scm with any text editor you want
 2. Copy its contents and save them to a file in any location in your
    home folder. For example: ~/Documents/my-guix-things/production-os.scm.

 From that moment on, you can edit production-os.scm as your regular 
user in any way you like and only use "sudo" to apply the configuration 
to your system:

    guix pull  # Recommended.
    sudo guix system reconfigure
    ~/Documents/my-guix-things/production-os.scm

You can even create copies of "production-os.scm" and shape different 
systems you'd like to try out separately (e.g. gnome-os.scm, 
sway-os.scm, some-server.scm, etc.).

In fact, the Guix manual says: "The normal way to change the system 
configuration is by updating this file [a file like the 
production-os.scm] and re-running ‘[sudo] guix system reconfigure’.  One 
should never have to touch files in ‘/etc’" (see System Configuration).

Hope that helps,


-- 
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2881 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2023-03-12 18:59 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
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 [this message]
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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=2e4f8c03-7a9d-e34c-418c-70efa0227e87@zoho.com \
    --to=sirgazil@zoho.com \
    --cc=gottfried@posteo.de \
    --cc=help-guix@gnu.org \
    --cc=seerlite@disroot.org \
    --cc=sivanov@colimite.fr \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).