Skip to content

Instantly share code, notes, and snippets.

@thor314
Last active November 30, 2021 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thor314/378deae85b474c947c5b34ecdc9e3b22 to your computer and use it in GitHub Desktop.
Save thor314/378deae85b474c947c5b34ecdc9e3b22 to your computer and use it in GitHub Desktop.
;; This is an operating system configuration template
;; for a "desktop" setup with GNOME and Xfce where the
;; root partition is encrypted with LUKS.
(use-modules (gnu) (gnu system nss))
(use-service-modules desktop xorg)
(use-package-modules certs gnome)
(operating-system
(host-name "tk0") ;; 0
(timezone "Europe/Lisbon") ;; 1
(locale "en_US.utf8")
;; Choose US English keyboard layout. The "altgr-intl"
;; variant provides dead keys for accented characters.
(keyboard-layout
(keyboard-layout "us" "dvorak")) ;; 2
;; Use the UEFI variant of GRUB with the EFI System
;; Partition mounted on /boot/efi.
(bootloader
(bootloader-configuration
(bootloader grub-efi-bootloader)
(target "/boot/efi") ;; *** don't think I change this?
(keyboard-layout keyboard-layout)))
;; 3 kill the mapped device section
(file-systems
(append
(list
(file-system
(device (file-system-label "root")) ;; 4 change to root
(mount-point "/")
(type "ext4")) ;; 5 remove dependencies line
(file-system
(device "/dev/nvme0n1p1") ;; 6 update
(mount-point "/boot/efi")
(type "vfat")))
%base-file-systems))
;; Create user `bob' with `alice' as its initial password.
(users (cons (user-account
(name "thor") ;; 7 update
(comment "") ;; 8
(password (crypt "thor" "$6$abc")) ;; 9
(group "users")
(supplementary-groups '("wheel" "netdev"
"audio" "video")))
%base-user-accounts))
;; This is where we specify system-wide packages.
(packages (append (list
;; for HTTPS access
nss-certs
;; for user mounts
gvfs)
%base-packages))
;; Add GNOME and Xfce---we can choose at the log-in screen
;; by clicking the gear. Use the "desktop" services, which
;; include the X11 log-in service, networking with
;; NetworkManager, and more.
(services (append (list (service gnome-desktop-service-type)
(service xfce-desktop-service-type)
(set-xorg-configuration
(xorg-configuration
(keyboard-layout keyboard-layout))))
%desktop-services))
;; Allow resolution of '.local' host names with mDNS.
(name-service-switch %mdns-host-lookup-nss))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment