Pull nonguix guix channel. Select configuration through $PROFILE.
guix-store := /gnu/store
guix-version := $(shell guix show guix | sed -n '/^version/s/^.*: //gp')
-home:
- GUIX_PACKAGE_PATH=`pwd` guix home reconfigure home.scm
+home-nonfree:
+ GUIX_PACKAGE_PATH=`pwd` PROFILE=nonfree guix home reconfigure home.scm
. $(guix-profile)/etc/profile
-system:
- sudo GUIX_PACKAGE_PATH=`pwd` guix system reconfigure system.scm
+home-libre:
+ GUIX_PACKAGE_PATH=`pwd` PROFILE=libre guix home reconfigure home.scm
+ . $(guix-profile)/etc/profile
+
+system-nonfree:
+ sudo GUIX_PACKAGE_PATH=`pwd` PROFILE=nonfree guix system reconfigure system.scm
+
+system-libre:
+ sudo GUIX_PACKAGE_PATH=`pwd` PROFILE=libre guix system reconfigure system.scm
tags:
find $(guix-store) -wholename "*guix-$(guix-version)*.scm" -or \
installs programs and their configuration files (dotfiles). See Makefile for
installation instructions.
+Bootstrap
+---------
+
+guix/.config/guix/channels.scm declares third-party channels needed to build the
+configuration (e.g., nonguix). Before the first guix pull, copy it into place:
+
+$ mkdir --parents ~/.config/guix
+$ cp guix/.config/guix/channels.scm ~/.config/guix/channels.scm
+$ guix pull
+
+After fetching channels, guix home reconfigure takes over managing the file.
+
Files
-----
--- /dev/null
+;; Copyright (c) 2026 Jakub Czajka <jakub@ekhem.eu.org>
+;; License: GPL-3.0 or later.
+;;
+;; guix.scm - configuration for GNU Guix.
+
+(define-module (conf home guix)
+ #:use-module (conf home symlink)
+ #:use-module (gnu home services)
+ #:export (channels-service))
+
+(define channels-service
+ (service home-symlink-service-type
+ (list "guix/.config/guix/channels.scm")))
#:use-module (conf common suckless)
#:use-module (gnu packages fonts)
#:use-module (gnu packages suckless)
+ #:use-module (gnu services)
+ #:use-module (gnu services desktop)
+ #:use-module (gnu services networking)
#:use-module (gnu services xorg)
#:use-module (gnu system keyboard)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix packages)
- #:export (dwm-desktop-packages
- keyboard-layout-service))
+ #:export (dwm-desktop-packages %custom-desktop-services
+ %gdm-wayland-disabled %resolv-conf-service
+ keyboard-layout-service))
(define dmenu-libxft-bgra
(package
(xorg-configuration
(keyboard-layout
(keyboard-layout "pl")))))
+(define %gdm-wayland-disabled
+ (gdm-configuration (inherit (gdm-configuration))
+ (wayland? #f)))
+
+(define %network-manager-encrypted-dns
+ (let* ((dns-tls-file (plain-file "90-dns-over-tcp.conf"
+ "[connection]\nconnection.dns-over-tls=2\n"))
+ (dns-tls-config `(("90-dns-over-tcp.conf" ,dns-tls-file))))
+ (network-manager-configuration (inherit (network-manager-configuration))
+ (dns "none")
+ (extra-configuration-files dns-tls-config))))
+
+(define %resolv-conf-service
+ (let* ((guix-path (getenv "GUIX_PACKAGE_PATH"))
+ (resolv-conf (local-file (string-append guix-path
+ "/dns/etc/resolv.conf")))
+ (etc-files (list `("resolv.conf" ,resolv-conf))))
+ (simple-service 'resolv etc-service-type etc-files)))
+
+(define %custom-desktop-services
+ (modify-services %desktop-services
+ (gdm-service-type config => %gdm-wayland-disabled)
+ (network-manager-service-type config => %network-manager-encrypted-dns)))
(define dwm-desktop-packages
(list dmenu-libxft-bgra
--- /dev/null
+(cons* (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"))))
+ %default-channels)
-;; Copyright (c) 2022-2024 Jakub Czajka <jakub@ekhem.eu.org>
+;; Copyright (c) 2022-2026 Jakub Czajka <jakub@ekhem.eu.org>
;; License: GPL-3.0 or later.
;;
;; home.scm - home directory configuration for GNU Guix.
+;;
+;; Set PROFILE to select free-software stance:
+;; PROFILE=nonfree -- allows non-free software.
+;; PROFILE=libre -- free software only.
-(use-modules (conf home bash)
- (conf home emoji)
- (conf home desktop)
- (conf home emacs)
- (conf home notify)
- (conf home suckless)
- (gnu packages gnuzilla))
+(use-modules (gnu home)
+ (conf home bash)
+ (conf home emoji)
+ (conf home desktop)
+ (conf home emacs)
+ (conf home guix)
+ (conf home notify)
+ (conf home suckless)
+ (gnu packages gnuzilla)
+ (nongnu packages mozilla))
-(home-environment
- (packages
- (list icecat-minimal
- select-emoji
- st-libxft-bgra))
- (services
- (append
- (list autorandr-service
- notify-service
- screenshot-service)
- bash-services
- desktop-services
- emacs-services)))
+(let ((profile (string->symbol (or (getenv "PROFILE") "nonfree"))))
+ (home-environment
+ (packages (case profile
+ ((nonfree)
+ (list firefox select-emoji st-libxft-bgra))
+ ((libre)
+ (list icecat-minimal select-emoji st-libxft-bgra))))
+ (services
+ (case profile
+ ((nonfree)
+ (append (list autorandr-service channels-service notify-service
+ screenshot-service) bash-services desktop-services
+ emacs-services))
+ ((libre)
+ (append (list autorandr-service notify-service screenshot-service)
+ bash-services desktop-services emacs-services))))))
-;; Copyright (c) 2022-2025 Jakub Czajka <jakub@ekhem.eu.org>
+;; Copyright (c) 2022-2026 Jakub Czajka <jakub@ekhem.eu.org>
;; License: GPL-3.0 or later.
;;
;; system.scm - system configuration for GNU Guix.
+;;
+;; Set PROFILE to select free-software stance:
+;; PROFILE=nonfree — allows non-free firmware.
+;; PROFILE=libre — free software only.
(use-modules (conf system bluetooth)
(conf system desktop)
(conf system volume)
(gnu)
- (gnu services networking)
- (gnu services xorg)
+ (gnu system)
(gnu system nss))
-(use-package-modules base
- certs
- linux
- pulseaudio
- xdisorg)
+(use-package-modules base certs linux pulseaudio xdisorg)
-(use-service-modules desktop)
+(use-service-modules desktop networking xorg)
(use-system-modules setuid)
-(define etc-files
- (list `("resolv.conf"
- ,(local-file
- (string-concatenate
- (list (getenv "GUIX_PACKAGE_PATH")
- "/dns/etc/resolv.conf"))))))
-
-(operating-system
- (kernel linux-libre)
- (keyboard-layout
- (keyboard-layout "us"))
- (bootloader
- (bootloader-configuration
- (bootloader
- (bootloader
- (inherit grub-bootloader)
- (installer #~(const #t))))
- (keyboard-layout keyboard-layout)))
- (host-name "machine")
- (mapped-devices
- (list (mapped-device
- (source
- (uuid "565d174f-3d96-45a1-8bef-fdab38e4d35a"))
- (target "fde")
- (type luks-device-mapping))
- (mapped-device
- (source "matrix")
- (targets
- (list "matrix-rootvol" "matrix-swapvol"))
- (type lvm-device-mapping))))
- (file-systems
- (append
- (list (file-system
- (type "ext4")
- (mount-point "/")
- (device (file-system-label "root"))
- (flags '(no-atime))
- (needed-for-boot? #t)
- (dependencies mapped-devices)))
- %base-file-systems))
- (swap-devices
- (list (file-system-label "swap")))
- (users
- (append
- (list (user-account
- (name "dak")
- (group "users")
- (supplementary-groups
- (list "audio" "cdrom" "lp" "netdev" "tape" "video" "wheel"))))
- %base-user-accounts))
- (packages
- (append
- (list gnu-make
- bluez
- pulseaudio
- volume)
- dwm-desktop-packages
- %base-packages))
- (timezone "Europe/Warsaw")
- (locale "en_US.UTF-8")
- (name-service-switch %mdns-host-lookup-nss)
- (setuid-programs
- (cons*
- (setuid-program
- (program (file-append xsecurelock "/libexec/xsecurelock/authproto_pam")))
- %setuid-programs))
- (services
- (append
- (list bluez-service
- (simple-service 'resolv
- etc-service-type
- etc-files)
- keyboard-layout-service)
- (modify-services %desktop-services
- (gdm-service-type config =>
- (gdm-configuration
- (inherit config)
- (wayland? #f)))
- (network-manager-service-type config =>
- (network-manager-configuration
- (inherit config)
- (dns "none")
- (extra-configuration-files
- `(("90-dns-over-tcp.conf" ,(plain-file "90-dns-over-tcp.conf"
- "\
-[connection]
-connection.dns-over-tls=2\n"))))))))))
+(use-modules (nongnu packages linux)
+ (nongnu system linux-initrd))
+(use-modules (gnu system linux-initrd))
+
+(let ((profile (string->symbol (or (getenv "PROFILE") "nonfree"))))
+ (operating-system
+ (initrd (case profile
+ ((nonfree)
+ microcode-initrd)
+ ((libre)
+ base-initrd)))
+
+ (kernel (case profile
+ ((nonfree)
+ linux)
+ ((libre)
+ linux-libre)))
+
+ (firmware (case profile
+ ((nonfree)
+ (list linux-firmware))
+ ((libre)
+ '())))
+
+ (locale "en_US.UTF-8")
+ (timezone "Europe/Warsaw")
+
+ (keyboard-layout (keyboard-layout "us"))
+
+ (host-name "dak")
+ (users (append (list (user-account
+ (name "dak")
+ (group "users")
+ (supplementary-groups '("audio" "cdrom"
+ "lp"
+ "netdev"
+ "tape"
+ "video"
+ "wheel"))))
+ %base-user-accounts))
+
+ (bootloader (case profile
+ ((nonfree)
+ (bootloader-configuration
+ (bootloader grub-efi-bootloader)
+ (targets '("/boot/efi"))
+ (keyboard-layout keyboard-layout)))
+ ((libre)
+ (bootloader-configuration
+ (bootloader (bootloader (inherit grub-bootloader)
+ (installer #~(const #t))))
+ (keyboard-layout keyboard-layout)))))
+
+ (mapped-devices (case profile
+ ((nonfree)
+ (list (mapped-device
+ (source (uuid
+ "b8be09cf-d416-4a49-ab69-173ee227acb6"))
+ (target "root")
+ (type luks-device-mapping))))
+ ((libre)
+ (list (mapped-device
+ (source (uuid
+ "565d174f-3d96-45a1-8bef-fdab38e4d35a"))
+ (target "root")
+ (type luks-device-mapping))
+ (mapped-device
+ (source "matrix")
+ (targets (list "matrix-rootvol"
+ "matrix-swapvol"))
+ (type lvm-device-mapping))))))
+
+ (file-systems (append (case profile
+ ((nonfree)
+ (list (file-system
+ (type "ext4")
+ (mount-point "/")
+ (device (file-system-label "root"))
+ (dependencies mapped-devices))
+ (file-system
+ (type "vfat")
+ (mount-point "/boot/efi")
+ (device (file-system-label "EFI"))
+ (needed-for-boot? #t))))
+ ((libre)
+ (list (file-system
+ (type "ext4")
+ (mount-point "/")
+ (device (file-system-label "root"))
+ (flags '(no-atime))
+ (needed-for-boot? #t)
+ (dependencies mapped-devices)))))
+ %base-file-systems))
+
+ (swap-devices (list (swap-space
+ (target (file-system-label "swap"))
+ (dependencies mapped-devices))))
+
+ (name-service-switch %mdns-host-lookup-nss)
+
+ (setuid-programs (let* ((xsecurelock-path
+ "/libexec/xsecurelock/authproto_pam")
+ (xsecurelock-auth (file-append xsecurelock
+ xsecurelock-path)))
+ (cons* (setuid-program (program xsecurelock-auth))
+ %setuid-programs)))
+
+ (packages (append (list gnu-make bluez pulseaudio volume)
+ dwm-desktop-packages %base-packages))
+
+ (services
+ (append (list bluez-service %resolv-conf-service keyboard-layout-service)
+ %custom-desktop-services))))