#+title: Base Guix Configuration #+author: Gabriel Simmer * Channels I don't really need any fancy channels, besides nonguix and my own repository. #+begin_src scheme :tangle .config/guix/channels.scm ;; This file is generated from ~/dotfiles/guix/system-config/base.org. (list (channel (name 'nonguix) (url "https://gitlab.com/nonguix/nonguix")) (channel (name 'gguix) (url "https://github.com/gmemstr/gguix")) (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (introduction (make-channel-introduction "9edb3f66fd807b096b48283debdcddccfea34bad" (openpgp-fingerprint "BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))) #+end_src * Systems ** Base Configuration Just some basic importing of modules for now. I'm using the nonfree Linux kernel from nonguix. #+begin_src scheme :tangle .config/guix/systems/base-system.scm ;; This file is geneated from ~/dotfiles/guix/system-config/base.org (define-module (base-system) #:use-module (gnu) #:use-module (srfi srfi-1) #:use-module (gnu system nss) #:use-module (gnu services pm) #:use-module (gnu services cups) #:use-module (gnu services desktop) #:use-module (gnu services docker) #:use-module (gnu services networking) #:use-module (gnu services virtualization) #:use-module (gnu packages wm) #:use-module (gnu packages cups) #:use-module (gnu packages vim) #:use-module (gnu packages gtk) #:use-module (gnu packages xorg) #:use-module (gnu packages emacs) #:use-module (gnu packages file-systems) #:use-module (gnu packages gnome) #:use-module (gnu packages mtools) #:use-module (gnu packages linux) #:use-module (gnu packages audio) #:use-module (gnu packages gnuzilla) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages web-browsers) #:use-module (gnu packages version-control) #:use-module (gnu packages package-management) #:use-module (nongnu packages linux) #:use-module (nongnu system linux-initrd)) (use-service-modules nix) (use-service-modules desktop xorg) (use-package-modules certs) (use-package-modules shells) #+end_src #+begin_src scheme :tangle .config/guix/systems/base-system.scm (define %xorg-libinput-config "Section \"InputClass\" Identifier \"Touchpads\" Driver \"libinput\" MatchDevicePath \"/dev/input/event*\" MatchIsTouchpad \"on\" Option \"Tapping\" \"on\" Option \"TappingDrag\" \"on\" Option \"DisableWhileTyping\" \"on\" Option \"MiddleEmulation\" \"on\" Option \"ScrollMethod\" \"twofinger\" EndSection Section \"InputClass\" Identifier \"Keyboards\" Driver \"libinput\" MatchDevicePath \"/dev/input/event*\" MatchIsKeyboard \"on\" EndSection ") #+end_src And now we can configure the actual base OS. This is more or less everything I'd need in a typing install of Guix/Linux. #+begin_src scheme :tangle .config/guix/systems/base-system.scm (define-public base-operating-system (operating-system (host-name "london") (timezone "Europe/London") (locale "en_US.utf8") ;; Nonfree stuff (kernel linux) (firmware (list linux-firmware)) (initrd microcode-initrd) (keyboard-layout (keyboard-layout "us" "intl")) (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (target "/boot/efi") (keyboard-layout keyboard-layout))) (file-systems (cons* (file-system (device "/dev/sda1") (mount-point "/boot") (type "vfat")) (file-system (device "/dev/sda2") (mount-point "/") (type "ext4")) %base-file-systems)) (users (cons (user-account (name "gsimmer") (comment "Gabriel Simmer") (password (crypt "pass" "$6$abc")) (group "users") (supplementary-groups '("wheel" "netdev" "audio" "video" "docker" "kvm" "tty" "input" "realtime" "audio" "video"))) %base-user-accounts)) (groups (cons (user-group (system? #t) (name "realtime")) %base-groups)) (packages (append (list git exfat-utils fuse-exfat stow vim emacs xterm pulseaudio xf86-input-libinput nss-certs gvfs) %base-packages)) (services (append (list (service gnome-desktop-service-type) (set-xorg-configuration (xorg-configuration (keyboard-layout keyboard-layout))) (service docker-service-type)) %desktop-services)) (name-service-switch %mdns-host-lookup-nss))) #+end_src ** Individual Systems *** London London is my primary custom built desktop, with + 256GB Samsung 860 NVMe SSD + 1TB WD SATA SSD + 500GB Samsung SATA SSD + 16GB Corsair Vengeance RGB Pro DDR4-3200 CL16 + AMD Ryzen 7 3700x + Asus GeForce GTX 1070 8GB #+begin_src scheme :tangle .config/guix/systems/london.scm (define-module (london) #:use-module (base-system) #:use-module (gnu)) (operating-system (inherit base-operating-system) (host-name "london") (file-systems (cons* (file-system (device "/dev/nvme0n1p1") (mount-point "/boot/efi") (type "vfat")) (file-system (device "/dev/nvme0n1p2") (mount-point "/") (type "ext4")) %base-file-systems))) #+end_src *** Virtual This applies to any random Guix VM I spin up, usually for testing configurations. #+begin_src scheme :tangle .config/guix/systems/virtual.scm (define-module (virtual) #:use-module (base-system) #:use-module (gnu)) (operating-system (inherit base-operating-system) (host-name "virtual") (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/sda") (keyboard-layout (keyboard-layout "us"))))) #+end_src