Installation guide


Pre-installation

Verify signature

Boot the live environment

Set the keyboard layout

To set the keyboard layout:

$ loadkeys dvorak

To list available keyboard layouts, refer to /run/current-system/profile/share/keymaps or run man loadkeys. By default, the installation uses US qwerty.

Connect to the Internet

Find available network interfaces:

$ ifconfig -a

Wired Network

To configure a wired network run the following command, substituting interface with the name of the wired interface you want to use:

$ ifconfig interface up

Wireless Network

Using WPA-Supplicant

To configure wireless networking, create a configuration file for the wpa_supplicant configuration tool:

$ nano wpa_supplicant.conf

with the following content, substituting your network details:

network={
  ssid="my-ssid"
  key_mgmt=WPA-PSK
  psk="the network's secret passphrase"
}

To start the wireless service, and run it on interface in the background:

$ wpa_supplicant -c wpa_supplicant.conf -i interface -B
Using Connman

another tool that is available on installation iso is connman service and we can configure that using connmanctl. in order to connect to wifi networks using connmanctl, first we need to unblock wifi module using:

$ root@gnu ~# rfkill unblock wifi

now we can connect to wifi networks using connmanctl:

$ root@gnu ~# connmanctl
connmanctl> scan wifi
connmanctl> services
SSID-1   wifi_...._......
SSID-2   wifi_...._......
SSID-3   wifi_...._......
SSID-4   wifi_...._......
SSID-5   wifi_...._......
...
connmanctl> agent on
connmanctl> connect wifi_...

Get IP

To get a new IP for your interface:

$ dhclient -v interface

SSH access

If you want to continue with the installation remotely, load the SSH server and set a root password:

$ herd start ssh-daemon
$ passwd

Partition the disks

First we'll need to create at least one partition:

$ cfdisk

For a very basic set-up, go with

  • dos
  • new
  • keep size
  • primary
  • write - yes
  • quit

Format the partitions

To format the new partition, use:

$ mkfs.ext4 -L my-root /dev/sda1

swap space

If you've also created a swap partition sda2, format and enable it now:

$ mkswap /dev/sda2
$ swapon /dev/sda2

Alternatively, you may create a swap file:

$ dd if=/dev/zero of=/mnt/swapfile bs=1MiB count=10240
# For security, we allow only root to read / write the swap file
$ chmod 600 /mnt/swapfile
$ mkswap /mnt/swapfile
$ swapon /mnt/swapfile

Mount the file systems

$ mount LABEL=my-root /mnt

additionally if you want to mount additional partitions (eg. /home), you need to mount them after this step:

mkdir -p /mnt/home
mount /dev/sdaX /mnt/home

Installation

herd start cow-store /mnt

Configure the system

$ mkdir /mnt/etc
# System configuration examples are below
$ nano /mnt/etc/system-config.scm

Once you're satisfied with your configuration, proceed with the installation:

$ guix system init /mnt/etc/system-config.scm /mnt

System configuration

Bare bones example
;; This is an operating system configuration template
;; for a "bare bones" setup, with no X11 display server.
;; read more at https://www.gnu.org/software/guix/manual/en/guix.html#Using-the-Configuration-System

(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules screen)

(operating-system
  (host-name "panther")
  (timezone "Europe/Berlin")
  (locale "en_US.utf8")

  ;; Boot in "legacy" BIOS mode, assuming /dev/sda is the
  ;; target hard disk, and "my-root" is the label of the target
  ;; root file system.
  (bootloader (bootloader-configuration
                (bootloader grub-bootloader)
                (target "/dev/sda")))
  (file-systems (cons (file-system
                        (device (file-system-label "my-root"))
                        (mount-point "/")
                        (type "ext4"))
                      %base-file-systems))

  ;; This is where user accounts are specified.  The "root"
  ;; account is implicit, and is initially created with the
  ;; empty password.
  (users (cons (user-account
                (name "your-name")
                (comment "your-name's account")
                (group "users")

                ;; Adding the account to the "wheel" group
                ;; makes it a sudoer.  Adding it to "audio"
                ;; and "video" allows the user to play sound
                ;; and access the webcam.
                (supplementary-groups '("wheel"
                                        "audio" "video"))
                (home-directory "/home/your-name"))
               %base-user-accounts))

  ;; Globally-installed packages.
  (packages (cons screen %base-packages))

  ;; Add services to the baseline: a DHCP client and
  ;; an SSH server.
  (services (cons* (service dhcp-client-service-type)
                   (service openssh-service-type
                            (openssh-configuration
                              (port-number 2222)))
                   %base-services)))
GNOME example
;; This is an operating system configuration template
;; for a "desktop" setup with GNOME
;; read more at https://www.gnu.org/software/guix/manual/en/guix.html#Using-the-Configuration-System

(use-modules (gnu) (gnu system nss))
(use-service-modules desktop)
(use-package-modules certs gnome)

