guixconfig/config.scm

129 lines
3.2 KiB
Scheme
Raw Normal View History

2023-11-28 22:38:08 +00:00
(use-modules
(gnu)
(gnu services base)
2023-11-29 13:26:42 +00:00
(gnu services dbus)
2023-11-29 13:23:45 +00:00
(gnu services desktop)
2023-11-29 13:29:39 +00:00
(gnu services linux)
2023-11-28 22:38:08 +00:00
(gnu services networking)
(gnu services pm)
2023-11-29 13:30:36 +00:00
(gnu services virtualization)
2023-11-29 13:23:45 +00:00
(gnu services xorg)
2023-11-28 22:38:08 +00:00
(gnu system nss))
2023-11-28 21:38:47 +00:00
2023-12-01 13:22:33 +00:00
(use-service-modules
(desktop)
(xorg))
2023-11-28 21:38:47 +00:00
2023-12-01 13:22:33 +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
(cdr
(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:22:33 +00:00
(bootloader grup-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))
(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)))
2023-11-30 16:33:09 +00:00
(service greetd-service-type
2023-11-28 22:38:08 +00:00
(greetd-configuration
(greeter-supplementary-groups
2023-11-29 13:55:55 +00:00
(list "video" "input"))
2023-11-28 22:38:08 +00:00
(terminals
(list
2023-12-01 09:35:45 +00:00
(greetd-terminal-configuration
2023-11-29 19:47:22 +00:00
(terminal-vt "7")
2023-11-28 22:38:08 +00:00
(terminal-switch #t)
2023-11-30 16:23:52 +00:00
(default-session-command
2023-11-30 16:33:09 +00:00
(greetd-wlgreet-session
2023-11-30 15:41:40 +00:00
(command
2023-12-01 09:35:45 +00:00
(file-append swayfx "/bin/sway")))))
2023-11-30 16:36:27 +00:00
(greetd-terminal-configuration
(terminal-vt "8"))))))
2023-11-28 22:38:08 +00:00
(service screen-locker-service-type
(screen-locker-configuration
(name "swaylock")
2023-11-30 14:36:07 +00:00
(program
(file-append swaylock-effects "/bin/swaylock"))
2023-11-28 22:38:08 +00:00
(using-setuid? #f)))
2023-12-01 13:22:33 +00:00
))
2023-11-28 21:38:47 +00:00
(name-service-switch %mdns-host-lookup-nss))