;; This is an operating system configuration template ;; for a "desktop" setup without full-blown desktop ;; environments. (use-modules (gnu) (gnu packages) (gnu system nss) (gnu system locale) (gnu services nfs) (gnu services sddm) (ice-9 rdelim) (ice-9 format) (srfi srfi-1)) (use-service-modules desktop networking ssh base xorg) (use-package-modules wm certs shells xdisorg display-managers) (define plattfot (user-account (name "plattfot") (group "users") ;; Define a G-Expr to find the path of the zsh binary: ;; https://gitlab.com/rain1/guix-wiki/wikis/FAQ#how-do-i-make-my-login-shell-zsh ;;(shell #~(string-append #$zsh "/bin/zsh")) (supplementary-groups '("wheel" "netdev" "audio" "video")) (home-directory "/home/plattfot"))) ;; Specify a mapped device for the encrypted root partition. ;; The UUID is that returned by 'cryptsetup luksUUID'. (define mapped-swap (mapped-device (source (uuid "3f1a433f-e3d5-46f1-8471-b0cfee72a659")) (target "swap") (type luks-device-mapping))) (define mapped-root (mapped-device (source (uuid "0633603e-019c-4be0-b35e-abb055660909")) (target "root") (type luks-device-mapping))) ;; Partion layout for `root` ;; | subvol | Mountpoint | Comment | Shared | ;; |-----------+------------+--------------------+--------| ;; | @ | / | root for Guix | no | ;; | @home | /home | home partition | yes | (define btrfs-common-options '("discard" "compress=lzo" "space_cache" "autodefrag")) (define (btrfs-mount-options subvol) "Return the btrfs mount options I use. Where SUBVOL is the subvolume to mount" (string-join `(,@btrfs-common-options ,(format #f "subvol=~a" subvol)) ",")) (define fs-root (file-system (mount-point "/") (type "btrfs") (device (file-system-label "root")) (options (btrfs-mount-options "@")) (needed-for-boot? #t) (dependencies `(,mapped-root)))) (define fs-home (file-system (mount-point "/home") (type "btrfs") (device (file-system-label "root")) (options (btrfs-mount-options "@home")) (needed-for-boot? #t) (dependencies `(,fs-root)))) (define nfs-valhalla (file-system (device "fafner:/srv/nfs4/Valhalla") (mount-point "/media/Valhalla") (type "nfs4") (mount? #f) (check? #f))) (operating-system (host-name "heimdal") (timezone "Canada/Pacific") (locale "en_US.utf8") (locale-definitions (list (locale-definition (name "en_US.utf8") (source "en_US") (charset "UTF-8")) (locale-definition (name "sv_SE.utf8") (source "sv_SE") (charset "UTF-8")))) ;; Assuming /dev/sda is the target hard disk, and "root" ;; is the label of the target root file system. (bootloader (grub-configuration (target "/dev/sda"))) ;; Kernel arguments (kernel-arguments '("rootflags=compress=lzo,subvol=@")) (mapped-devices (list mapped-root mapped-swap)) (file-systems (cons* fs-root fs-home nfs-valhalla %base-file-systems)) (swap-devices '("/dev/mapper/swap")) (users (cons plattfot %base-user-accounts)) (keyboard-layout (keyboard-layout "us" #:options '("ctrl:swapcaps"))) (packages (cons* sway waybar rofi guix-simplyblack-sddm-theme ;;zsh nss-certs ;for HTTPS access %base-packages)) ;; Use the "desktop" services, which include the X11 ;; log-in service, networking with Wicd, and more. (services ;;%desktop-services (cons* (service openssh-service-type (openssh-configuration (port-number 6060) (password-authentication? #f))) (extra-special-file "/bin/env" (file-append coreutils "/bin/env")) (service sddm-service-type (sddm-configuration (display-server "wayland") (theme "guix-simplyblack-sddm"))) (remove (lambda (service) (member (service-kind service) (list gdm-service-type ))) %desktop-services))) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss))