Compare commits

..

3 Commits

Author SHA1 Message Date
7e91c3bc1d
desktop: Include /etc/guix/channels.scm, referencing latest channels
* .guix/rekahsoft/guix-config/desktop.scm: Add a /etc/guix/channels.scm file so that
users (including root) that do not have their own ~/.config/guix/channels.scm file default to
channels used by this repository. This enables `guix time-machine -- describe -f` to output
the latest channels without specifying the `channels-latest.scm` file to time-machine.
* channels-latest.scm: Channel file that exactly matches `./channels.scm`, except that it
does not pin any channel to a commit, so that the latest version will be pulled.
2024-02-24 22:30:01 -05:00
2346803d19
README.org: Minor additions and new section about substitutes
* README.org:
(Disk Setup and Partitioning): Document creating and enabling swap and creating/mounting /boot/efi
(Optional (but recommended): Use additional or alternative substitute servers): New section
2024-02-24 22:17:34 -05:00
e5fb2f12e3
README.org: Run 'hash guix' to resolve known initial install issue 2024-02-24 22:17:18 -05:00
3 changed files with 79 additions and 13 deletions

View File

@ -38,6 +38,9 @@
(listen-tcp? #f)))
(service docker-service-type)
(simple-service 'system-guix-channels etc-service-type
(list `("guix/channels.scm" ,(local-file "../../../channels-latest.scm"))))
(service qemu-binfmt-service-type
(qemu-binfmt-configuration
(platforms (lookup-qemu-platforms "arm" "aarch64"))))

View File

@ -104,9 +104,11 @@ When on my network, I pull from my internal git (notice the different URL).
curl -O https://git.home.rekahsoft.ca/rekahsoft-public/guix-machines/raw/branch/master/channels.scm
#+end_src
Once the channel file is available on the target, update guix to use these channels.
Once the channel file is available on the target, refresh the cached command paths with
~hash~ and update guix to use the new channels.
#+begin_src shell
hash guix
sudo -i guix pull -C $(realpath channels.scm)
#+end_src
@ -164,10 +166,20 @@ TODO: disks need to be partitioned and appropriately mounted. This varies depend
btrfs subvolume create /mnt/gnu/store
btrfs subvolume create /mnt/home
btrfs subvolume create /mnt/var
# Create and activate swap
mkswap --label swap /dev/vg0/swap
swapon /dev/vg0/swap
# Prepare /mnt for Guix installation
mkdir -p /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi
#+end_src
*** Bootstrap System
**** Start ~cow-store~ Service
As described in guix documentation, start ~cow-store~ to allow later steps to write store
changes to ~/mnt/gnu/store~.
@ -175,6 +187,33 @@ changes to ~/mnt/gnu/store~.
herd start cow-store /mnt
#+end_src
**** Optional (but recommended): Use additional or alternative substitute servers
Optionally additional or alternative substitute servers can be setup for guix-daemon. This is
recommended to greatly speed up installation (so that nonguix and rekahsoft-guix (internal
network only) substitutes can be used).
First stop the running ~guix-daemon~.
#+begin_src bash
herd stop guix-daemon
#+end_src
Then start a new instance of ~guix-daemon~ as it is normally started by its Shepherd service,
but with additional or alternative substitute servers provided.
#+begin_src bash
guix-daemon \
--build-users-group guixbuild \
--max-silent-time 0 \
--timeout 0 \
--log-compression gzip \
--discover=no \
--substitute-urls https://substitutes.nonguix.org https://guix-ci.home.rekahsoft.ca https://ci.guix.gnu.org https://bordeaux.guix.gnu.org &
#+end_src
**** Create and Bootstrap System
Create a ~bootstrap.scm~ file like this:
#+begin_src scheme
@ -187,18 +226,6 @@ Use ~guix system init ...~ to instantiate the system.
guix system init bootstrap.scm /mnt
#+end_src
**** TODO This doesn't work unless I use ~guix time-machine ...~
I have to use ~guix time-machine ...~ with the channel file for ~guix system init ...~ to
work. It fails to find the sources, complaining about a missing public interface. However, in
repl this also fails. Even more confusingly, when using ~guix time-machine -C channels.scm --
repl~, it also cannot find the modules from my channel. I need to ask about this on the
mailing list. What works (no pull needed):
#+begin_src bash
guix time-machine -C channels.scm -- system init bootstrap.scm /mnt
#+end_src
** TODO Producing an image to be flashed directly
TODO: there are limitations on what images I can produce; namely, lvm and luks cannot be

36
channels-latest.scm Normal file
View File

@ -0,0 +1,36 @@
(list (channel
(name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git")
(branch "master")
(introduction
(make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad"
(openpgp-fingerprint
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))
(channel
(name 'nonguix)
(url "https://gitlab.com/nonguix/nonguix")
(branch "master")
(introduction
(make-channel-introduction
"897c1a470da759236cc11798f4e0a5f7d4d59fbc"
(openpgp-fingerprint
"2A39 3FFF 68F4 EF7A 3D29 12AF 6F51 20A0 22FB B2D5"))))
(channel
(name 'rekahsoft-guix)
(url "https://git.rekahsoft.ca/rekahsoft/rekahsoft-guix.git")
(branch "master")
(introduction
(make-channel-introduction
"d910ac4ca1e1a115934b10921bc23f50bd481043"
(openpgp-fingerprint
"F8D5 46F3 AF37 EF53 D1B6 48BE 7B4D EB93 212B 3022"))))
(channel
(name 'guix-machines)
(url "https://git.home.rekahsoft.ca/rekahsoft-public/guix-machines.git")
(branch "master")
(introduction
(make-channel-introduction
"acaa20d632da16937508a45ef2cc0083e09bae4c"
(openpgp-fingerprint
"F8D5 46F3 AF37 EF53 D1B6 48BE 7B4D EB93 212B 3022")))))