;; This is an operating system configuration generated
;; by the graphical installer.

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

(operating-system
  (locale "en_US.utf8")
  (timezone "America/Sao_Paulo")
  (keyboard-layout (keyboard-layout "br" #:options '("caps:swapescape")))
  (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 (lambda (spec)
            (if (not (string-contains spec ":"))
                (specification->package spec)
                (let ((spec-pair (string-split spec #\:)))
                  (list (specification->package (first spec-pair))
                        (second spec-pair)))))
          '("nss-certs" ;; suggested by Guix
            "help2man" ;; used in Guix development
            "strace"

            "wget"
            "xclip"
            "autojump"
            "git"
            "git:send-email"
            "rlwrap"
            "myrepos"
            "borg"
            "bash-completion"
            "vlc"
            "youtube-dl"
            "sox"
            "jq"
            "calibre"
            "notmuch"
            "isync"
            "xset"
            "bluez"
            "playerctl"
            "xmessage"
            "alsa-utils"
            "icecat"
            "git-remote-gcrypt"
            "git-crypt"
            "the-silver-searcher"
            "fd"
            "ranger"
            "seahorse"
            "nautilus"
            "git-annex"
            "emacs"
            "gettext"
            "openssh"
            "gnupg"
            "nvi"
            "tmux"
            "direnv"
            "pinentry-gnome3"
            "pinentry"
            "keepassxc"
            "recutils"
            "owncloud-client"
            "xterm"
            "htop"

            ;; xmonad
            "xmonad"
            "ghc"
            "ghc-xmonad-contrib"
            "gcc-toolchain"
            "glibc"
            "xmobar"
            "dmenu"))
     %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)))