(operating-system
  (host-name "panther")
  (timezone "Europe/Berlin")
  (locale "en_US.utf8")

  ;; Boot in "legacy" BIOS mode, assuming /dev/sda is the
  ;; target hard disk, and "my-root" is the label of the target
  ;; root file system.
  (bootloader (bootloader-configuration
               (bootloader grub-bootloader)
               (target "/dev/sda")))
  (file-systems (cons (file-system
                        (device (file-system-label "my-root"))
                        (mount-point "/")
                        (type "ext4"))
                 %base-file-systems))

  ;; This is where user accounts are specified.  The "root"
  ;; account is implicit, and is initially created with the
  ;; empty password.
  (users (cons (user-account
                (name "your-name")
                (comment "your-name's account")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video"))
                (home-directory "/home/your-name"))
               %base-user-accounts))

  ;; This is where we specify system-wide packages.
  (packages (cons* nss-certs         ;for HTTPS access
                   gvfs              ;for user mounts
                   %base-packages))

  ;; Add GNOME - we can choose at the log-in
  ;; screen with F1.  Use the "desktop" services, which
  ;; include the X11 log-in service, networking with
  ;; NetworkManager, and more.
  (services (cons* (gnome-desktop-service)
                   %desktop-services)))
Xfce example
;; This is an operating system configuration template
;; for a "desktop" setup with Xfce
;; read more at https://www.gnu.org/software/guix/manual/en/guix.html#Using-the-Configuration-System

(use-modules (gnu) (gnu system nss))
(use-service-modules desktop)
(use-package-modules certs)

(operating-system
  (host-name "panther")
  (timezone "Europe/Berlin")
  (locale "en_US.utf8")

  ;; Boot in "legacy" BIOS mode, assuming /dev/sda is the
  ;; target hard disk, and "my-root" is the label of the target
  ;; root file system.
  (bootloader (bootloader-configuration
               (bootloader grub-bootloader)
               (target "/dev/sda")))
  (file-systems (cons (file-system
                        (device (file-system-label "my-root"))
                        (mount-point "/")
                        (type "ext4"))
                 %base-file-systems))

  ;; This is where user accounts are specified.  The "root"
  ;; account is implicit, and is initially created with the
  ;; empty password.
  (users (cons (user-account
                (name "your-name")
                (comment "your-name's account")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video"))
                (home-directory "/home/your-name"))
               %base-user-accounts))

  ;; This is where we specify system-wide packages.
  (packages (cons* nss-certs         ;for HTTPS access
                   gvfs              ;for user mounts
                   %base-packages))

  ;; Add Xfce - we can choose at the log-in
  ;; screen with F1.  Use the "desktop" services, which
  ;; include the X11 log-in service, networking with
  ;; NetworkManager, and more.
  (services (cons* (xfce-desktop-service)
                   %desktop-services)))

Read more about System Configuration and discover countless of other examples.

Reboot

After completion, you may boot into your new system with reboot.

Post-installation

To proceed, it's best you login with root.

Root password

Set the root password with:

$ passwd

User password

Set the username password with:

$ passwd username

Update the system

It's good practice to update the system now:

$ guix pull

This will download the latest package definitions, and update guix itself. To apply the update, do:

$ guix system reconfigure /etc/system-config.scm

Once that has completed, restart your system:

$ reboot

After rebooting, you can list your system generations with:

$ guix system list-generations

After a fresh installation, and first update, you should see 2 generations, similar to this:

Generation 1    Dec 07 2018 23:20:14
  file name: /var/guix/profiles/system-1-link
  canonical file name: /gnu/store/sfk9hvzlxppgbkp1rql1d9r7gv3zrj4a-system
  label: GNU with Linux-Libre 4.19.6 (beta)
  bootloader: grub
  root device: label: "my-root"
  kernel: /gnu/store/0zajbn9q39yva4l0zzrcshlll8qikzba-linux-libre-4.19.6/bzImage
Generation 2    Dec 08 2018 11:36:15
  file name: /var/guix/profiles/system-2-link
  canonical file name: /gnu/store/5q7i7wg2smfyfkzdkgi0na2xl8c6yz21-system
  label: GNU with Linux-Libre 4.19.6 (beta)
  bootloader: grub
  root device: label: "my-root"
  kernel: /gnu/store/0zajbn9q39yva4l0zzrcshlll8qikzba-linux-libre-4.19.6/bzImage

Every time you make a change to your system configuration, with guix system reconfigure ..., a new system generation will be initiated. If anything ever goes wrong, you can roll-back to a previous generation 1 with:

$ guix system switch-generation 1

This switch is also available trough grub, so you can roll-back, without command line access.

Miscellaneous Notes:

Dual Boot

in order to have dual boot on PantherX, we need to add menu entries for other operating systems to bootloader section of system configuration:

(bootloader (bootloader-configuration
              ...
              (menu-entries
                (list (menu-entry
                        (label "Arch Linux")
                          (linux "/path/to/vmlinuz-linux")          ; path to vmlinuz-linux, in target partition
                          (linux-arguments '("root=/dev/sdaX"))     ; target partition that tartget os files are located in
                          (initrd "/path/to/initramfs-linux.img"))  ; path to initrd image in target partition
                      ...
                      ))))

Note: since PantherX linux image and initrd is stored inside store and automatically managed by guix system, so for now PantherX should be responsible for management.

reference

Touchpad Tap to click Activation

To activation tap to click you can add an extra config to xorg-configuration in sddm-service-type part:

         (service sddm-service-type
             (sddm-configuration
               (minimum-uid 1000)
               (theme "darkine")
               (xorg-configuration
                 (xorg-configuration
                   (extra-config `("Section \"InputClass\"\n"
                                   "   Identifier \"touchpad\"\n"
                                   "   Driver \"libinput\"\n"
                                   "   MatchIsTouchpad \"on\"\n"
                                   "   Option \"Tapping\" \"on\"\n"
                                   "EndSection\n"
                                   "\n"))))))

PantherX & (unofficial) GNU Guix Wiki.

Last update: 2021-04-12 09:39:21 +0000

Inspired by the excellent Arch Linux Wiki