guixconfig/config.scm

174 lines
4.5 KiB
Scheme
Raw Normal View History

2023-12-01 14:30:07 +00:00
;; Modules
2023-11-28 21:38:47 +00:00
2023-12-01 14:30:07 +00:00
;; #+NAME: module-list
;; - 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
;; [[file:config.org::*Modules][Modules:1]]
2023-12-11 10:59:44 +00:00
nil
2023-12-01 14:30:07 +00:00
;; Modules:1 ends here
;; Service Modules
;; #+NAME: service-module-list
;; - desktop
;; - xorg
;; [[file:config.org::*Service Modules][Service Modules:1]]
2023-12-11 10:59:44 +00:00
nil
2023-12-01 14:30:07 +00:00
;; Service Modules:1 ends here
;; Package Modules
;; #+NAME: package-module-list
;; - bootloaders
;; - certs
;; - emacs
;; - emacs-xyz
;; - fonts
;; - readline
;; - terminals
;; - version-control
;; - wm
;; - xorg
2023-11-28 21:38:47 +00:00
2023-12-01 14:30:07 +00:00
;; [[file:config.org::*Package Modules][Package Modules:1]]
2023-12-11 10:59:44 +00:00
nil
2023-12-01 14:30:07 +00:00
;; Package Modules:1 ends here
;; File System
2023-11-28 21:38:47 +00:00
2023-12-01 14:30:07 +00:00
;; The variable ~%local-filesystem~ extracts the file system definitions from the installer-provided
;; =config.scm= file.
;; [[file:config.org::*File System][File System:1]]
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-12-01 14:30:07 +00:00
;; File System:1 ends here
;; As a sibling to the former, the variable ~%local-swap~ does the same with the swap partition.
2023-11-30 12:34:55 +00:00
2023-12-01 14:30:07 +00:00
;; [[file:config.org::*File System][File System:2]]
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-12-01 14:30:07 +00:00
;; File System:2 ends here
;; Operating System
;; This is the full operating system specification.
2023-12-01 13:22:33 +00:00
2023-12-01 14:30:07 +00:00
;; [[file:config.org::*Operating System][Operating System:1]]
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
2023-12-11 10:59:44 +00:00
nil
2023-12-01 13:22:33 +00:00
%base-packages))
(services
(append
(modify-services
%desktop-services
(delete login-service-type)
(delete mingetty-service-type)
2023-12-11 10:59:44 +00:00
(delete console-font-service-type)
(guix-service-type config => (guix-configuration
(inherit config)
(substitute-urls
(append (list "https://substitutes.nonguix.org")
%default-substitute-urls))
(authorized-keys
(append (list (plain-file "non-guix.pub"
"(public-key
(ecc
(curve Ed25519)
(q #C1FD53E5D4CE971933EC50C9F307AE2171A2D3B52C804642A7A35F84F3A4EA98#)))
")))))))
nil
2023-12-01 13:38:40 +00:00
(list
2023-12-01 13:37:15 +00:00
(service greetd-service-type
(greetd-configuration
(greeter-supplementary-groups
(list "video" "input"))
(terminals
(list
(greetd-terminal-configuration
2023-12-01 15:19:17 +00:00
(terminal-vt "1"))
(greetd-terminal-configuration
(terminal-vt "2"))
(greetd-terminal-configuration
(terminal-vt "3"))
(greetd-terminal-configuration
(terminal-vt "4"))
#;(greetd-terminal-configuration
2023-12-11 10:59:44 +00:00
(terminal-vt "7")
(terminal-switch #t)
(default-session-command
(greetd-wlgreet-session
(command
2023-12-01 15:19:17 +00:00
(file-append swayfx "/bin/sway")))))
2023-12-01 13:37:15 +00:00
(greetd-terminal-configuration
2023-12-01 13:38:40 +00:00
(terminal-vt "8")))))))
(list
2023-12-01 13:37:15 +00:00
(service screen-locker-service-type
(screen-locker-configuration
(name "swaylock")
(program
(file-append swaylock-effects "/bin/swaylock"))
2023-12-01 13:38:40 +00:00
(using-setuid? #f))))
))
2023-11-28 21:38:47 +00:00
(name-service-switch %mdns-host-lookup-nss))
2023-12-01 14:30:07 +00:00
;; Operating System:1 ends here