guixconfig/config.scm

120 lines
3.3 KiB
Scheme
Raw Normal View History

2023-12-01 13:32:56 +00:00
(use-modules
(gnu)
(gnu image)
(gnu services authentication)
(gnu services base)
(gnu services dbus)
(gnu services desktop)
(gnu services linux)
(gnu services networking)
(gnu services pm)
(gnu services virtualization)
(gnu services xorg)
(gnu system nss))
2023-11-28 21:38:47 +00:00
2023-12-01 13:27:53 +00:00
(use-service-modules desktop xorg)
2023-11-28 21:38:47 +00:00
2023-12-01 13:27:53 +00:00
(use-package-modules bootloaders certs emacs emacs-xyz fonts readline terminals version-control wm xorg)
2023-11-28 21:38:47 +00:00
2023-11-30 12:34:55 +00:00
(define %local-filesystem
(call-with-input-file "/etc/config.scm"
(lambda (port)
(read port)
(read port)
2023-11-30 12:39:17 +00:00
(eval (cadar (last-pair (read port)))
(interaction-environment)))))
2023-11-30 12:34:55 +00:00
2023-12-01 13:22:33 +00:00
(define %local-swap
(call-with-input-file "/etc/config.scm"
(lambda (port)
(read port)
(read port)
(let* ((os-list (read port))
(os-list-length (length os-list)))
(eval
2023-12-01 13:34:09 +00:00
(cadr
2023-12-01 13:22:33 +00:00
(list-ref os-list
(- os-list-length 2)))
(interaction-environment))))))
2023-11-28 21:38:47 +00:00
(operating-system
(host-name "ziltis-machine")
(timezone "Europe/Berlin")
(locale "de_DE.utf8")
2023-11-29 13:08:49 +00:00
(keyboard-layout
2023-12-01 13:22:33 +00:00
(keyboard-layout "de" #:options '("caps:swapescape")))
2023-11-28 22:38:08 +00:00
(bootloader
(bootloader-configuration
2023-12-01 13:34:54 +00:00
(bootloader grub-efi-bootloader)
2023-11-28 22:38:08 +00:00
(targets
'("/boot/efi"))
(keyboard-layout keyboard-layout)))
2023-11-30 12:34:55 +00:00
(file-systems %local-filesystem)
2023-12-01 13:22:33 +00:00
(swap-devices %local-swap)
2023-11-28 22:38:08 +00:00
(users
2023-11-29 12:01:54 +00:00
(cons*
(user-account
(name "zilti")
(group "users")
(supplementary-groups
2023-12-01 13:22:33 +00:00
'("wheel" "netdev" "audio" "video" "libvirt")))
2023-11-28 22:38:08 +00:00
%base-user-accounts))
2023-12-01 13:22:33 +00:00
(packages
(append
(list emacs emacs-desktop-environment font-terminus git nss-certs readline swayfx)
%base-packages))
(services
(append
(modify-services
%desktop-services
(delete login-service-type)
(delete mingetty-service-type)
(delete console-font-service-type))
2023-12-01 13:37:15 +00:00
(concat
(list
(tlp-service-type
(tlp-configuration))
(thermald-service-type
(thermald-configuration
(adaptive? t)))
(bluetooth-service-type
(bluetooth-configuration))
(earlyoom-service-type
(earlyoom-configuration
(minimum-available-memory 5)
(minimum-free-swap 5)))
(inputattach-service-type
(inputattach-configuration))
(libvirt-service-type
(libvirt-configuration
(unix-sock-group "libvirt")))
(fstrim-service-type
(fstrim-configuration))
(fprintd-service-type
(fprintd-configuration)))
(service greetd-service-type
(greetd-configuration
(greeter-supplementary-groups
(list "video" "input"))
(terminals
(list
(greetd-terminal-configuration
(terminal-vt "7")
(terminal-switch #t)
(default-session-command
(greetd-wlgreet-session
(command
(file-append swayfx "/bin/sway")))))
(greetd-terminal-configuration
(terminal-vt "8"))))))
(service screen-locker-service-type
(screen-locker-configuration
(name "swaylock")
(program
(file-append swaylock-effects "/bin/swaylock"))
(using-setuid? #f)))
)))
2023-11-28 21:38:47 +00:00
(name-service-switch %mdns-host-lookup-nss))