(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
    (list (package-inputs guix))
    (map (compose list specification->package+output symbol->string)
         '(;; Base
           nss-certs ;; suggested by Guix

           ;; Personal data tools
           git
           git:send-email
           git-lfs
           git-annex
           myrepos
           git-remote-gcrypt
           git-crypt
           fossil
           git-open
           borg
           gnupg
           syncthing

           ;; CLI tools
           groff
           mktorrent
           diffoscope
           bash-completion
           youtube-dl
           ;;; wget - both already included?
           ;;; curl
           tmux
           ;; tmuxinator
           sox ; SoX - Sound eXchange
           gettext
           rlwrap
           jq
           ;; rq
           openvpn
           xclip
           psmisc ; killall
           xkill
           ;; gksu
           tree
           unzip
           feh
           bind:utils
           rsync
           moreutils
           graphviz
           ;; graph-easy
           ;; mkpasswd, is this required?
           direnv
           recutils
           sqlite
           trash-cli
           entr ; need patch
           mailutils
           ffmpeg
           ledger
           gnuplot
           ranger
           electrum
           zathura
           ;; zathura-ps
           ;; zathura-pdf-poppler
           ;; zathura-djvu
           ;; zathura-cb
           ;; zathura-pdf-mupdf
           st
           pavucontrol
           weechat
           newsboat
           acpi
           xsel
           pinentry
           nvi
           go-github-com-junegunn-fzf
           autojump
           calcurse
           pandoc
           openssh
           festival ;; TTS software

           ;; Mail
           notmuch
           isync
           neomutt

           ;; Programming tools
           perl
           shellcheck
           ;; mrsh
           dash

           ;; POSIX
           ;; bmake
           ;; byacc
           ;; pax
           flex
           ;;; gnugrep - already included?

           ;; Containers and VMs
           qemu

           ;; xmonad
           xmodmap
           xmessage
           dmenu
           ;; escrotum
           xbacklight
           playerctl
           ;; lightdm
           fvwm ; xpmroot
           xmonad
           ghc
           ghc-xmonad-contrib
           xmobar
           remembering
           arandr
           alsa-utils ; for xmonad volume controls
           xset
           xmodmap
           setxkbmap

           ;; GUI programs
           audacity
           zbar
           ;; fractal
           dino
           calibre
           vlc
           gpodder
           qutebrowser
           blueman
           bluez))
    %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)))
