home-environments: radio: Rename home-environment to radio, minor changes

main
Luis Guilherme Coelho 2024-10-28 21:01:21 -03:00
parent 1730718338
commit 0400b67ac8
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
2 changed files with 42 additions and 48 deletions

View File

@ -4,9 +4,7 @@
#|GNU|# #|GNU|#
#||# #:use-module (gnu) #||# #:use-module (gnu)
#|H|# #:use-module ((gnu home) #:select (this-home-environment)) #|H|# #:use-module (gnu home)
#:use-module ((gnu home) #:hide (this-home-environment)
#:prefix user-)
#|GNU packages|# #|GNU packages|#
#|G|# #:use-module (gnu packages gnupg) #|G|# #:use-module (gnu packages gnupg)
@ -43,26 +41,10 @@
#|S|# #:use-module (radix home services shells) #|S|# #:use-module (radix home services shells)
#|X|# #:use-module (radix home services xdg) #|X|# #:use-module (radix home services xdg)
#:export (home-environment #:export (radio))
application:browser (define radio
application:editor (home-environment
application:pager
application:reader
application:shell
application:terminal
application:wm))
#|Default applications|#
(define application:browser "chromium")
(define application:editor "kak")
(define application:pager "less")
(define application:reader "sioyek")
(define application:terminal "foot")
(define application:wm "river")
(define home-environment
(user-home-environment
(packages (packages
(append #|B|# packages:blogging (append #|B|# packages:blogging
#|C|# packages:calendar #|C|# packages:calendar
@ -208,7 +190,6 @@
#|Clear terminal screen without ncurses|# #|Clear terminal screen without ncurses|#
("clear" . "printf \"\\033c\"") ("clear" . "printf \"\\033c\"")
#|Kakoune bindings for info|#
("info" . "info --init-file $XDG_CONFIG_HOME/info") ("info" . "info --init-file $XDG_CONFIG_HOME/info")
#|Kakoune aliases for the shell|# #|Kakoune aliases for the shell|#
@ -233,7 +214,6 @@
(position 'anywhere) (position 'anywhere)
(expansion y)))) (expansion y))))
`(#|Guix|# `(#|Guix|#
(!dgen . "guix % delete-generations 2w")
(!repair . "doas guix build --repair") (!repair . "doas guix build --repair")
(!pull . "guix pull") (!pull . "guix pull")
(!repl . "guix repl -i ~/.config/guile/guilerc") (!repl . "guix repl -i ~/.config/guile/guilerc")
@ -335,15 +315,15 @@
`(("LANG" . "en_US.UTF-8") `(("LANG" . "en_US.UTF-8")
("LANGUAGE" . "en_US.UTF-8") ("LANGUAGE" . "en_US.UTF-8")
("LC_COLLATE" . "C"))) ("LC_COLLATE" . "C")))
(simple-service 'home-default-applications-environment-variables (simple-service 'home-default-applications-environment-variables
home-environment-variables-service-type home-environment-variables-service-type
`(("BROWSER" . ,application:browser) `(("BROWSER" . "chromium")
("EDITOR" . ,application:editor) ("EDITOR" . "kak")
("PAGER" . ,application:pager) ("PAGER" . "less")
("READER" . ,application:reader) ("TERMINAL" . "foot")
("TERMINAL" . ,application:terminal) ("VISUAL" . "$EDITOR")
("VISUAL" . ,application:editor) ("WM" . "river")))
("WM" . ,application:wm)))
(simple-service 'home-applications-environment-variables (simple-service 'home-applications-environment-variables
home-environment-variables-service-type home-environment-variables-service-type
`(("MINETEST_USER_PATH" . "$XDG_DATA_HOME/minetest"))) `(("MINETEST_USER_PATH" . "$XDG_DATA_HOME/minetest")))
@ -393,4 +373,4 @@
(full-message "Unplug the cable") (full-message "Unplug the cable")
(warning-message "You may want to plug the cable") (warning-message "You may want to plug the cable")
(critical-message "Plug the cable"))))))) (critical-message "Plug the cable")))))))
home-environment radio

View File

@ -0,0 +1,14 @@
#!/usr/bin/env -S guile
!#
(use-modules (ice-9 textual-ports)
(srfi srfi-197)
(radix utils))
(for-each (lambda (line)
(display line)
(newline))
(chain (current-input-port)
(get-string-all _)
(string-split _ #\newline)
(duplicates _)))