;; 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) (ice-9 rdelim)) (use-service-modules desktop networking ssh base xorg) (use-package-modules wm certs suckless shells) (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"))) ;;(define keyboard-conf ;;(call-with-input-file "/etc/config.d/00-keyboard.conf" read-string)) ;; Partion layout for /dev/sda3 ;; under __current/ ;; | subvol | Mountpoint | Comment | Shared | ;; |-------------+--------------+--------------------+----------| ;; | arch-root | / | root for Arch | no | ;; | guixsd-root | / | root for GuixSD | no | ;; | grub | /boot/grub | grub config | yes | ;; | guix | /var/guix | guix stuff | yes | ;; | gnu | /gnu | Store etc | yes | ;; | home | /home | home partition | yes | ;; (operating-system (host-name "loke") (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 (device "/dev/sda") ;; Need to mount __current/arch-root ;; (menu-entries ;; (list ;; (menu-entry ;; (label "Arch Linux") ;; (linux "/boot/vmlinux") ;; (linux-arguments '("luks.uuid=ab43f8be-1a18-4999-836d-71dac382dfb5 luks.name=ab43f8be-1a18-4999-836d-71dac382dfb5=root luks.key=ab43f8be-1a18-4999-836d-71dac382dfb5=/boot/rootkey.bin luks.options=ab43f8be-1a18-4999-836d-71dac382dfb5=discard,luks luks.uuid=9f04f917-efd3-4036-b3f5-24705fee7ffa luks.name=9f04f917-efd3-4036-b3f5-24705fee7ffa=swap luks.key=9f04f917-efd3-4036-b3f5-24705fee7ffa=/boot/swapkey.bin luks.options=9f04f917-efd3-4036-b3f5-24705fee7ffa=swap,discard,luks root=LABEL=root resume=/dev/mapper/swap rootflags=compress=lzo,subvol=__current/arch-root")) ;; (initrd "/boot/initramfs-linux.img")))) )) ;; Kernel arguments (kernel-arguments '("rootflags=compress=lzo,subvol=__current/guixsd-root")) ;; Specify a mapped device for the encrypted root partition. ;; The UUID is that returned by 'cryptsetup luksUUID'. (mapped-devices (list (mapped-device (source (uuid "ab43f8be-1a18-4999-836d-71dac382dfb5")) (target "the-root-device") (type luks-device-mapping)) (mapped-device (source (uuid "9f04f917-efd3-4036-b3f5-24705fee7ffa")) (target "the-swap-device") (type luks-device-mapping)))) (file-systems (cons* (file-system (device "root") (title 'label) (mount-point "/boot/grub") (type "btrfs") (options "defaults,discard,compress=lzo,space_cache,autodefrag,subvol=__current/grub") (needed-for-boot? #t) (dependencies mapped-devices)) (file-system (device "root") (title 'label) (mount-point "/") (type "btrfs") (options "defaults,discard,compress=lzo,space_cache,autodefrag,subvol=__current/guixsd-root") (needed-for-boot? #t) (dependencies mapped-devices)) (file-system (device "root") (title 'label) (mount-point "/gnu") (type "btrfs") (options "defaults,discard,compress=lzo,space_cache,autodefrag,subvol=__current/gnu") (needed-for-boot? #t) (dependencies mapped-devices)) (file-system (device "root") (title 'label) (mount-point "/var/guix") (type "btrfs") (options "defaults,discard,compress=lzo,space_cache,autodefrag,subvol=__current/guix") (needed-for-boot? #t) (dependencies mapped-devices)) (file-system (device "root") (title 'label) (mount-point "/home") (type "btrfs") (options "defaults,discard,compress=lzo,space_cache,autodefrag,subvol=__current/home") (dependencies mapped-devices)) ;; (file-system ;; (device "swap") ;; (title 'label) ;; (mount-point "none") ;; (type "swap") ;; (dependencies mapped-devices)) (file-system (device "fafner:/srv/nfs4/Valhalla") (title 'device) (mount-point "/media/Valhalla") (type "nfs4") ;; (options "defaults") (mount? #f) (check? #f)) %base-file-systems)) (swap-devices '("/dev/mapper/the-swap-device")) (users (cons plattfot %base-user-accounts)) ;; Add a bunch of window managers; we can choose one at ;; the log-in screen with F1. (packages (cons* i3-wm i3status dmenu ;window managers 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 (cons* (service openssh-service-type (openssh-configuration (port-number 6060))) (extra-special-file "/bin/env" (file-append coreutils "/bin/env")) %desktop-services ;; (modify-services %desktop-services ;; (slim-service-type ;; config => (slim-configuration ;; (inherit config) ;; (startx (xorg-start-command ;; #:configuration-file ;;(xorg-configuration-file ;;#:extra-config ;;(list keyboard-conf))))))) )) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss))