diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2024-05-19 00:53:52 +0200 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2024-05-19 00:53:52 +0200 |
commit | 5f90ddfd9df5f8f60829c95f8b54f7ecb21751bc (patch) | |
tree | b0075b1e3e9fcbe0317280f99fe6f287488c8862 | |
parent | 17974ab9778bfcfea2c0b30dc2589476ad945ae2 (diff) |
Separate services and keyboard-layout
-rw-r--r-- | desktop.scm | 149 |
1 files changed, 75 insertions, 74 deletions
diff --git a/desktop.scm b/desktop.scm index c8f3b27..77196b0 100644 --- a/desktop.scm +++ b/desktop.scm @@ -37,8 +37,64 @@ (inferior-for-channels channels)) (define qemu (first (lookup-inferior-packages inferior "qemu" "7"))) +;; Keyboard layout +(define us-keyboard-for-bootloader-and-linux (keyboard-layout "us")) +(define my-real-keyboard-layout + (keyboard-layout "es,us,ru" #:options '("grp:alt_space_toggle"))) + +;; My services (use-service-modules desktop networking ssh xorg) +(define my-services + (list (udev-rules-service 'light gnu-linux:light) + (service gnome-desktop-service-type) + (service thermald-service-type) + (simple-service 'adwaita-dark-theme session-environment-service-type + '(("GTK_THEME" . "Adwaita:dark"))) + (service bluetooth-service-type + (bluetooth-configuration (auto-enable? #t))) + (set-xorg-configuration + (xorg-configuration + (keyboard-layout my-real-keyboard-layout) + (modules (append %default-xorg-modules + (list xf86-input-wacom))) + (extra-config + '("\n" + "\n" + "Section \"InputClass\"\n" + " Identifier \"libinput touchpad catchall\"\n" + " Driver \"libinput\"\n" + " MatchIsTouchpad \"on\"\n" + " MatchDevicePath \"/dev/input/event*\"\n" + " Option \"Tapping\" \"on\"\n" + " Option \"TappingDrag\" \"on\"\n" + " Option \"DisableWhileTyping\" \"on\"\n" + "EndSection\n" + "\n" + ; https://wiki.archlinux.org/title/Libinput#Via_xinput + "Section \"InputClass\"\n" + " Identifier \"USB Mouse Pad USB Mouse Pad Mouse\"\n" + " Driver \"libinput\"\n" + " MatchDevicePath \"/dev/input/event*\"\n" + " MatchUSBID \"062a:8255\"\n" + " Option \"Middle Emulation\" \"on\"\n" + " Option \"AccelSpeed\" \"-0.9\"" + "EndSection\n" + "\n" + "\n" + "Section \"Device\"\n" + " Identifier \"modesetting\"\n" + " Driver \"modesetting\"\n" + " Option \"TearFree\" \"True\"\n" + "EndSection" + "\n")))) + (service qemu-binfmt-service-type + (qemu-binfmt-configuration + (platforms (lookup-qemu-platforms "riscv64" "aarch64")) + (qemu qemu))))) + + + (operating-system (kernel linux) (kernel-loadable-modules `(,tuxedo-keyboard)) @@ -46,13 +102,12 @@ (firmware (list linux-firmware)) (locale "en_US.utf8") (timezone "Europe/Madrid") - (keyboard-layout - (keyboard-layout "es")) + (keyboard-layout us-keyboard-for-bootloader-and-linux) (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (targets (list "/boot/efi")) - (keyboard-layout keyboard-layout))) + (keyboard-layout us-keyboard-for-bootloader-and-linux))) (swap-devices (list (swap-space (target "/dev/sda3")))) (file-systems @@ -101,75 +156,21 @@ qemu %base-packages)) - (services (cons* (udev-rules-service 'light gnu-linux:light) - (service gnome-desktop-service-type) - (service thermald-service-type) - (simple-service 'adwaita-dark-theme session-environment-service-type - '(("GTK_THEME" . "Adwaita:dark"))) - (service bluetooth-service-type - (bluetooth-configuration (auto-enable? #t))) - (set-xorg-configuration - (xorg-configuration - (keyboard-layout keyboard-layout) - (modules (append %default-xorg-modules - (list xf86-input-wacom))) - (extra-config - '("\n" - "\n" - "Section \"InputClass\"\n" - " Identifier \"libinput touchpad catchall\"\n" - " Driver \"libinput\"\n" - " MatchIsTouchpad \"on\"\n" - " MatchDevicePath \"/dev/input/event*\"\n" - " Option \"Tapping\" \"on\"\n" - " Option \"TappingDrag\" \"on\"\n" - " Option \"DisableWhileTyping\" \"on\"\n" - "EndSection\n" - "\n" - "Section \"InputClass\"" - " Identifier \"keyboard defaults\"" - " MatchIsKeyboard \"on\"" - " Option \"XkbLayout\" \"es,us,ru\"" - " Option \"XkbOptions\" \"grp:alt_space_toggle\"" - "EndSection\n" - "\n" - ; https://wiki.archlinux.org/title/Libinput#Via_xinput - "Section \"InputClass\"\n" - " Identifier \"USB Mouse Pad USB Mouse Pad Mouse\"\n" - " Driver \"libinput\"\n" - " MatchDevicePath \"/dev/input/event*\"\n" - " MatchUSBID \"062a:8255\"\n" - " Option \"Middle Emulation\" \"on\"\n" - " Option \"AccelSpeed\" \"-0.9\"" - "EndSection\n" - "\n" - "\n" - "Section \"Device\"\n" - " Identifier \"modesetting\"\n" - " Driver \"modesetting\"\n" - " Option \"TearFree\" \"True\"\n" - "EndSection" - "\n" - )))) - (service qemu-binfmt-service-type - (qemu-binfmt-configuration - (platforms (lookup-qemu-platforms "riscv64" "aarch64")) - (qemu qemu))) - ; Removes ModemManager because it interferes with USB - ; development. If using a 3/4G modem or something we have - ; to activate it. - (remove (lambda (x) (eqv? (service-type-name - (service-kind x)) - 'modem-manager)) + (services + (append my-services + (modify-services %desktop-services + ;; Removes ModemManager because it interferes with USB + ;; development. If using a 3/4G modem or something we have + ;; to activate it. + (delete modem-manager-service-type) - ; Configure nonguix substitutes - (modify-services %desktop-services - (guix-service-type config => - (guix-configuration - (inherit config) - (substitute-urls - (append (list "https://substitutes.nonguix.org") - %default-substitute-urls)) - (authorized-keys - (append (list (local-file "./non-guix-signing-key.pub")) - %default-authorized-guix-keys))))))))) + ;; Configure nonguix substitutes + (guix-service-type config => + (guix-configuration + (inherit config) + (substitute-urls + (append (list "https://substitutes.nonguix.org") + %default-substitute-urls)) + (authorized-keys + (append (list (local-file "./non-guix-signing-key.pub")) + %default-authorized-guix-keys)))))))) |