diff --git a/home-environments/radio.scm b/home-environments/radio.scm index 7c5fa76..fc57133 100644 --- a/home-environments/radio.scm +++ b/home-environments/radio.scm @@ -3,7 +3,7 @@ #|M|# #:use-module (ice-9 match) #|GNU|# - #| |# #:use-module (gnu) + #|•|# #:use-module (gnu) #|H|# #:use-module ((gnu home) #:select (this-home-environment)) #|H|# #:use-module ((gnu home) #:hide (this-home-environment) #:prefix user-) @@ -46,7 +46,7 @@ #:use-module (gnu packages xorg) #|GNU home services|# - #| |# #:use-module (gnu home services) + #|•|# #:use-module (gnu home services) #|D|# #:use-module (gnu home services desktop) #:use-module (gnu home services dotfiles) #|G|# #:use-module (gnu home services guix) @@ -71,7 +71,7 @@ #|W|# #:use-module (radix packages wm) #|Radix home services|# - #| |# #:use-module (radix home services) + #|•|# #:use-module (radix home services) #|G|# #:use-module (radix home services gnupg) #|S|# #:use-module (radix home services shells) #|X|# #:use-module (radix home services xdg) @@ -259,78 +259,93 @@ ("':e'" . "kak") ("':q'" . "exit"))) (abbreviations - (let ((at (symbol-prefix-proc '@)) - (edit (partial string-append "$EDITOR "))) - (append - (map (match-lambda - ((x . y) (abbreviation - (name (at x)) - (position 'anywhere) - (expansion (y x))))) - (associate-right - #|P.A.R.A.|# - ((lambda (dir) - (if (equal? dir 'archive) - (symbol-append '~/. dir) - (symbol-append '~/ dir))) - '(areas projects resources resources/bookmarks archive)) + (let ((@ (symbol-prefix-proc '@)) + (edit (partial format #f "$EDITOR~@{ ~a~}")) + (@radix (partial symbol-append '~/areas/code/scm/radix)) + (@zero (partial symbol-append '~/areas/code/scm/zero))) + `(,@(map (match-lambda + ((x . y) (abbreviation + (name (@ x)) + (position 'anywhere) + (expansion (y x))))) + (associate-right + #|P.A.R.A.|# + ((lambda (dir) + (cond ((equal? dir 'archive) + (symbol-append '~/. dir)) + ((equal? dir 'bookmarks) + (symbol-append '~/resources/ dir)) + (else (symbol-append '~/ dir)))) + '(areas bookmarks projects resources archive)) - #|XDG user directories|# - ((const (fish-function "xdg-user-directory")) - '(desktop documents download music pictures videos)) + #|XDG user directories|# + ((const (fish-function "xdg-user-directory")) + '(desktop documents download music pictures videos)) - #|Code projects|# - ((symbol-prefix-proc '~/projects/code/) - '(c clj cpp hs html kak md pl scm sh tex zig)) + #|Code projects|# + ((symbol-prefix-proc '~/projects/code/) + '(c clj cpp hs html kak md pl scm sh tex zig)) - #|Guix channels|# - ((symbol-prefix-proc '~/projects/code/scm/) - '(ajatt guix radix zero)) + #|Code areas|# + ((symbol-prefix-proc '~/areas/code/scm/) + '(guix radix zero)) - #|Configuration|# - ((symbol-prefix-proc - '~/areas/code/scm/radix/operating-system/) - (list (string->symbol (gethostname)))) - ((symbol-prefix-proc - '~/areas/code/scm/radix/home-environments/) - (list (string->symbol (getlogin)))))) + #|Radix|# + ((partial @radix '/radix/) + '(packages services home/services)) - (map (match-lambda - ((x . y) (abbreviation - (name x) - (expansion y)))) - `(#|Download/Upload|# - (a . "aria2c -j 10 '%'") - (i . "ipfs get %") - (m . "yt-dlp --prefer-free-formats -x '%'") - (v . "yt-dlp --prefer-free-formats '%'") - (z . "curl -F file=@% https://0x0.st | xsel -b"))) + #|Zero|# + ((partial @zero '/operating-systems/) + '(buer)) + ((partial @zero '/home-environments/) + '(radio)) + ((partial @zero '/home-environments/radio/) + '(files)) - (map (match-lambda - ((x . y) (abbreviation - (name x) - (position 'anywhere) - (expansion y)))) - `(#|Shell history|# - (!! . ,(fish-function "bang-bang")) - (!$ . ,(fish-function "bang-dollar")) - (!* . ,(fish-function "bang-star")) + #|Configuration|# + ((symbol-prefix-proc + '~/areas/code/scm/radix/operating-system/) + (list (string->symbol (gethostname)))) + ((symbol-prefix-proc + '~/areas/code/scm/radix/home-environments/) + (list (string->symbol (getlogin)))))) - #|Guix|# - (!dgen . "guix % delete-generations 2w") - (!repair . "doas guix build --repair") - (!pull . "guix pull") - (!home . "guix home reconfigure ~/.config/guix/home.scm") - (!system . "doas guix system reconfigure /etc/config.scm") + ,@(map (match-lambda + ((x . y) (abbreviation + (name x) + (expansion y)))) + `(#|Download/Upload|# + (a . "aria2c -j 10 '%'") + (i . "ipfs get %") + (m . "yt-dlp --prefer-free-formats -x '%'") + (v . "yt-dlp --prefer-free-formats '%'") + (z . "curl -F file=@% https://0x0.st | xsel -b"))) - #|Processes|# - (tf . "setsid -f %>/dev/null 2>&1 & disown") + ,@(map (match-lambda + ((x . y) (abbreviation + (name x) + (position 'anywhere) + (expansion y)))) + `(#|Shell history|# + (!! . ,(fish-function "bang-bang")) + (!$ . ,(fish-function "bang-dollar")) + (!* . ,(fish-function "bang-star")) - #|Quick edit|# - (:e . ,(edit)) - (:system . ,(edit "/etc/config.scm")) - (:home . ,(edit "~/.config/guix/home.scm")) - (:todo . ,(edit "~/areas/meta/todo"))))))))) + #|Guix|# + (!dgen . "guix % delete-generations 2w") + (!repair . "doas guix build --repair") + (!pull . "guix pull") + (!home . "guix home reconfigure ~/.config/guix/home.scm") + (!system . "doas guix system reconfigure /etc/config.scm") + + #|Processes|# + (tf . "setsid -f %>/dev/null 2>&1 & disown") + + #|Quick edit|# + (:e . ,(edit)) + (:system . ,(edit "/etc/config.scm")) + (:home . ,(edit "~/.config/guix/home.scm")) + (:todo . ,(edit "~/areas/meta/todo"))))))))) #|Environment variables services|# (simple-service 'shell-environment-variables @@ -346,7 +361,11 @@ ("GUILE_LOAD_PATH" . ,(format #f "~?~?" "~@{:$HOME/areas/code/scm/~a~}" - '(ajatt radix zero) + '(ajatt + radix + zero + zero/operating-systems + zero/home-environments) "~@{:~a/share/guile/site/3.0~}" '($HOME/.guix-home/profile $XDG_CONFIG_HOME/guix/current