jaynw.scm (7733B)


      1 (define-module (home jaynw)
      2   #:use-module (home jaynw eww)
      3   #:use-module (gnu home)
      4   #:use-module (gnu home services)
      5   #:use-module (gnu home services desktop)
      6   #:use-module (gnu home services fontutils)
      7   #:use-module (gnu home services mpv)
      8   #:use-module (gnu home services shells)
      9   #:use-module (gnu home services sound)
     10   #:use-module (gnu home services ssh)
     11   #:use-module (gnu home services xdg)
     12   #:use-module (gnu packages admin)
     13   #:use-module (gnu packages education)
     14   #:use-module (gnu packages fonts)
     15   #:use-module (gnu packages freedesktop)
     16   #:use-module (gnu packages games)
     17   #:use-module (gnu packages gnome)
     18   #:use-module (gnu packages gnome-xyz)
     19   #:use-module (gnu packages librewolf)
     20   #:use-module (gnu packages lxqt)
     21   #:use-module (gnu packages qt)
     22   #:use-module (gnu packages terminals)
     23   #:use-module (gnu packages toys)
     24   #:use-module (gnu packages video)
     25   #:use-module (gnu packages wm)
     26   #:use-module (gnu packages xfce)
     27   #:use-module (gnu services)
     28   #:use-module (guix gexp)
     29   #:use-module (guix git-download)
     30   #:use-module (guix packages)
     31   #:use-module (nongnu packages game-client)
     32   #:use-module (nongnu packages video)
     33   #:use-module (mt packages)
     34   #:use-module (mt packages aseprite)
     35   #:use-module (mt packages desktop)
     36   #:use-module (mt packages fonts)
     37   #:use-module (mt packages games)
     38   #:use-module (mt packages gtk)
     39   #:use-module (mt services labwc)
     40   #:use-module (mt utils)
     41   #:export (jaynw-home-environment))
     42 
     43 (define lxqt-config
     44   (plain-file "lxqt.conf" "\
     45 [General]
     46 icon_theme=Gruvbox-Plus-Dark
     47 
     48 [Qt]
     49 style=kvantum
     50 "))
     51 
     52 (define gtk-config
     53   (plain-file "settings.ini" "\
     54 [Settings]
     55 gtk-theme-name=Gruvbox-Teal-Dark
     56 gtk-icon-theme-name=Gruvbox-Plus-Dark
     57 "))
     58 
     59 (define foot-config
     60   (plain-file "foot.ini" "\
     61 title=Terminal
     62 font=monospace:size=14
     63 pad=4x4
     64 
     65 [colors]
     66 alpha=0.9
     67 foreground=ebdbb2
     68 background=282828
     69 
     70 regular0=282828
     71 regular1=cc241d
     72 regular2=98971a
     73 regular3=d79921
     74 regular4=458588
     75 regular5=b16286
     76 regular6=689d6a
     77 regular7=a89984
     78 
     79 bright0=928374
     80 bright1=fb4934
     81 bright2=b8bb26
     82 bright3=fabd2f
     83 bright4=83a598
     84 bright5=d3869b
     85 bright6=8ec07c
     86 bright7=ebdbb2
     87 "))
     88 
     89 (define jaynw-home-environment
     90   (home-environment
     91     (packages
     92       (list ;; Fonts
     93             font-fira-mono-nerd-font
     94             font-google-noto-emoji
     95             ;; Apps
     96             librewolf
     97             aseprite
     98             snap
     99             ;; System apps
    100             thunar tumbler
    101             pavucontrol-qt
    102             btop
    103             mpv
    104             ;; QT
    105             lxqt-qtplugin
    106             qtwayland
    107             kvantum
    108             ;; Theming
    109             bibata-cursor-theme
    110             gruvbox-gtk-theme
    111             gruvbox-plus-icon-pack))
    112     (services
    113       (append
    114         (list
    115           ;; For system use
    116           (service home-dbus-service-type)
    117           (service home-pipewire-service-type)
    118           ;; For personal use
    119           (service home-bash-service-type
    120                    (home-bash-configuration
    121                      (guix-defaults? #f)))
    122           (simple-service 'desktop-environment-variables
    123                           home-environment-variables-service-type
    124                           `(("QT_QPA_PLATFORMTHEME" . "lxqt")
    125                             ("XCURSOR_THEME" . "Bibata-Modern-Ice")
    126                             ("XCURSOR_SIZE" . "24")))
    127           ;; Setup custom fonts
    128           (simple-service 'custom-fonts-service
    129                           home-fontconfig-service-type
    130                           (list "~/.guix-home/profile/share/fonts"
    131                                 '(alias
    132                                   (family "monospace")
    133                                   (prefer
    134                                    (family "Fira Mono Nerd Font"))
    135                                   (prefer
    136                                    (family "Noto Color Emoji")))))
    137           ;; Desktop environment configuration
    138           ;; TODO: Complete configuration
    139           (service home-labwc-service-type
    140                    (home-labwc-configuration
    141                     (packages
    142                      (list foot
    143                            ;; widgets
    144                            eww
    145                            wlr-apps
    146                            ;; notifs
    147                            libnotify
    148                            mako
    149                            ;; auth.
    150                            lxqt-policykit
    151                            ;; misc.
    152                            swaybg
    153                            xdg-utils))
    154                     (rc
    155                      `((theme
    156                         (name "gruvbox")
    157                         (cornerRadius 8)
    158                         (dropShadows "yes")
    159                         (font
    160                          (name "monospace")
    161                          (size 14)
    162                          (slant "normal")
    163                          (weight "normal")))
    164                        (desktops (@ (number 4)))))
    165                     (menu
    166                      `((menu (@ (id "root-menu"))
    167                              (item (@ (label "Terminal"))
    168                                    (action
    169                                     (name "Execute")
    170                                     (command "footclient")))
    171                              ;(separator)
    172                              ;(item (@ (label "Update system"))
    173                              ;      (action
    174                              ;       (name "Execute")
    175                              ;       (command "mt-update")))
    176                              (separator)
    177                              (item (@ (label "Shut down"))
    178                                    (action
    179                                     (name "Execute")
    180                                     (command "loginctl poweroff")))
    181                              (item (@ (label "Reboot"))
    182                                    (action
    183                                     (name "Execute")
    184                                     (command "loginctl reboot")))
    185                              (item (@ (label "Log out"))
    186                                    (action
    187                                     (name "Exit"))))))
    188                     (autostart
    189                      (list
    190                       "foot --server"
    191                       "mako"
    192                       #~(string-append "swaybg -i "
    193                                        #$(local-file "jaynw/bg.png"))
    194                       "lxqt-policykit-agent"
    195                       "eww open bottom_bar"))))
    196           ;; Install custom theme
    197           (simple-service 'install-theme
    198                           home-files-service-type
    199                           ;; TODO: Integrate themerc into home-labwc-service-type
    200                           `((".themes/gruvbox" ,(local-file "jaynw/gruvbox-theme"
    201                                                             #:recursive? #t))))
    202           ;; TODO: Setup more advanced MPV config
    203           (service home-mpv-service-type
    204                    (make-home-mpv-configuration
    205                     #:global (make-mpv-profile-configuration
    206                               #:hwdec '("auto")
    207                               #:alang '("en")
    208                               #:slang '("en"))))
    209           ;; Setup regular config files
    210           (simple-service 'extra-config-files
    211                           home-xdg-configuration-files-service-type
    212                           `(("foot/foot.ini" ,foot-config)
    213                             ("lxqt/lxqt.conf" ,lxqt-config)
    214                             ("gtk-3.0/settings.ini" ,gtk-config)
    215                             ;; TODO: Find/make an alternative to EWW
    216                             ("eww" ,(local-file "jaynw/eww"
    217                                                 #:recursive? #t)))))
    218         %base-home-services))))
    219 
    220 jaynw-home-environment