(use-modules (gnu)
             (srfi srfi-1))
(use-service-modules desktop networking ssh xorg)

(operating-system
  (locale "en_US.utf8")
  (timezone "America/Sao_Paulo")
  (keyboard-layout (keyboard-layout "br" #:options '("caps:swapescape" "esperanto:qwerty")))
  (host-name "velhinho-guix-system")
  (users (cons* (user-account
                 (name "andreh")
                 (comment "andreh")
                 (group "users")
                 (home-directory "/home/andreh")
                 (supplementary-groups
                  '("wheel" "netdev" "audio" "video")))
                %base-user-accounts))
  (packages
   (append
    (map (compose list specification->package+output symbol->string)
           ;; Base
         '(nss-certs ;; suggested by Guix
           help2man  ;; used in Guix development
           strace

           ;; Fonts
           font-adobe-source-code-pro

           ;; Emacs
           emacs
           emacs-spacemacs-theme
           emacs-spaceline
           emacs-evil
           emacs-evil-collection

           ;; CLI tools
           vim
           curl
           wget
           autojump
           rsync
           terraform

           ;; DVCS tools
           git
           git:send-email
           git-lfs
           git-annex
           myrepos
           git-remote-gcrypt
           git-crypt
           fossil
           diff-so-fancy
           git-open

           xclip
           rlwrap
           borg
           bash-completion
           vlc
           youtube-dl
           sox ;; play
           jq
           calibre
           notmuch
           isync
           xset
           blueman
           bluez
           playerctl
           xmessage
           qutebrowser
           the-silver-searcher
           fd
           ranger
           gettext
           openssh
           gnupg
           nvi
           tmux
           direnv
           pinentry-tty
           ;; pinentry
           keepassxc
           recutils
           st
           htop
           bind
           openssl

           ;; Programming
           clojure

           ;; Workstation personal programs
           mutt
           weechat
           newsboat

           zathura
           zathura-ps
           zathura-pdf-poppler
           zathura-djvu
           zathura-cb
           ;; zathura-pdf-mupdf



           zbar
           gpodder
           newsboat

           ;; xmonad
           ghc
           ghc-xmonad-contrib
           xmobar
           dmenu
           yeganesh))
    %base-packages))
  (services
   (append
    (list (service gnome-desktop-service-type)
          (set-xorg-configuration
           (xorg-configuration
            (keyboard-layout keyboard-layout))))
    %desktop-services))
  (bootloader
   (bootloader-configuration
    (bootloader grub-efi-bootloader)
    (target "/boot/efi")
    (keyboard-layout keyboard-layout)))
  (mapped-devices
   (list (mapped-device
          (source
           (uuid "67a25dfa-ed48-4466-89f3-e291365df104"))
          (target "cryptroot")
          (type luks-device-mapping))))
  (file-systems
   (cons* (file-system
            (mount-point "/")
            (device "/dev/mapper/cryptroot")
            (type "btrfs")
            (dependencies mapped-devices))
          (file-system
            (mount-point "/boot/efi")
            (device (uuid "1B26-9F4E" 'fat32))
            (type "vfat"))
          %base-file-systems)))
