From 5d6840de02f01c017cc1ce99238d6962331087da Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Mon, 13 May 2024 08:42:24 +0300 Subject: guix:(system) Major rewrite --- guix/system.scm | 114 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 90 insertions(+), 24 deletions(-) diff --git a/guix/system.scm b/guix/system.scm index 6dd0be7..2a86298 100644 --- a/guix/system.scm +++ b/guix/system.scm @@ -1,14 +1,19 @@ ;; TODO: Use this as a base module and seperate each system/machine (use-modules (gnu) (gnu services) - (gnu home services desktop) - (gnu home services desktop) - (gnu home services gnupg) + (gnu services dbus) + (gnu services desktop) + (gnu system) + (gnu system setuid) + (gnu system nss) (nongnu packages linux) (nongnu system linux-initrd)) (use-service-modules cups desktop networking ssh xorg docker guix admin pm docker) +(use-package-modules nfs certs shells ssh linux bash emacs networking wm fonts libusb cups freedesktop file-systems version-control package-management) + + (operating-system (locale "en_US.utf8") (timezone "Europe/Athens") @@ -33,36 +38,97 @@ (packages (append (map specification->package '("sway" "swaylock" "swaylock-effects" "swaybg" - "waybar" "mu" "gnupg" "pinentry" "password-store" "isync" "python" - "sbcl" "font-jetbrains-mono" "docker" "docker-cli" "icecat" "git")) + "waybar" "gnupg" "pinentry" "password-store" + "isync" "python" "font-jetbrains-mono" "docker" + "docker-cli" "icecat" "git" "avahi")) %base-packages)) ;; Below is the list of system services. To search for available ;; services, run 'guix system search KEYWORD' in a terminal. (services - (append (list (service gnome-desktop-service-type) - (service docker-service-type) - - (service openssh-service-type - (openssh-configuration - (permit-root-login 'prohibit-password))) - ;; ;; TODO: Fix swaylock - ;; (service screen-locker-service-type - ;; (screen-locker-configuration - ;; (name "swaylock") - ;; (program (file-append swaylock "/bin/swaylock")) - ;; (using-pam? #t) - ;; (using-setuid? #f))) - - (service tor-service-type) - (service cups-service-type) - (set-xorg-configuration - (xorg-configuration (keyboard-layout keyboard-layout)))) - %desktop-services)) + (append (list + (service docker-service-type) + ;; tty login + (service elogind-service-type) + + (service console-font-service-type + (map (lambda (tty) + ;; Use a larger font for HIDPI screens + (cons tty (file-append + font-terminus + "/share/consolefonts/ter-132n"))) + '("tty1" "tty2" "tty3"))) + + (service greetd-service-type + (greetd-configuration + (greeter-supplementary-groups + (list "video" "input")) + (terminals + (list + (greetd-terminal-configuration + (terminal-vt "1") + (terminal-switch #t)) + (greetd-terminal-configuration + (terminal-vt "2")) + (greetd-terminal-configuration + (terminal-vt "3")))))) + + + (service gnome-desktop-service-type) + + (service openssh-service-type + (openssh-configuration + (permit-root-login 'prohibit-password))) + + ;; (service static-networking-service-type + ;; (list %loopback-static-networking)) + + ;; TODO: Fix swaylock + (service screen-locker-service-type + (screen-locker-configuration + (name "swaylock") + (program (file-append swaylock "/bin/swaylock")) + (using-pam? #t) + (using-setuid? #f))) + + ;; Networking services + (service network-manager-service-type) + (service wpa-supplicant-service-type) ;; Needed by NetworkManager + (service modem-manager-service-type) ;; For cellular modems + + polkit-wheel-service + + (service tor-service-type) + (service cups-service-type) + ;; + ;; (service avahi-service-type) + (service udisks-service-type) + (service upower-service-type) + (service cups-pk-helper-service-type) + (service geoclue-service-type) + ;; (service polkit-service-type) + ;; (service dbus-root-service-type) + fontconfig-file-system-service ;; Manage the fontconfig cache + + ;; Power and thermal management services + (service thermald-service-type) + (service tlp-service-type + (tlp-configuration + (cpu-boost-on-ac? #t) + (wifi-pwr-on-bat? #t)))) + + (modify-services %base-services + (delete login-service-type) + (delete mingetty-service-type) + (delete console-font-service-type)))) + + (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (targets (list "/boot/efi")) (keyboard-layout keyboard-layout))) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (swap-devices (list (swap-space (target (uuid "10551e45-7810-4171-a4b2-87372ae5bdb4"))))) -- cgit v1.2.3