diff options
Diffstat (limited to 'guix/system-base.scm')
-rw-r--r-- | guix/system-base.scm | 264 |
1 files changed, 124 insertions, 140 deletions
diff --git a/guix/system-base.scm b/guix/system-base.scm index 0f0e877..50da5a4 100644 --- a/guix/system-base.scm +++ b/guix/system-base.scm @@ -19,145 +19,129 @@ wm fonts libusb cups freedesktop file-systems version-control package-management) +(define system-packages + '("sway" "swaylock" "swaylock-effects" "swaybg" + "waybar" "gnupg" "pinentry" "font-jetbrains-mono" + "docker" "docker-cli")) + +(define (system-base host-name filesystem swap-uuid) + (operating-system + (locale "en_US.utf8") + (timezone "Europe/Athens") + (keyboard-layout (keyboard-layout "us")) + (host-name host-name) + + ;; TODO: Use the full linux kernel only on the desktop + (kernel linux) + (initrd microcode-initrd) + (firmware (list linux-firmware)) + + ;; The list of user accounts ('root' is implicit). + (users (cons* (user-account + (name "thanos") + (comment "Thanos Apollo") + (group "users") + (home-directory "/home/thanos") + (supplementary-groups '("wheel" "netdev" "audio" "video" "docker"))) + %base-user-accounts)) + + ;; Packages installed system-wide. + (packages + (append (map specification->package system-packages) + %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 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")) + (greetd-terminal-configuration + (terminal-vt "4")) + (greetd-terminal-configuration + (terminal-vt "5")))))) + + + (service gnome-desktop-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))) + + ;; 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))) + (service tailscale-service-type)) + + (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))) -(operating-system - (locale "en_US.utf8") - (timezone "Europe/Athens") - (keyboard-layout (keyboard-layout "us")) - (host-name "zeus") - - ;; TODO: Use the full linux kernel only on the desktop - (kernel linux) - (initrd microcode-initrd) - (firmware (list linux-firmware)) - - ;; The list of user accounts ('root' is implicit). - (users (cons* (user-account - (name "thanos") - (comment "Thanos Apollo") - (group "users") - (home-directory "/home/thanos") - (supplementary-groups '("wheel" "netdev" "audio" "video" "docker"))) - %base-user-accounts)) - - ;; Packages installed system-wide. - (packages - (append (map specification->package - '("sway" "swaylock" "swaylock-effects" "swaybg" - "waybar" "gnupg" "pinentry" "font-jetbrains-mono" - "docker" "docker-cli")) - %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 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")) - (greetd-terminal-configuration - (terminal-vt "4")) - (greetd-terminal-configuration - (terminal-vt "5")))))) - - - (service gnome-desktop-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))) - - ;; 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))) - (service tailscale-service-type)) - - (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"))))) - - ;; run 'lsblk -f' to get UUIDs. - (file-systems (cons* (file-system - (mount-point "/hdd") - (device (uuid "b0fddf60-47ff-469f-b135-8f6b58812c99" - 'xfs)) - (type "xfs")) - (file-system - (mount-point "/home") - (device (uuid "4efbc805-e89b-46b8-b895-b1ce807698c8" - 'ext4)) - (type "ext4")) - (file-system - (mount-point "/") - (device (uuid - "e350994d-4c98-4d04-9867-29c9fc779026" - 'ext4)) - (type "ext4")) - (file-system - (mount-point "/boot/efi") - (device (uuid "F2A9-FB50" - 'fat32)) - (type "vfat")) %base-file-systems))) + (swap-devices (list (swap-space + (target (uuid swap-uuid))))) + + ;; run 'lsblk -f' to get UUIDs. + (file-systems filesystem))) + + |