Browse Source

Initial system configs

master
David Trudgian 1 year ago
commit
842215a023
  1. 7
      README.md
  2. 160
      system/lappy-config.scm
  3. 202
      system/piran-config.scm

7
README.md

@ -0,0 +1,7 @@
# Guix Configurations
These are my Guix configurations.
- `system/` - `/etc/config.scm` files for different systems
- `user/` - user manifests

160
system/lappy-config.scm

@ -0,0 +1,160 @@
;;; lappy.randomroad.net
;;; Thinkpad T430
;; Base guix
(use-modules (gnu))
;; Services to be brought in
(use-service-modules
audio ; for mpd
cups ; printing
desktop ; standard desktop stuff
networking ; standard network stuff
xorg) ; X GUI
;; Package modules needed for vars used later
(use-package-modules cups wm)
;; nonguix - machine has Intel WiFi
(use-modules (nongnu packages linux))
;; Here it is...
(operating-system
;; Use the nonguix kernel and firmware, as this machine has intel WiFi
(kernel linux)
(firmware (list linux-firmware))
;; Who am I?
(host-name "lappy.randomroad.net")
;; Localization
(locale "en_US.utf8")
(timezone "America/Chicago")
(keyboard-layout
(keyboard-layout "us" "altgr-intl"))
;; Boot
(bootloader
(bootloader-configuration
(bootloader grub-efi-bootloader)
(target "/boot/efi")
(keyboard-layout keyboard-layout)))
;; LUKS & RAID devices
(mapped-devices
(list (mapped-device
(source
(uuid "753bf798-1414-4623-a7b4-045ada0d54ad"))
(target "cryptroot")
(type luks-device-mapping))
(mapped-device
(source
(uuid "3f7468d3-3694-406b-b868-467fe8706588"))
(target "crypthome")
(type luks-device-mapping))))
;; fstab entries
(file-systems
(cons* (file-system
(mount-point "/boot/efi")
(device (uuid "CB9A-360D" 'fat32))
(type "vfat"))
(file-system
(mount-point "/")
(device "/dev/mapper/cryptroot")
(type "ext4")
(dependencies mapped-devices))
(file-system
(mount-point "/home")
(device "/dev/mapper/crypthome")
(type "ext4")
(dependencies mapped-devices))
%base-file-systems))
;; Only me :-)
(users (cons* (user-account
(name "dave")
(comment "David Trudgian")
(group "users")
(home-directory "/home/dave")
(supplementary-groups
'("wheel" "netdev" "audio" "video")))
%base-user-accounts))
;; Base set of packages for sensible i3 environment
(packages
(append
(map specification->package
'(
;; Minimal tools and editors
"curl"
"emacs"
"file"
"git"
"mdadm"
"nss-certs"
"openssh"
"screen"
"tmux"
"unzip"
"vim"
"wget"
"zip"
;; Required for localization to work
"glibc-locales"
;; Font sets
"font-dejavu"
"font-fira-code"
"font-fira-mono"
"font-fira-sans"
"font-liberation"
;; Make sure we have complete icon set
"adwaita-icon-theme"
"gnome-icon-theme"
"hicolor-icon-theme"
;; i3 basics
"dmenu"
"dunst"
"i3-gaps"
"i3status"
"i3lock"
"rofi"
"rxvt-unicode"
"xrdb"
;; Desktop integration stuff
"xdg-utils"
"gnome-keyring"
"libgnome-keyring"
;; Flatpak for some apps - e.g. Nextcloud client
"flatpak"
))
%base-packages))
;; Services to run here
(services
(append
(list
;; Configure X with kb layout
(set-xorg-configuration
(xorg-configuration
(keyboard-layout keyboard-layout)))
;; CUPS printer service, for HP inkjet
(service cups-service-type
(cups-configuration
(extensions
(list cups-filters hplip-minimal))))
;; mpd music player daemon
(service mpd-service-type
(mpd-configuration
(user "dave")
(music-dir "~/Music/FLAC"))))
%desktop-services)))

202
system/piran-config.scm

@ -0,0 +1,202 @@
;;; piran.randomroad.net
;;; Ryzen / Radeon Desktop
;; Base guix
(use-modules (gnu))
;; Services to be brought in
(use-service-modules
audio ; for mpd
cups ; printing
desktop ; standard desktop stuff
docker ; containers :-)
networking ; standard network stuff
ssh ; ssh server
virtualization ; libvirtd
xorg) ; X GUI
;; Package modules needed for vars used later
(use-package-modules cups wm)
;; nonguix - Need Radeon firmware
(use-modules (nongnu packages linux))
;; Here it is...
(operating-system
;; Use the nonguix kernel and firmware, as this machine has a Radeon RX550
;; that requires non-free firmware for modesetting.
(kernel linux)
(firmware (list linux-firmware))
;; Who am I?
(host-name "piran.randomroad.net")
;; Localization
(locale "en_US.utf8")
(timezone "America/Chicago")
(keyboard-layout
(keyboard-layout "us" "altgr-intl"))
;; Boot
(bootloader
(bootloader-configuration
(bootloader grub-efi-bootloader)
(target "/boot/efi")
(keyboard-layout keyboard-layout)))
;; LUKS & RAID devices
(mapped-devices
(list (mapped-device
(source
(uuid "7a71ae51-d832-4613-893b-b75de53ccf97"))
(target "cryptroot")
(type luks-device-mapping))
(mapped-device
(source
(uuid "0ef294e8-443b-4c5d-afc7-5d8306b1fe42"))
(target "crypthome")
(type luks-device-mapping))
;; Additional scratch SSD
(mapped-device
(source
(uuid "852f5a67-ece4-44a5-ba1b-caf034786d71"))
(target "cryptscratch")
(type luks-device-mapping))))
;; fstab entries
(file-systems
(cons* (file-system
(mount-point "/boot/efi")
(device (uuid "C784-BC84" 'fat32))
(type "vfat"))
(file-system
(mount-point "/")
(device "/dev/mapper/cryptroot")
(type "ext4")
(dependencies mapped-devices))
(file-system
(mount-point "/home")
(device "/dev/mapper/crypthome")
(type "ext4")
(dependencies mapped-devices))
;; Additional scratch ssd
(file-system
(mount-point "/scratch")
(device "/dev/mapper/cryptscratch")
(type "ext4")
(dependencies mapped-devices))
%base-file-systems))
;; Only me :-)
(users (cons* (user-account
(name "dave")
(comment "David Trudgian")
(group "users")
(home-directory "/home/dave")
(supplementary-groups
'("wheel" "netdev" "audio" "video")))
%base-user-accounts))
;; Base set of packages for sensible i3 environment
(packages
(append
(map specification->package
'(
;; Minimal tools and editors
"curl"
"cryptsetup"
"emacs"
"file"
"git"
"mdadm"
"nss-certs"
"openssh"
"screen"
"squashfs-tools"
"tmux"
"unzip"
"vim"
"wget"
"zip"
;; Required for localization to work
"glibc-locales"
;; Font sets
"font-dejavu"
"font-fira-code"
"font-fira-mono"
"font-fira-sans"
"font-liberation"
;; Full icon set
"adwaita-icon-theme"
"gnome-icon-theme"
"hicolor-icon-theme"
;; i3 basics
"dmenu"
"dunst"
"i3-gaps"
"i3status"
"i3lock"
"rofi"
"rxvt-unicode"
"xrdb"
;; Desktop integration stuff
"xdg-utils"
"gnome-keyring"
"libgnome-keyring"
;; Flatpak for some apps - e.g. Nextcloud client
"flatpak"
;; Virtualization & container management
"docker-cli"
"docker-compose"
"virt-manager"
))
%base-packages))
;; Services to run here
(services
(append
(list
;; Run SSH server here
(service openssh-service-type)
;; Configure X with kb layout
(set-xorg-configuration
(xorg-configuration
(keyboard-layout keyboard-layout)))
;; CUPS printer service, for HP inkjet
(service cups-service-type
(cups-configuration
(extensions
(list cups-filters hplip-minimal))))
;; mpd music player daemon
(service mpd-service-type
(mpd-configuration
(user "dave")
(music-dir "~/Music/FLAC")))
;; docker containers
(service docker-service-type)
;; libvirt for VMs
(service libvirt-service-type
(libvirt-configuration
(unix-sock-group "libvirt")
(tls-port "16555")))
(service virtlog-service-type
(virtlog-configuration
(max-clients 1000)))
;; Use binfmt_misc for arm, arm64 and POWER binary execution
(service qemu-binfmt-service-type
(qemu-binfmt-configuration
(platforms (lookup-qemu-platforms "arm" "aarch64" "ppc64le")))))
%desktop-services)))
Loading…
Cancel
Save