lukejw.scm (8681B)
1 (define-module (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 (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 ;; Files to help theme QT 145 146 (define lxqt-config 147 (plain-file "lxqt.conf" "\ 148 [General] 149 icon_theme=Papirus-Dark 150 151 [Qt] 152 style=kvantum")) 153 154 (define kvantum-config 155 (plain-file "kvantum.kvconfig" "\ 156 [General] 157 theme=KvSimplicityDark")) 158 159 ;; Use cursor theme in Sway 160 (define xresources 161 (plain-file "xresources" "\ 162 Xcursor.theme: Bibata-Original-Ice 163 Xcursor.size: 24")) 164 165 (define lukejw-home-environment 166 (home-environment 167 (packages 168 (list ;; Apps 169 pavucontrol-qt 170 librewolf 171 lynx 172 kakoune 173 newsraft 174 signal-desktop 175 ;; Fonts 176 font-fira-mono 177 font-google-noto-emoji 178 ;; Utils 179 git 180 rsync 181 ;; QT 182 lxqt-qtplugin 183 kvantum 184 oxygen-icons 185 breeze-icons 186 bibata-cursor-theme 187 papirus-icon-theme 188 ;; Media 189 zathura 190 zathura-pdf-mupdf 191 mpv 192 ffmpeg 193 wf-recorder-master 194 yt-dlp 195 ;; Creative 196 gimp 197 inkscape 198 ;; Games 199 crispy-doom 200 freedoom 201 ;prismlauncher 202 ;; Emulation 203 jgrf 204 jg-bsnes 205 jg-nestopia 206 ;; Toys 207 cbonsai 208 cmatrix)) 209 (services 210 (append 211 (list 212 (service home-dbus-service-type) 213 (service home-bash-service-type 214 (home-bash-configuration 215 (guix-defaults? #f) 216 (aliases `(("gs" . "git status") 217 ;; Shortcut to download a YouTube video into audio format 218 ("yta" . "yt-dlp -t aac --add-metadata -o \"~/Audio/%(channel)s/%(upload_date)s - %(title)s.%(ext)s\"") 219 ;; Shortcut to download a YouTube playlist in audio format and organize it 220 ("ytap" . "yt-dlp -t aac --add-metadata \ 221 -o \"~/Audio/%(channel)s/%(playlist_title)s/%(playlist_id)s_%(playlist_index)s - %(title)s.%(ext)s\"") 222 ;; Shortcut to start a local http server 223 ("qs" . "guix shell python -- python3 -m http.server") 224 ;; TODO: Make fancy sway recording script w/ i3block indicator 225 ("record" . "wf-recorder --audio -c h264_vaapi -d /dev/dri/renderD128"))))) 226 ;; Automatically start pipewire 227 (service home-pipewire-service-type) 228 (service home-ssh-agent-service-type) 229 ;; TODO: Make a home service for using kvantum with lxqt-qtplugin 230 (simple-service 'qt-environment-variables 231 home-environment-variables-service-type 232 `(("QT_QPA_PLATFORMTHEME" . "lxqt"))) 233 234 (simple-service 'jollygood-environment-variables 235 home-environment-variables-service-type 236 `(("JOLLYGOOD_ASSET_DIRS" . "$HOME/.guix-home/profile/share/jollygood") 237 ("JOLLYGOOD_CORE_DIRS" . "$HOME/.guix-home/profile/lib/jollygood"))) 238 (simple-service 'custom-fonts-service 239 home-fontconfig-service-type 240 (list "~/.guix-home/profile/share/fonts" 241 '(alias 242 (family "monospace") 243 (prefer 244 (family "Fira Mono")) 245 (prefer 246 (family "Noto Color Emoji"))))) 247 ;; TODO: Setup more advanced MPV config 248 (service home-mpv-service-type 249 (make-home-mpv-configuration 250 #:global (make-mpv-profile-configuration 251 #:hwdec '("auto") 252 #:alang '("en") 253 #:slang '("en")))) 254 (simple-service 'extra-config-files 255 home-xdg-configuration-files-service-type 256 `(("i3blocks/config" ,i3blocks-config) 257 ("tofi/config" ,tofi-config) 258 ("foot/foot.ini" ,foot-config) 259 ("lxqt/lxqt.conf" ,lxqt-config) 260 ("Kvantum/kvantum.kvconfig" ,kvantum-config))) 261 (simple-service 'extra-home-files 262 home-files-service-type 263 `((".Xresources" ,xresources))) 264 ;; Setup a sway configuration 265 (service home-sway-service-type %sway-configuration)) 266 %base-home-services)))) 267 268 lukejw-home-environment
