118 lines
3.2 KiB
Scheme
118 lines
3.2 KiB
Scheme
(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))
|
|
|
|
(use-service-modules desktop xorg)
|
|
|
|
(use-package-modules bootloaders certs emacs emacs-xyz fonts readline terminals version-control wm xorg)
|
|
|
|
(define %local-filesystem
|
|
(call-with-input-file "/etc/config.scm"
|
|
(lambda (port)
|
|
(read port)
|
|
(read port)
|
|
(eval (cadar (last-pair (read port)))
|
|
(interaction-environment)))))
|
|
|
|
(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
|
|
(cdr
|
|
(list-ref os-list
|
|
(- os-list-length 2)))
|
|
(interaction-environment))))))
|
|
|
|
(operating-system
|
|
(host-name "ziltis-machine")
|
|
(timezone "Europe/Berlin")
|
|
(locale "de_DE.utf8")
|
|
(keyboard-layout
|
|
(keyboard-layout "de" #:options '("caps:swapescape")))
|
|
(bootloader
|
|
(bootloader-configuration
|
|
(bootloader grup-efi-bootloader)
|
|
(targets
|
|
'("/boot/efi"))
|
|
(keyboard-layout keyboard-layout)))
|
|
(file-systems %local-filesystem)
|
|
(swap-devices %local-swap)
|
|
(users
|
|
(cons*
|
|
(user-account
|
|
(name "zilti")
|
|
(group "users")
|
|
(supplementary-groups
|
|
'("wheel" "netdev" "audio" "video" "libvirt")))
|
|
%base-user-accounts))
|
|
(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))
|
|
(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)))
|
|
))
|
|
(name-service-switch %mdns-host-lookup-nss))
|