aboutsummaryrefslogtreecommitdiff
path: root/systems
diff options
context:
space:
mode:
authorKenny Ballou <kb@devnulllabs.io>2022-02-10 10:48:46 -0700
committerKenny Ballou <kb@devnulllabs.io>2022-03-14 11:14:48 -0600
commit0139d8098bc9e88090784c4f88820d42e6d117e5 (patch)
treeff3dcaaa1204250f886b3d51d1d54650ed25444b /systems
parent1e161dbf25f1a127ac6e0677b473a2b2987536d6 (diff)
downloaddotfiles-0139d8098bc9e88090784c4f88820d42e6d117e5.tar.gz
dotfiles-0139d8098bc9e88090784c4f88820d42e6d117e5.tar.xz
not so initial guix home/system initial addition
As of today, I've been using guix system and home for about 3 weeks. The configuration is constantly evolving as I use it. Unlike the home-manager conversion of past, guix home adoption is happening much more slowly. Signed-off-by: Kenny Ballou <kb@devnulllabs.io>
Diffstat (limited to 'systems')
-rw-r--r--systems/daeva.scm153
-rw-r--r--systems/h4x.scm269
2 files changed, 422 insertions, 0 deletions
diff --git a/systems/daeva.scm b/systems/daeva.scm
new file mode 100644
index 00000000..05a1579d
--- /dev/null
+++ b/systems/daeva.scm
@@ -0,0 +1,153 @@
+(define-module (systems daeva)
+ #:use-module (guix)
+ #:use-module (guix records)
+ #:use-module (guix utils)
+ #:use-module (gnu)
+ #:use-module (gnu packages)
+ #:use-module (gnu services avahi)
+ #:use-module (gnu services base)
+ #:use-module (gnu services cups)
+ #:use-module (gnu services dbus)
+ #:use-module (gnu services desktop)
+ #:use-module (gnu services linux)
+ #:use-module (gnu services mcron)
+ #:use-module (gnu services networking)
+ #:use-module (gnu services nix)
+ #:use-module (gnu services pm)
+ #:use-module (gnu services security-token)
+ #:use-module (gnu services xorg)
+ #:use-module (gnu system nss)
+ #:use-module (gnu packages gnome)
+ #:use-module (nongnu packages linux)
+ #:use-module (nongnu packages mozilla)
+ #:use-module (nongnu packages printers)
+ #:use-module (nongnu system linux-initrd)
+ #:use-module (kbg)
+ #:use-module (kbg packages profiles base)
+ #:use-module (kbg packages profiles desktop)
+ #:use-module (kbg packages gnome)
+ #:use-module (kbg services desktop)
+ #:use-module (kbg system xorg))
+
+(define nix-gc-job
+ #~(job "5 1 * * *"
+ "nix-collect-garbage --delete-old"))
+
+(define garbage-collector-job
+ #~(job "5 0 * * *"
+ "guix gc --free-space 50G"))
+
+(define install-grub-efi-removable
+ #~(lambda (bootloader efi-dir mount-point)
+ (when efi-dir
+ (let ((grub-install (string-append bootloader "/sbin/grub-install"))
+ (install-dir (string-append mount-point "/boot"))
+ (target-esp (if (file-exists? (string-append mount-point efi-dir))
+ (string-append mount-point efi-dir)
+ efi-dir)))
+ (setenv "GRUB_ENABLE_CRYPTODISK" "y")
+ (invoke/quiet grub-install "--boot-directory" install-dir
+ "--efi-directory" target-esp
+ "--removable")))))
+
+(define grub-efi-removable
+ (bootloader
+ (inherit grub-efi-bootloader)
+ (installer install-grub-efi-removable)))
+
+(define daeva-system
+ (operating-system
+ (kernel linux)
+ (firmware (list linux-firmware))
+ (initrd microcode-initrd)
+ (host-name "daeva")
+ (timezone "America/Boise")
+ (locale "en_US.utf8")
+
+ (initrd-modules (append (list "dm-raid" "raid1")
+ %base-initrd-modules))
+
+ (keyboard-layout (keyboard-layout "us" #:options '("ctrl:nocaps")))
+
+ (bootloader (bootloader-configuration
+ (bootloader grub-efi-removable)
+ (targets '("/boot/efi"))
+ (keyboard-layout keyboard-layout)))
+
+ (mapped-devices
+ (list (mapped-device
+ (source (list "/dev/nvme0n1p1" "/dev/nvme1n1p1"))
+ (target "/dev/md126")
+ (type raid-device-mapping))
+ (mapped-device
+ (source (list "/dev/nvme0n1p2" "/dev/nvme1n1p2"))
+ (target "/dev/md127")
+ (type raid-device-mapping))
+ (mapped-device
+ (source (uuid "e2690af0-3fa8-4d6c-bccc-d534ce418e20"))
+ (target "luks-e2690af0-3fa8-4d6c-bccc-d534ce418e20")
+ (type luks-device-mapping))))
+
+ (file-systems (append
+ (list (file-system
+ ;; (device (uuid "16ced1b2-3e7f-4d04-a34e-b10ff033f67b"))
+ (device "/dev/mapper/luks-e2690af0-3fa8-4d6c-bccc-d534ce418e20")
+ (mount-point "/")
+ (type "ext4")
+ (dependencies mapped-devices))
+ (file-system
+ ;; (device (uuid "F134-4F4E" 'fat))
+ (device "/dev/md126")
+ (mount-point "/boot/efi")
+ (type "vfat")
+ (dependencies mapped-devices)))
+ %base-file-systems))
+
+ (swap-devices (list (swap-space (target "/swapfile")
+ (dependencies mapped-devices))))
+
+ (users (cons (user-account
+ (name "kb")
+ (group "users")
+ (supplementary-groups '("audio"
+ "input"
+ "kvm"
+ "lp"
+ "netdev"
+ "tty"
+ "video"
+ "wheel")))
+ %base-user-accounts))
+
+ ;; This is where we specify system-wide packages.
+ (packages (append %kbg-base-packages
+ %kbg-bare-desktop-packages
+ %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
+ (gnome-desktop-configuration
+ (gnome gnome-sans-ssh-agent)))
+ ;;(geoclue-service)
+ (bluetooth-service #:auto-enable? #t)
+ (service cups-service-type)
+ (set-xorg-configuration
+ (xorg-configuration
+ (keyboard-layout keyboard-layout)
+ (extra-config (list %xorg-libinput-config))))
+ (service nix-service-type)
+ (service pcscd-service-type)
+ (service tlp-service-type)
+ (simple-service 'my-cron-jobs
+ mcron-service-type
+ (list garbage-collector-job
+ nix-gc-job)))
+ %kbg-desktop-services))
+
+ ;; Allow resolution of '.local' host names with mDNS.
+ (name-service-switch %mdns-host-lookup-nss)))
+
+daeva-system
diff --git a/systems/h4x.scm b/systems/h4x.scm
new file mode 100644
index 00000000..55b606b2
--- /dev/null
+++ b/systems/h4x.scm
@@ -0,0 +1,269 @@
+;; This is an operating system configuration template
+;; for a "desktop" setup with GNOME and Xfce where the
+;; root partition is encrypted with LUKS, and a swap file.
+
+(use-modules (guix)
+ (guix utils)
+ (gnu)
+ (gnu system nss)
+ (nongnu packages linux)
+ (nongnu packages mozilla)
+ (nongnu packages printers)
+ (nongnu system linux-initrd))
+(use-service-modules avahi
+ base
+ cups
+ dbus
+ desktop
+ linux
+ mcron
+ networking
+ nix
+ security-token
+ xorg)
+(use-package-modules admin
+ aspell
+ base
+ bash
+ bittorrent
+ bootloaders
+ certs
+ code
+ compression
+ cryptsetup
+ cups
+ disk
+ ebook
+ emacs
+ engineering
+ entr
+ file
+ fontutils
+ fonts
+ freedesktop
+ gawk
+ gimp
+ gnome
+ gnupg
+ graphviz
+ groff
+ gstreamer
+ idutils
+ image
+ kde
+ less
+ libusb
+ linux
+ lsof
+ music
+ ncdu
+ networking
+ nfs
+ package-management
+ password-utils
+ patchutils
+ parallel
+ pciutils
+ pv
+ rsync
+ rust-apps
+ security-token
+ ssh
+ shells
+ shellutils
+ sync
+ terminals
+ textutils
+ time
+ tls
+ tmux
+ version-control
+ video
+ vim
+ vpn
+ w3m
+ web
+ wget
+ wordnet
+ xorg)
+
+(define garbage-collector-job
+ #~(job "5 0 * * *"
+ "guix gc -F 1G"))
+
+(operating-system
+ ;; (kernel linux)
+ ;; (firmware linux-firmware)
+ (initrd microcode-initrd)
+ (host-name "h4x")
+ (timezone "America/Boise")
+ (locale "en_US.utf8")
+ (keyboard-layout (keyboard-layout "us" #:options '("ctrl:nocaps")))
+
+ (bootloader (bootloader-configuration
+ (bootloader grub-bootloader)
+ (terminal-outputs '(console))
+ (targets (list "/dev/disk/by-id/wwn-0x5002538e000c21b7"
+ "/dev/disk/by-id/wwn-0x5002538e40de02bf"))
+ (keyboard-layout keyboard-layout)))
+
+ (initrd-modules (append (list "dm-raid" "raid1")
+ %base-initrd-modules))
+
+ (mapped-devices
+ (list
+ (mapped-device
+ (source (list "/dev/sda2" "/dev/sdb2"))
+ (target "/dev/md0")
+ (type raid-device-mapping))
+ (mapped-device
+ (source (uuid "80e61014-c20d-428e-b7f2-c4dd206a3ade"))
+ (target "luks-80e61014-c20d-428e-b7f2-c4dd206a3ade")
+ (type luks-device-mapping))))
+
+ (file-systems (append
+ (list (file-system
+ (device (uuid "4bceee1a-23e3-484a-965c-04707e81b1f8"))
+ (mount-point "/")
+ (type "ext4")
+ (dependencies mapped-devices)))
+ %base-file-systems))
+
+ ;; Specify a swap file for the system, which resides on the
+ ;; root file system.
+ (swap-devices
+ (list (swap-space
+ (target "/swapfile")
+ (dependencies mapped-devices))))
+
+ (users (cons (user-account
+ (name "kb")
+ (password (crypt "alice" "$6$abc"))
+ (group "users")
+ (supplementary-groups '("wheel" "netdev"
+ "audio" "video")))
+ %base-user-accounts))
+
+ ;; This is where we specify system-wide packages.
+ (packages (append (list
+ aria2
+ aspell-dict-en
+ bash-completion
+ calibre
+ cryptsetup
+ diffstat
+ diffutils
+ dos2unix
+ dot2tex
+ emacs
+ entr
+ ethtool
+ exiv2
+ fd
+ fdisk
+ ffmpeg
+ file
+ findutils
+ firefox
+ font-dejavu
+ font-google-noto
+ fontconfig
+ ;; freecad
+ fzf
+ gawk
+ gimp
+ git
+ gnome-tweaks
+ gnupg
+ gnutls
+ gptfdisk
+ grep
+ groff
+ gstreamer
+ gst-plugins-bad
+ gst-plugins-base
+ gst-plugins-good
+ gst-plugins-ugly
+ gvfs
+ hplip
+ hplip-plugin
+ htop
+ iotop
+ iperf
+ jq
+ kcachegrind
+ kitty
+ less
+ lsof
+ ltrace
+ mtr
+ ncdu
+ nfs-utils
+ nmap
+ nss-certs
+ okular
+ openssh
+ openssl
+ parallel
+ patch
+ patchutils
+ pciutils
+ perf
+ picard
+ progress
+ pv
+ pwgen
+ rclone
+ renameutils
+ ripgrep
+ rsync
+ sed
+ smartmontools
+ socat
+ stow
+ strace
+ tar
+ tcpdump
+ time
+ tmux
+ tree
+ unzip
+ util-linux
+ vim
+ vlc
+ w3m
+ wget
+ which
+ whois
+ wireguard-tools
+ wordnet
+ xdg-utils
+ xev
+ xfsprogs
+ xkill
+ xz
+ yubikey-personalization
+ zip
+ zsh
+ zsh-syntax-highlighting)
+ %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)
+ ;;(geoclue-service)
+ (service cups-service-type)
+ (set-xorg-configuration
+ (xorg-configuration
+ (keyboard-layout keyboard-layout)))
+ (service nix-service-type)
+ (service pcscd-service-type)
+ (simple-service 'my-cron-jobs
+ mcron-service-type
+ (list garbage-collector-job)))
+ %kbg-desktop-services))
+
+ ;; Allow resolution of '.local' host names with mDNS.
+ (name-service-switch %mdns-host-lookup-nss))