* guix on a debian system (with packages from experimental) - recommended day to day routine?
@ 2021-08-30 0:58 Andreas Reuleaux
2021-09-02 19:58 ` zimoun
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Reuleaux @ 2021-08-30 0:58 UTC (permalink / raw)
To: help-guix
Having started with guix only recently (with a standalone GuixSD
on a spare machine i.e.), I cannot immediatly switch to working
with guix only (as much as I would like to), as I have come to depend on
many things debian over the years.
Thus I am trying to tackle this from both ends:
(1) learn some more guix, create packages as I need them, and so on
(prepare for my move to guix some day i.e.).
(2) and I have now installed guix my main debian machine as well.
And I have used the packages from experimental to that end,
(on an otherwise bullseye=debian-testing machine), roughly like so:
/etc/apt/sources
--8<---------------cut here---------------start------------->8---
...
deb http://ftp.uk.debian.org/debian/ bullseye main
deb http://security.debian.org/debian-security bullseye-security main
deb http://ftp.uk.debian.org/debian/ unstable main
deb http://ftp.debian.org/debian experimental main
--8<---------------cut here---------------end--------------->8---
/etc/apt/preferences
--8<---------------cut here---------------start------------->8---
Package: *
Pin: release o=Debian a=testing
Pin-Priority: 500
Package: *
Pin: release a=unstable
Pin-Priority: 490
Package: *
Pin: release a=experimental
Pin-Priority: 480
--8<---------------cut here---------------end--------------->8---
and then:
--8<---------------cut here---------------start------------->8---
root@softland /etc/apt # apt-get -t experimental install guix
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
libc-devtools
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
guile-2.2 guile-3.0-libs guile-bytestructures guile-gcrypt guile-git guile-gnutls guile-json
guile-lzlib guile-sqlite3 guile-ssh guile-zlib libc-bin libc-dev-bin libc-l10n libc6 libc6-dbg
libc6-dev libgcrypt20 libgcrypt20-dev libgit2-dev libgpg-error-dev libguile-ssh13 libhttp-parser-dev
liblz-dev liblz1 libmbedtls-dev libsqlite3-dev libssh-4 libssh-dev libssh2-1-dev libssl-dev libssl3
locales nscd rpcsvc-proto
Suggested packages:
guile-2.2-doc glibc-doc rng-tools libgcrypt20-doc libmbedtls-doc sqlite3-doc libssh-doc libssl-doc
Recommended packages:
libc-devtools
The following NEW packages will be installed:
guile-2.2 guile-3.0-libs guile-bytestructures guile-gcrypt guile-git guile-gnutls guile-json
guile-lzlib guile-sqlite3 guile-ssh guile-zlib guix libgcrypt20-dev libgit2-dev libgpg-error-dev
libguile-ssh13 libhttp-parser-dev liblz-dev liblz1 libmbedtls-dev libsqlite3-dev libssh-4 libssh-dev
libssh2-1-dev libssl-dev libssl3 nscd rpcsvc-proto
The following packages will be upgraded:
libc-bin libc-dev-bin libc-l10n libc6 libc6-dbg libc6-dev libgcrypt20 locales
8 upgraded, 28 newly installed, 0 to remove and 236 not upgraded.
Need to get 74.0 MB/84.7 MB of archives.
After this operation, 409 MB of additional disk space will be used.
Do you want to continue? [Y/n]
--8<---------------cut here---------------end--------------->8---
And yes: I have continued here, and accepted all these new packages,
and the installation went smoothly for me.
If it was wise to do so, I don't know, and only time will tell:
I hope this will not break my system at some point later.
My idea was, to have an up to date guix system (1.3.0) on top of my
debian system as a starting point - without having to follow the manual steps
of a binary installation.
And according to /usr/share/doc/guix/README.Debian
"installing the Debian package of guix is similar to installing guix on a foreign distro"
(Some minor differences are explained there as well:
guix build group is _guixbuild and the users are named _guixbuilder[0-9] ...
-- OK, fine with me).
And now I am using guix on my debian system (I haven't taken exact
notes, what I did step by step), but after some
--8<---------------cut here---------------start------------->8---
git pull
--8<---------------cut here---------------end--------------->8---
step I guess (as a normal/unpriviliged user: rx), I have now two guix
(and guix-daemon) binaries:
from my debian guix installation:
--8<---------------cut here---------------start------------->8---
/usr/bin/guix
/usr/bin/guix-daemon
--8<---------------cut here---------------end--------------->8---
and as installed/updated from guix itself:
--8<---------------cut here---------------start------------->8---
/home/rx/.config/guix/current/bin/guix
/home/rx/.config/guix/current/bin/guix-daemon
--8<---------------cut here---------------end--------------->8---
and likewise, if I install packages with guix, say fontconfig, then I have:
--8<---------------cut here---------------start------------->8---
/home/rx/.guix-profile/bin/fc-list
--8<---------------cut here---------------end--------------->8---
(among other fontconfig binaries)
in addtion to my debian-system fontconfig binaries (fc-list among them):
--8<---------------cut here---------------start------------->8---
rx@softland ~ $ type fc-list
fc-list is /usr/bin/fc-list
--8<---------------cut here---------------end--------------->8---
I DO NOT want /home/rx/.guix-profile/bin/fc-list to appear before
/usr/bin/fc-list in my path, thus I am NOT sourcing:
--8<---------------cut here---------------start------------->8---
export GUIX_PROFILE="$HOME/.guix-profile"
. "$GUIX_PROFILE/etc/profile"
--8<---------------cut here---------------end--------------->8---
at least not for now (and certainly not at the top of my .bashrc)
but rather I have a bash function: gx which gives me:
--8<---------------cut here---------------start------------->8---
/home/rx/.guix-profile/bin/fc-list
--8<---------------cut here---------------end--------------->8---
when I type
--8<---------------cut here---------------start------------->8---
gx fc-list
--8<---------------cut here---------------end--------------->8---
and otherwise fc-list is my (debian) system command /usr/bin/fc-list.
(I am not going into the details: gx is simple enough ...)
Now my understanding is, that in my day to day routine, I will
work mostly with this newly installed guix command:
--8<---------------cut here---------------start------------->8---
/home/rx/.config/guix/current/bin/guix
--8<---------------cut here---------------end--------------->8---
rather than with my debian /usr/bin/guix
(and THIS /home/rx/.config/guix/current/bin/guix I HAVE in my PATH
before /usr/bin/guix),
and indeed I can: pull, install packages, upgrade them and so on:
--8<---------------cut here---------------start------------->8---
guix pull
guix packge -i ...
guix package -u ...
--8<---------------cut here---------------end--------------->8---
And by the way: only this /home/rx/.config/guix/current/bin/guix will
find my personal channel as specified in ~/.config/guix/channels.scm
(/usr/bin/guix will not).
All this in the personal (rx) niche of my debian system.
Now, long story short: I wonder -- two things:
(1) what good is the debian /usr/bin/guix at all for me? - and
(2) what daily routine is recommended for upgrading/reconfiguring my
whole guix system, with /usr/bin/guix perhaps - if any routine at all?
Obviously, the
--8<---------------cut here---------------start------------->8---
sudo guix system reconfigure /etc/config.scm
--8<---------------cut here---------------end--------------->8---
step does not apply, as there is no /etc/config.scm now on my system
(it is running debian after all).
Should I try to do something similar nevertheless once in a while?
(and as what user: my unprivileged rx, or as root)?
Somehow upgrade my whole guix on debian system i.e.?
Clear some cache maybe, etc.?
Restart the (debian) guix-daemon perhaps after some upgrade?
Or should I just wait till I get upgrades from debian (experimental)
at some point?
I wonder how other people are coping with this situation?
Thanks in advance.
-A
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: guix on a debian system (with packages from experimental) - recommended day to day routine?
2021-08-30 0:58 guix on a debian system (with packages from experimental) - recommended day to day routine? Andreas Reuleaux
@ 2021-09-02 19:58 ` zimoun
2021-09-02 21:35 ` Andreas Reuleaux
0 siblings, 1 reply; 3+ messages in thread
From: zimoun @ 2021-09-02 19:58 UTC (permalink / raw)
To: Andreas Reuleaux, help-guix
Hi
On Mon, 30 Aug 2021 at 01:58, Andreas Reuleaux <rx@a-rx.info> wrote:
> Now, long story short: I wonder -- two things:
>
> (1) what good is the debian /usr/bin/guix at all for me? - and
I am not sure to understand the question.
In short, /usr/bin/guix is not useful for the user because the user uses
~/.config/guix/current/bin/guix instead. However, the user uses the
daemon which is /usr/bin/guix-daemon. Except if you changed the SystemD
configuration.
When you run “guix pull” as a user, ~/.config/guix/current/bin/guix is
updated but not the daemon which is running with root privileges.
To update this daemon, you can run “guix pull” as root. Note the daemon
changes really barely. You can also update the daemon with “apt upgrade
guix” but I am not sure Guix is often updated.
> (2) what daily routine is recommended for upgrading/reconfiguring my
> whole guix system, with /usr/bin/guix perhaps - if any routine at all?
>
> Obviously, the
> --8<---------------cut here---------------start------------->8---
> sudo guix system reconfigure /etc/config.scm
> --8<---------------cut here---------------end--------------->8---
> step does not apply, as there is no /etc/config.scm now on my system
> (it is running debian after all).
I do not think it makes because it is Guix on foreign distro and not
Guix System.
> Should I try to do something similar nevertheless once in a while?
> (and as what user: my unprivileged rx, or as root)?
Well, running Guix on Debian (installed via the script), I do:
$ guix pull
once a week or more often, then
$ guix package -u
when I am in good mood. :-) Every good Moon phase, I do as root:
# guix pull
# systemctl restart guix-daemon.service
Aside, I recommend you to read:
<https://guix.gnu.org/cookbook/en/guix-cookbook.html#Advanced-package-management>
Other said, my default profile ~/.guix-profile contains almost nothing.
And I have several profiles living at ~/.config/guix/profiles/ which I
update time to time. Then I also have profiles living in the folder of
my project’s directories.
Also, I declare the packages a profile requires using a file
manifest.scm then I store “guix describe -f channels” as channels.scm
when I create the profiles. It allows to recreate elsewhere with:
guix time-machine -C channels -- package -m manifest.scm
> Clear some cache maybe, etc.?
Time to time, I run “guix gc” with various options.
Hope that helps,
simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: guix on a debian system (with packages from experimental) - recommended day to day routine?
2021-09-02 19:58 ` zimoun
@ 2021-09-02 21:35 ` Andreas Reuleaux
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Reuleaux @ 2021-09-02 21:35 UTC (permalink / raw)
To: help-guix
Well, thanks for answering this older question of mine as well. - I yet
have to study your answer in more detail (but not tonight any more).
-Andreas
zimoun <zimon.toutoune@gmail.com> writes:
> Hi
>
> On Mon, 30 Aug 2021 at 01:58, Andreas Reuleaux <rx@a-rx.info> wrote:
>
>> Now, long story short: I wonder -- two things:
>>
>> (1) what good is the debian /usr/bin/guix at all for me? - and
>
> I am not sure to understand the question.
>
> In short, /usr/bin/guix is not useful for the user because the user uses
> ~/.config/guix/current/bin/guix instead. However, the user uses the
> daemon which is /usr/bin/guix-daemon. Except if you changed the SystemD
> configuration.
>
> When you run “guix pull” as a user, ~/.config/guix/current/bin/guix is
> updated but not the daemon which is running with root privileges.
>
> To update this daemon, you can run “guix pull” as root. Note the daemon
> changes really barely. You can also update the daemon with “apt upgrade
> guix” but I am not sure Guix is often updated.
>
>
>> (2) what daily routine is recommended for upgrading/reconfiguring my
>> whole guix system, with /usr/bin/guix perhaps - if any routine at all?
>>
>> Obviously, the
>> --8<---------------cut here---------------start------------->8---
>> sudo guix system reconfigure /etc/config.scm
>> --8<---------------cut here---------------end--------------->8---
>> step does not apply, as there is no /etc/config.scm now on my system
>> (it is running debian after all).
>
> I do not think it makes because it is Guix on foreign distro and not
> Guix System.
>
>> Should I try to do something similar nevertheless once in a while?
>> (and as what user: my unprivileged rx, or as root)?
>
> Well, running Guix on Debian (installed via the script), I do:
>
> $ guix pull
>
> once a week or more often, then
>
> $ guix package -u
>
> when I am in good mood. :-) Every good Moon phase, I do as root:
>
> # guix pull
> # systemctl restart guix-daemon.service
>
> Aside, I recommend you to read:
>
> <https://guix.gnu.org/cookbook/en/guix-cookbook.html#Advanced-package-management>
>
> Other said, my default profile ~/.guix-profile contains almost nothing.
> And I have several profiles living at ~/.config/guix/profiles/ which I
> update time to time. Then I also have profiles living in the folder of
> my project’s directories.
>
> Also, I declare the packages a profile requires using a file
> manifest.scm then I store “guix describe -f channels” as channels.scm
> when I create the profiles. It allows to recreate elsewhere with:
>
> guix time-machine -C channels -- package -m manifest.scm
>
>> Clear some cache maybe, etc.?
>
> Time to time, I run “guix gc” with various options.
>
>
> Hope that helps,
> simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-02 21:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-30 0:58 guix on a debian system (with packages from experimental) - recommended day to day routine? Andreas Reuleaux
2021-09-02 19:58 ` zimoun
2021-09-02 21:35 ` Andreas Reuleaux
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.