orchard

My personal GNU Guix configurations.
Log | Files | Refs | README

lukejw.scm (7472B)


      1 (define-module (orchard home lukejw)
      2   #:use-module (gnu home)
      3   #:use-module (gnu home services)
      4   #:use-module (gnu home services desktop)
      5   #:use-module (gnu home services fontutils)
      6   #:use-module (gnu home services mpv)
      7   #:use-module (gnu home services shells)
      8   #:use-module (gnu home services sound)
      9   #:use-module (gnu home services ssh)
     10   #:use-module (gnu home services sway)
     11   #:use-module (gnu home services xdg)
     12   #:use-module (gnu packages admin)
     13   #:use-module (gnu packages base)
     14   #:use-module (gnu packages emulators)
     15   #:use-module (gnu packages fonts)
     16   #:use-module (gnu packages freedesktop)
     17   #:use-module (gnu packages games)
     18   #:use-module (gnu packages gimp)
     19   #:use-module (gnu packages gl)
     20   #:use-module (gnu packages gnome)
     21   #:use-module (gnu packages gnome-xyz)
     22   #:use-module (gnu packages gnupg)
     23   #:use-module (gnu packages inkscape)
     24   #:use-module (gnu packages kde-frameworks)
     25   #:use-module (gnu packages librewolf)
     26   #:use-module (gnu packages linux)
     27   #:use-module (gnu packages lxqt)
     28   #:use-module (gnu packages pdf)
     29   #:use-module (gnu packages polkit)
     30   #:use-module (gnu packages pulseaudio)
     31   #:use-module (gnu packages qt)
     32   #:use-module (gnu packages rsync)
     33   #:use-module (gnu packages syndication)
     34   #:use-module (gnu packages terminals)
     35   #:use-module (gnu packages text-editors)
     36   #:use-module (gnu packages toys)
     37   #:use-module (gnu packages version-control)
     38   #:use-module (gnu packages video)
     39   #:use-module (gnu packages web-browsers)
     40   #:use-module (gnu packages wm)
     41   #:use-module (gnu packages xdisorg)
     42   #:use-module (gnu services)
     43   #:use-module (gnu system keyboard)
     44   #:use-module (guix build-system copy)
     45   #:use-module (guix gexp)
     46   #:use-module (guix git-download)
     47   #:use-module (guix packages)
     48   #:use-module (loquat packages games)
     49   #:use-module (nongnu packages messaging)
     50   #:use-module (orchard home lukejw sway)
     51   #:export (lukejw-home-environment))
     52 
     53 (define wf-recorder-master
     54   (let ((commit "f4c7f57b0db3ea390f8c86e5bfb64b8d0d941fcb")
     55         (revision "2"))          ;Guix package revision
     56     (package
     57       (inherit wf-recorder)
     58       (name "wf-recorder")
     59       (version (git-version "0.5.0" revision commit))
     60       (source (origin
     61                 (method git-fetch)
     62                 (uri (git-reference
     63                       (url "https://github.com/ammen99/wf-recorder")
     64                       (commit commit)))
     65                 (file-name (git-file-name name version))
     66                 (sha256
     67                  (base32
     68                   "1gv6ckfbi7b4xl03hdi7196iv5w41qxr6f8rfgvkdy9xri8j84p0"))))
     69       (inputs
     70        (list ffmpeg-6 pulseaudio wayland wayland-protocols mesa)))))
     71 
     72 ;; TODO: Organize
     73 
     74 (define tofi-config
     75   (plain-file "config" "\
     76 anchor = center
     77 width = 700
     78 height = 500
     79 font-size = 14
     80 prompt-text = \"run: \"
     81 placeholder-text = \"action\"
     82 placeholder-color = #575653
     83 font = monospace
     84 outline-width = 0
     85 border-width = 2
     86 border-color = #403E3C
     87 text-color = #878580
     88 background-color = #100F0FCC
     89 selection-color = #CECDC3
     90 input-color = #CECDC3
     91 min-input-width = 120
     92 result-spacing = 4
     93 "))
     94 
     95 (define i3blocks-config
     96   (plain-file "config" "\
     97 [name]
     98 command=echo ${USER}@${HOSTNAME}
     99 interval=once
    100 
    101 [weather]
    102 command=curl wttr.in/?format=\"%t++%c%C\\n\"
    103 interval=900
    104 
    105 [time]
    106 command=date -R
    107 interval=1
    108 
    109 [battery]
    110 command=echo \"$(cat /sys/class/power_supply/BAT0/capacity)% ($(cat /sys/class/power_supply/BAT0/status)) \"
    111 interval=30
    112 "))
    113 
    114 (define foot-config
    115   (plain-file "foot.ini" "\
    116 font=monospace:size=14
    117 pad=4x4
    118 
    119 [colors]
    120 alpha=0.9
    121 
    122 background=100F0F # bg
    123 foreground=CECDC3 # tx
    124 
    125 regular0=100F0F # bg
    126 regular1=AF3029 # re-2
    127 regular2=66800B # gr-2
    128 regular3=AD8301 # ye-2
    129 regular4=205EA6 # bl-2
    130 regular5=A02F6F # ma-2
    131 regular6=24837B # cy-2
    132 regular7=878580 # tx-2
    133 
    134 bright0=1C1B1A # bg-2
    135 bright1=D14D41 # re
    136 bright2=879A39 # gr
    137 bright3=D0A215 # ye
    138 bright4=4385BE # bl
    139 bright5=CE5D97 # ma
    140 bright6=3AA99F # cy
    141 bright7=CECDC3 # tx
    142 "))
    143 
    144 ;; Use cursor them in Sway
    145 
    146 (define xresources
    147   (plain-file "xresources" "\
    148 Xcursor.theme: Bibata-Original-Ice
    149 Xcursor.size: 24"))
    150 
    151 (define lukejw-home-environment
    152   (home-environment
    153     (packages
    154       (list ;; Apps
    155             pavucontrol
    156             librewolf
    157             lynx
    158             kakoune
    159             newsraft
    160             signal-desktop
    161             ;; Fonts
    162             font-fira-mono
    163             font-google-noto-emoji
    164             ;; Utils
    165             git
    166             rsync
    167             oxygen-icons
    168             breeze-icons
    169             bibata-cursor-theme
    170             papirus-icon-theme
    171             ;; Media
    172             zathura
    173             zathura-pdf-mupdf
    174             mpv
    175             ffmpeg
    176             wf-recorder-master
    177             yt-dlp
    178             ;; Creative
    179             gimp
    180             inkscape
    181             ;; Games
    182             crispy-doom
    183             freedoom
    184             prismlauncher
    185             ;; Emulation
    186             jgrf
    187             jg-bsnes
    188             jg-nestopia
    189             ;; Toys
    190             cbonsai
    191             cmatrix))
    192     (services
    193       (append
    194         (list
    195           (service home-dbus-service-type)
    196           (service home-bash-service-type
    197                    (home-bash-configuration
    198                      (guix-defaults? #f)
    199                      (aliases `(("gs" . "git status")
    200                                 ("yta" . "yt-dlp -t aac --add-metadata -o \"~/Audio/%(channel)s/%(upload_date)s - %(title)s.%(ext)s\"")
    201                                 ;; Todo: Make fancy sway recording script w/ i3block indicator
    202                                 ("record" . "wf-recorder --audio -c h264_vaapi -d /dev/dri/renderD128")))))
    203           ;; Automatically start pipewire
    204           (service home-pipewire-service-type)
    205           (service home-ssh-agent-service-type)
    206           (simple-service 'jollygood-environment-variables
    207                           home-environment-variables-service-type
    208                           `(("JOLLYGOOD_ASSET_DIRS" . "$HOME/.guix-home/profile/share/jollygood")
    209                             ("JOLLYGOOD_CORE_DIRS" . "$HOME/.guix-home/profile/lib/jollygood")))
    210           (simple-service 'custom-fonts-service
    211                           home-fontconfig-service-type
    212                           (list "~/.guix-home/profile/share/fonts"
    213                                 '(alias
    214                                   (family "monospace")
    215                                   (prefer
    216                                    (family "Fira Mono"))
    217                                   (prefer
    218                                    (family "Noto Color Emoji")))))
    219           ;; TODO: Setup more advanced MPV config
    220           (service home-mpv-service-type
    221                    (make-home-mpv-configuration
    222                     #:global (make-mpv-profile-configuration
    223                               #:hwdec '("auto")
    224                               #:alang '("en")
    225                               #:slang '("en"))))
    226           (simple-service 'extra-config-files
    227                           home-xdg-configuration-files-service-type
    228                           `(("i3blocks/config" ,i3blocks-config)
    229                             ("tofi/config" ,tofi-config)
    230                             ("foot/foot.ini" ,foot-config)))
    231           (simple-service 'extra-home-files
    232                           home-files-service-type
    233                           `((".Xresources" ,xresources)))
    234           ;; Setup a sway configuration
    235           (service home-sway-service-type %sway-configuration))
    236         %base-home-services))))
    237 
    238 lukejw-home-environment