Compare commits

...

65 Commits

Author SHA1 Message Date
Luis Guilherme Coelho a2da805db2
buer: shepherd-services: Add repl 2024-11-25 14:29:50 -03:00
Luis Guilherme Coelho 55e3457d42
home-environments: radio: Add shepherd-service:repl 2024-11-25 14:29:50 -03:00
Luis Guilherme Coelho cd0ad6cdc0
buer: rules: Allow wheel group to trigger the snapshot-@home timer 2024-11-25 14:29:49 -03:00
Luis Guilherme Coelho e4d923dd41
operating-systems: buer: Remove unnecessary comments 2024-11-25 14:29:49 -03:00
Luis Guilherme Coelho c4f002b98b
operating-systems: buer: Use spawn-shell-command instead of system since a lambda action should be suspendable 2024-11-25 14:29:49 -03:00
Luis Guilherme Coelho 153fda0b68
home-environments: radio: Use spawn-shell-command instead of system since a lambda action should be suspendable 2024-11-25 14:29:45 -03:00
Luis Guilherme Coelho 90b6c5d6c2
operating-systems: buer: Add comment on essential-services section 2024-11-25 14:29:45 -03:00
Luis Guilherme Coelho 635bf92b33
home-environments: radio: Setup timer-related shepherd-services 2024-11-25 14:29:41 -03:00
Luis Guilherme Coelho 99675cf4fd
operating-systems: buer: Setup timer-related shepherd-services 2024-11-25 14:29:40 -03:00
Luis Guilherme Coelho dee7ef2278
home-environments: radio: Add shepherd/modules to GUILE_LOAD_PATH 2024-11-25 14:29:40 -03:00
Luis Guilherme Coelho b29b97ecdc
radio: files: Add kew 2024-11-25 14:29:40 -03:00
Luis Guilherme Coelho 0a0e377d5f
operating-systems: buer: Use shepherd 1.0.0rc1 2024-11-25 14:29:40 -03:00
Luis Guilherme Coelho 9e8dd2e5fb
buer: file-systems: Add an @snapshot subvolume 2024-11-25 14:29:40 -03:00
Luis Guilherme Coelho 1f0b494c92
home-environments: radio: Use shepherd 1.0.0rc1 2024-11-25 14:29:39 -03:00
Luis Guilherme Coelho 41e30ceea3
home-environments: radio: Remove channel:saayix 2024-11-25 14:29:39 -03:00
Luis Guilherme Coelho 175f65b36a
radio: files: senpai: Fix on-highlight script 2024-11-25 14:29:39 -03:00
Luis Guilherme Coelho b554ff7c61
home-environments: radio: Add packages:music 2024-11-25 14:29:39 -03:00
Luis Guilherme Coelho 0a9e7836d1
buer: kernel: Refer to right defconfig location an use latest available kernel 2024-11-25 14:29:39 -03:00
Luis Guilherme Coelho b080b626f5
radio: files: newsraft: Update feeds file syntax 2024-11-25 14:29:39 -03:00
Luis Guilherme Coelho 48dfffc5ec
radio: packages: Remove riverguile and river-bnf 2024-11-25 14:29:39 -03:00
Luis Guilherme Coelho 756c977ff0
operating-systems: buer: Remove psmisc utils 2024-11-25 14:29:38 -03:00
Luis Guilherme Coelho d2fd2d91bc
operating-systems: buer: Remove wireguard-tools, since it's currently unused 2024-11-25 14:29:38 -03:00
Luis Guilherme Coelho 7fe98bb4eb
operating-systems: buer: Remove extra comment tag in module imports 2024-11-25 14:29:38 -03:00
Luis Guilherme Coelho 93e55ebeea
buer: file-systems: Use in /run and /var/run the file-system-flags and file-system-options proposed by Hilton Chain in issues.guix.gnu.org/73494 2024-11-25 14:29:38 -03:00
Luis Guilherme Coelho a92f73cd17
radio: packages: Remove keepassxc 2024-11-25 14:29:38 -03:00
Luis Guilherme Coelho 215f23ac08
radio: files: Add senpai 2024-11-25 14:29:38 -03:00
Luis Guilherme Coelho afe083bf9f
home-environments: radio: Add !pass abbreviation for obtaining passwords more quickly 2024-11-25 14:29:37 -03:00
Luis Guilherme Coelho 32dc462518
buer: file-systems: Remove /etc/wireguard as persistent directory, since it's currently unused 2024-11-25 14:29:37 -03:00
Luis Guilherme Coelho 9134370c23
operating-systems: buer: Add /swap/swapfile for eventual long hibernations 2024-11-25 14:29:37 -03:00
Luis Guilherme Coelho 92aa147de0
operating-systems: buer: Remove extra slash when symlinking persistent files 2024-11-25 14:29:37 -03:00
Luis Guilherme Coelho 0d8a3530d8
operating-systems: buer: Remove unecessary module import 2024-11-25 14:29:37 -03:00
Luis Guilherme Coelho cb926a465f
operating-systems: buer: Remove avahi 2024-11-25 14:29:37 -03:00
Luis Guilherme Coelho 71085e8bdc
home-environments: radio: Set PASSWORD_STORE_DIR 2024-11-25 14:29:37 -03:00
Luis Guilherme Coelho 21842d797f
home-environments: radio: Add saayix 2024-11-25 14:29:36 -03:00
Luis Guilherme Coelho 56ab23db09
radio: channels: Add saayix 2024-11-25 14:29:36 -03:00
Luis Guilherme Coelho 8936be6122
radio: files: river: Bind senpai to super+s 2024-11-25 14:29:36 -03:00
Luis Guilherme Coelho 3bfe6aef0a
radio: packages: Add senpai, password-store and tessen 2024-11-25 14:29:36 -03:00
Luis Guilherme Coelho 023c2ff278
radio: packages: Remove perl (now propagated by kakoune), and re-declare red-eclipse and xonotic 2024-11-25 14:29:36 -03:00
Luis Guilherme Coelho 7c7784f712
radio: files: kak: Add missing backslash in kakrc 2024-11-25 14:29:36 -03:00
Luis Guilherme Coelho 2e333cfd52
radio: files: sioyek: Disable highlight 2024-11-25 14:29:35 -03:00
Luis Guilherme Coelho 4bf0c07e7e
radio: files: lf: Set watch to true in lfrc 2024-11-25 14:29:35 -03:00
Luis Guilherme Coelho 4fbfa8455f
radio: files: kak: Remove stateful management of plugins in kakrc 2024-11-25 14:29:35 -03:00
Luis Guilherme Coelho 71d42de750
radio: packages: Manage kakoune plugins declaratively 2024-11-25 14:29:35 -03:00
Luis Guilherme Coelho 0d98814e7f
home-environments: radio: Add missing comma in !network abbreviation definition 2024-11-25 14:29:35 -03:00
Luis Guilherme Coelho e586332b9c
home-environments: Add !network abbreviation to restart networking and wpa-supplicant system services 2024-11-25 14:29:35 -03:00
Luis Guilherme Coelho 8c3fb4ef2b
home-environments: radio: Add ~/.config/guix/home.scm as a special file that symlinks to (home-environments radio) module location 2024-11-25 14:29:35 -03:00
Luis Guilherme Coelho a94c55bc8d
operating-systems: buer: Remove guix-publish service 2024-11-25 14:29:34 -03:00
Luis Guilherme Coelho c610f2f584
operating-systems: buer: Add /etc/config.scm as a special file that symlinks to (operating-systems buer) module location 2024-11-25 14:29:34 -03:00
Luis Guilherme Coelho b0cb05691f
operating-systems: buer: Remove extra indicator comment 2024-11-25 14:29:34 -03:00
Luis Guilherme Coelho 00101cc001
buer: file-systems: Remove /etc/config.scm from persistent files 2024-11-25 14:29:34 -03:00
Luis Guilherme Coelho 716148ec93
radio: files: btop: Disable showing swap as a partition 2024-11-25 14:29:34 -03:00
Luis Guilherme Coelho 6f8d4a801c
operating-systems: buer: Set uncompressed zram size to 2*ram, use greetd-service-type from (radix services greetd) 2024-11-25 14:29:34 -03:00
Luis Guilherme Coelho c2fb04f2b8
radio: files: newsraft: Remove feed entries related to FreeBSD 2024-11-25 14:29:34 -03:00
Luis Guilherme Coelho 516455fd24
operating-systems: buer: Remove guix-for-channels declaration 2024-11-25 14:29:33 -03:00
Luis Guilherme Coelho 819748a90c
home-environments: radio: temporarly remove packages:games and some development packages 2024-11-25 14:29:33 -03:00
Luis Guilherme Coelho 22f1906d61
radio: packages: Use newsraft from (gnu packages syndication) 2024-11-25 14:29:33 -03:00
Luis Guilherme Coelho b045c14bf9
operating-systems: buer: Use guix-for-channels to instantiate a custom guix 2024-11-25 14:29:33 -03:00
Luis Guilherme Coelho a5d37057db
buer: file-systems: Remove /gnu/persist/mnt 2024-11-25 14:29:33 -03:00
Luis Guilherme Coelho e29f80d43b
operating-systems: buer: Add installation scripts 2024-11-25 14:29:33 -03:00
Luis Guilherme Coelho b4a4daa914
operating-systems: buer: Move to impermanence setup 2024-11-25 14:29:32 -03:00
Luis Guilherme Coelho 322e24af31
operating-systems: buer: Add https://guix.bordeaux.inria.fr 2024-11-25 14:29:32 -03:00
Luis Guilherme Coelho e89d1fb601
buer: substitute-keys: Add inria.pub 2024-11-25 14:29:32 -03:00
Luis Guilherme Coelho 1810fac47d
operating-systems: buer: Rename operating-system to buer 2024-11-25 14:29:32 -03:00
Luis Guilherme Coelho 0400b67ac8
home-environments: radio: Rename home-environment to radio, minor changes 2024-11-25 14:29:32 -03:00
Luis Guilherme Coelho 1730718338
operating-systems: buer: Update kernel version 2024-11-25 14:29:27 -03:00
26 changed files with 607 additions and 326 deletions

View File

@ -4,13 +4,12 @@
#|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)
#|L|# #:use-module (gnu packages linux) #|L|# #:use-module (gnu packages linux)
#|S|# #:use-module (gnu packages shells)
#|GNU home services|# #|GNU home services|#
#||# #:use-module (gnu home services) #||# #:use-module (gnu home services)
@ -29,6 +28,7 @@
#|Radio|# #|Radio|#
#|C|# #:use-module ((radio channels) #:prefix channel:) #|C|# #:use-module ((radio channels) #:prefix channel:)
#|P|# #:use-module ((radio packages) #:prefix packages:) #|P|# #:use-module ((radio packages) #:prefix packages:)
#|S|# #:use-module ((radio shepherd-services) #:prefix shepherd-service:)
#|Radix|# #|Radix|#
#|C|# #:use-module (radix combinators) #|C|# #:use-module (radix combinators)
@ -43,35 +43,23 @@
#|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 radio.scm))
application:browser (define radio.scm
application:editor (search-path %load-path
application:pager (module-filename (current-module))))
application:reader
application:shell
application:terminal
application:wm))
#|Default applications|# (define radio
(define application:browser "chromium") (home-environment
(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
#|D|# packages:databases packages:desktop packages:development #|D|# packages:databases packages:desktop packages:development
packages:documentation packages:downloads packages:documentation packages:downloads
#|F|# packages:file-managing packages:fonts #|F|# packages:file-managing packages:fonts
#|G|# packages:games packages:guix-contrib #|G|# packages:guix-contrib
#|I|# packages:image #|I|# packages:image
#|M|# packages:messaging #|M|# packages:messaging packages:music
#|P|# packages:password #|P|# packages:password
#|R|# packages:reading #|R|# packages:reading
#|S|# packages:scheme packages:sound #|S|# packages:scheme packages:sound
@ -82,14 +70,14 @@
(list #|XDG services|# (list #|XDG services|#
(service home-xdg-user-directories-service-type (service home-xdg-user-directories-service-type
(home-xdg-user-directories-configuration (home-xdg-user-directories-configuration
(desktop "$HOME/areas") (desktop "$HOME/areas")
(documents "$HOME/areas/documents") (documents "$HOME/areas/documents")
(download "$HOME/media/downloads") (download "$HOME/media/downloads")
(music "$HOME/media/music") (music "$HOME/media/music")
(pictures "$HOME/media/pictures") (pictures "$HOME/media/pictures")
(videos "$HOME/media/videos") (videos "$HOME/media/videos")
(publicshare "") (publicshare "")
(templates ""))) (templates "")))
(service home-xdg-mime-applications-service-type (service home-xdg-mime-applications-service-type
(home-xdg-mime-applications-configuration (home-xdg-mime-applications-configuration
@ -140,6 +128,8 @@
"image/webp")) "image/webp"))
('sioyek.desktop ('sioyek.desktop
`("application/pdf")))))) `("application/pdf"))))))
(service home-special-files-service-type
`((".config/guix/home.scm" ,radio.scm)))
#|Dotfiles service|# #|Dotfiles service|#
(service home-dotfiles-service-type (service home-dotfiles-service-type
@ -153,8 +143,13 @@
(list channel:guix (list channel:guix
channel:radix)) channel:radix))
#|Shepherd service|# #|Shepherd services|#
(service home-shepherd-service-type) (service home-shepherd-service-type
(home-shepherd-configuration
(shepherd (@ (shepherd-package) shepherd))
(services (list shepherd-service:repl
shepherd-service:timer
shepherd-service:wake-up))))
#|Shell services|# #|Shell services|#
(service home-tty-colorscheme-service-type (service home-tty-colorscheme-service-type
@ -179,6 +174,7 @@
(home-fish-configuration (home-fish-configuration
(plugins (plugins
(list fish-autopair (list fish-autopair
fish-foreign-env
fish-puffer)) fish-puffer))
(environment-variables (environment-variables
`(#|GNU Privacy Guard|# `(#|GNU Privacy Guard|#
@ -194,21 +190,20 @@
("TERMINFO" . "$XDG_DATA_HOME/terminfo"))) ("TERMINFO" . "$XDG_DATA_HOME/terminfo")))
(aliases (aliases
`(#|Common aliases|# `(#|Common aliases|#
("df" . "df -h") ("df" . "df -h")
("du" . "du -h") ("du" . "du -h")
("diff" . "diff --color=auto") ("diff" . "diff --color=auto")
("grep" . "grep --color=auto") ("grep" . "grep --color=auto")
("ip" . "ip --color=auto") ("ip" . "ip --color=auto")
("ls" . ,(format #f "ls --color=auto ~ ("ls" . ,(format #f "ls --color=auto ~
--group-directories-first ~ --group-directories-first ~
--classify ~ --classify ~
--human-readable ~ --human-readable ~
-v")) -v"))
#|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,12 +228,16 @@
(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")
(!home . "guix home reconfigure ~/.config/guix/home.scm") (!home . "guix home reconfigure ~/.config/guix/home.scm")
(!system . "doas guix system reconfigure /etc/config.scm") (!system . "doas guix system reconfigure /etc/config.scm")
(!network . ,(format #f "doas herd restart networking ~
&& doas herd restart wpa-supplicant"))
#|Pass|#
(!pass . "pass show % | wl-copy")
#|Processes|# #|Processes|#
(tf . "setsid -f % >/dev/null 2>&1 & disown") (tf . "setsid -f % >/dev/null 2>&1 & disown")
@ -301,7 +300,7 @@
#|Environment variables services|# #|Environment variables services|#
(simple-service 'home-shell-environment-variables (simple-service 'home-shell-environment-variables
home-environment-variables-service-type home-environment-variables-service-type
`(("PATH" . "$HOME/.local/bin:$PATH") `(("PATH" . "$HOME/.local/bin:$PATH")
("INPUTRC" . "$XDG_CONFIG_HOME/readline/inputrc"))) ("INPUTRC" . "$XDG_CONFIG_HOME/readline/inputrc")))
(simple-service 'home-guile-environment-variables (simple-service 'home-guile-environment-variables
home-environment-variables-service-type home-environment-variables-service-type
@ -311,6 +310,8 @@
. ,(format #f "~?~?" . ,(format #f "~?~?"
"~@{:$HOME/areas/code/scm/~a~}" "~@{:$HOME/areas/code/scm/~a~}"
'(radix '(radix
shepherd/modules
shepherd/.guix/modules
zero zero
zero/operating-systems zero/operating-systems
zero/home-environments) zero/home-environments)
@ -337,16 +338,16 @@
("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")
("PASSWORD_STORE_DIR" . "$HOME/.local/share/pass")))
#|SSH service|# #|SSH service|#
(service home-openssh-service-type (service home-openssh-service-type
@ -393,4 +394,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

@ -2,7 +2,7 @@
#:use-module (guix channels) #:use-module (guix channels)
#:use-module (gnu packages package-management) #:use-module (gnu packages package-management)
#:export (guix radix)) #:export (guix radix saayix))
(define guix (define guix
(channel (channel
@ -25,3 +25,14 @@
"f9130e11e35d2c147c6764ef85542dc58dc09c4f" "f9130e11e35d2c147c6764ef85542dc58dc09c4f"
(openpgp-fingerprint (openpgp-fingerprint
"F164 709E 5FC7 B32B AEC7 9F37 1F2E 76AC E3F5 31C8"))))) "F164 709E 5FC7 B32B AEC7 9F37 1F2E 76AC E3F5 31C8")))))
(define saayix
(channel
(name 'saayix)
(url "https://codeberg.org/look/saayix.git")
(branch "entropy")
(introduction
(make-channel-introduction
"12540f593092e9a177eb8a974a57bb4892327752"
(openpgp-fingerprint
"3FFA 7335 973E 0A49 47FC 0A8C 38D5 96BE 07D3 34AB")))))

View File

@ -166,7 +166,7 @@ zfs_arc_cached = True
show_swap = True show_swap = True
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk. #* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
swap_disk = True swap_disk = False
#* If mem box should be split to also show disks info. #* If mem box should be split to also show disks info.
show_disks = True show_disks = True

View File

@ -364,80 +364,41 @@ hook global WinSetOption filetype=kak %{
} }
} }
# __________ plugins __________ hook global KakEnd .* %{
source "%val{config}/plugins/plug.kak/rc/plug.kak" evaluate-commands 'state-save-reg-save colon'
plug "andreyorst/plug.kak" noload # manually installed plugin manager evaluate-commands 'state-save-reg-save pipe'
evaluate-commands 'state-save-reg-save slash'
} # save kakoune state
# configure this hook global KakBegin .* %{
plug "occivink/kakoune-phantom-selection" # work on multiple selections, one at a time evaluate-commands 'state-save-reg-load colon'
evaluate-commands 'state-save-reg-load pipe'
evaluate-commands 'state-save-reg-load slash'
} # restore kakoune state
plug "maximbaz/surround.kak" # easily surround selections with parentesis or quotes hook global WinCreate .* %{
kakboard-enable
plug "https://gitlab.com/Screwtapello/kakoune-texinfo" # read info pages inside kakoune
plug "https://gitlab.com/Screwtapello/kakoune-state-save" config %{
hook global KakBegin .* %{
evaluate-commands 'state-save-reg-load colon'
evaluate-commands 'state-save-reg-load pipe'
evaluate-commands 'state-save-reg-load slash'
}
hook global KakEnd .* %{
evaluate-commands 'state-save-reg-save colon'
evaluate-commands 'state-save-reg-save pipe'
evaluate-commands 'state-save-reg-save slash'
}
} # save and restore state between sessions
# plug "https://codeberg.org/anemofilia/relapath.kak" demand relapath %{
# alias global cd relapath-change-directory
# alias global e relapath-edit
# alias global e! relapath-edit-bang
#
# alias global change-directory relapath-change-directory
# alias global edit relapath-edit
# alias global edit! relapath-edit-bang
# alias global rename-buffer relapath-rename-buffer
#
# relapath-modelinefmt-replace global
# } # no dereference symlinks
plug 'delapouite/kakoune-buffers' # ease navigation between opened buffers.
plug "https://gitlab.com/Screwtapello/kakoune-texinfo.git" # texinfo
plug "jpcornwell/kakoune-sokoban" # sokoban because yes
plug "lePerdu/kakboard" config %{
hook global WinCreate .* %{ kakboard-enable }
} # sync clipboards } # sync clipboards
plug "JJK96/kakoune-rainbow"
set-option global rainbow_opening "[[(]"
declare-option str-list rainbow_faces "rgb:a790d3" "rgb:6cdae0" "rgb:ff7f50" \
"rgb:ffea8c" "rgb:83dcaf" "rgb:eba4d4" \
"rgb:8b5be7"
# add coloring to matching parenthesis # add coloring to matching parenthesis
set-option global rainbow_opening "[[(]"
declare-option str-list rainbow_faces \
"rgb:a790d3" "rgb:6cdae0" "rgb:ff7f50" \
"rgb:ffea8c" "rgb:83dcaf" "rgb:eba4d4" \
"rgb:8b5be7"
plug "alexherbo2/auto-pairs.kak" config %{ # auto pairing
set-option global auto_pairs ( ) { } [ ] '"' '"' "'" "'" ` ` set-option global auto_pairs ( ) { } [ ] '"' '"' "'" "'" ` `
hook -group config global BufSetOption filetype=latex %{ hook -group config global BufSetOption filetype=latex %{
set-option buffer auto_pairs ( ) [ ] { } '"' '"' $ $ set-option buffer auto_pairs ( ) [ ] { } '"' '"' $ $
} }
hook -group config global BufSetOption filetype=scheme %{ hook -group config global BufSetOption filetype=scheme %{
set-option buffer auto_pairs ( ) [ ] { } '"' '"' set-option buffer auto_pairs ( ) [ ] { } '"' '"'
} }
hook -group config global BufSetOption filetype=typst %{ hook -group config global BufSetOption filetype=typst %{
set-option buffer auto_pairs ( ) [ ] { } '"' '"' $ $ * * set-option buffer auto_pairs ( ) [ ] { } '"' '"' $ $ * *
} }
evaluate-commands enable-auto-pairs evaluate-commands enable-auto-pairs
} # auto-pairing of characters
plug "Delapouite/kakoune-palette" config %{
hook global BufOpenFile .*colorscheme.kak %{
evaluate-commands palette-gutter
}
} # preview face colors in kakoune
# __________ lsp __________ # __________ lsp __________
eval %sh{kak-lsp --kakoune -s $kak_session} eval %sh{kak-lsp --kakoune -s $kak_session}

View File

@ -0,0 +1,64 @@
# Make sure that kew is closed before editing this file in order for changes to take effect.
path=/home/radio/media/music/by-artist
coverEnabled=1
coverAnsi=0
visualizerEnabled=1
visualizerHeight=5
useProfileColors=1
allowNotifications=1
hideLogo=0
hideHelp=1
lastVolume=100
# Cache: Set to 1 to use cache of the music library directory tree for faster startup times.
cacheLibrary=-1
# Color values are 0=Black, 1=Red, 2=Green, 3=Yellow, 4=Blue, 5=Magenta, 6=Cyan, 7=White
# These mostly affect the library view.
# Logo color:
color=4
# Header color in library view:
artistColor=4
# Now playing song text in library view:
titleColor=4
# Color of enqueued songs in library view:
enqueuedColor=7
# Key Bindings:
volumeUp=+
volumeUpAlt==
volumeDown=-
previousTrackAlt=h
nextTrackAlt=l
scrollUpAlt=k
scrollDownAlt=j
switchNumberedSong=
togglePause=p
toggleColorsDerivedFrom=i
toggleVisualizer=v
toggleAscii=b
toggleRepeat=r
toggleShuffle=s
seekBackward=a
seekForward=d
savePlaylist=x
addToMainPlaylist=.
updateLibrary=u
# The different main views, normally F2-F6:
showPlaylistAlt=Z
showLibraryAlt=X
showTrackAlt=C
showSearchAlt=V
showKeysAlt=B
quit=q
# For special keys use terminal codes: OS, for F4 for instance. This can depend on the terminal.
# You can find out the codes for the keys by using tools like showkey.
# For special keys, see the key value after the bracket "[" after typing "showkey -a" in the terminal and then pressing a key you want info about.

View File

@ -25,6 +25,7 @@ set promptfmt "\033[34m%d%f\033[0m"
set statfmt "\033[34m%p\033[0m| %c| %u| %g| %S| %t| -> %l" set statfmt "\033[34m%p\033[0m| %c| %u| %g| %S| %t| -> %l"
# Basic Settings # Basic Settings
set watch true
set preview true set preview true
set sixel true set sixel true
set shell /bin/sh set shell /bin/sh

View File

@ -1,13 +1,10 @@
@ Articles @ Articles
https://cyber.dabamos.de/blog/feed.rss "Cyber Dabamos" https://cyber.dabamos.de/blog/feed.rss "Cyber Dabamos"
https://drewdevault.com/blog/index.xml "Drew DeVault" https://drewdevault.com/blog/index.xml "Drew DeVault"
https://edwardsnowden.substack.com/feed "Edward Snowden" {60}
https://feeds.twit.tv/floss.xml "Floss Weekly" https://feeds.twit.tv/floss.xml "Floss Weekly"
https://forums.freebsd.org/forums/howtos-and-faqs-moderated.39/index.rss "FreeBSD Forum Hacks and FAQ's"
https://forums.freebsd.org/forums/-/index.rss "FreeBSD Forum Index"
https://m7.rs/feed.xml "Gabriel Fontes" https://m7.rs/feed.xml "Gabriel Fontes"
https://gsthnz.com/posts/index.xml "Gustavo Heinz" https://gsthnz.com/posts/index.xml "Gustavo Heinz"
https://lukesmith.xyz/rss.xml "Luke Smith" {60} https://lukesmith.xyz/rss.xml "Luke Smith"
https://www.privacytools.io/guides/rss.xml "Privacy Tools" https://www.privacytools.io/guides/rss.xml "Privacy Tools"
https://michaelneuper.com/index.xml "Michael Neuper" https://michaelneuper.com/index.xml "Michael Neuper"
https://ohhelloana.blog/feed.xml "Oh Hello Ana" https://ohhelloana.blog/feed.xml "Oh Hello Ana"
@ -24,7 +21,7 @@ https://yewtu.be/feed/channel/UCweCc7bSMX5J4jEH7HFImng "G
https://yewtu.be/feed/channel/UCSAo4zvM1oAJ_i4C6q6ejBA "Raffael Chess" https://yewtu.be/feed/channel/UCSAo4zvM1oAJ_i4C6q6ejBA "Raffael Chess"
https://yewtu.be/feed/channel/UC5K-TQsItHnNLjqYf8A3CTw "Xadrez Brasil" https://yewtu.be/feed/channel/UC5K-TQsItHnNLjqYf8A3CTw "Xadrez Brasil"
@ Politics {60} @ Politics < reload-period 60
https://yewtu.be/feed/channel/UCkSjy-IOEq-eMtarZl2uH1Q "Arthur do Val" https://yewtu.be/feed/channel/UCkSjy-IOEq-eMtarZl2uH1Q "Arthur do Val"
https://yewtu.be/feed/channel/UC7-Pp09PJX_SYP9oyMzUAtg "Assim disse o João" https://yewtu.be/feed/channel/UC7-Pp09PJX_SYP9oyMzUAtg "Assim disse o João"
https://odysee.com/$/rss/@Fhoer:f "Fhoer" https://odysee.com/$/rss/@Fhoer:f "Fhoer"
@ -37,7 +34,7 @@ https://www.yewtu.be/feed/channel/UCk5BcU1rOy6hepflk7_q_Pw "M
https://yewtu.be/feed/channel/UCZdJE8KpuFm6NRafHTEIC-g "Tempero Drag" https://yewtu.be/feed/channel/UCZdJE8KpuFm6NRafHTEIC-g "Tempero Drag"
https://yewtu.be/feed/channel/UC0fGGprihDIlQ3ykWvcb9hg "Tese Onze" https://yewtu.be/feed/channel/UC0fGGprihDIlQ3ykWvcb9hg "Tese Onze"
@ Hacker Videos {60} @ Hacker Videos < reload-period 60
https://odysee.com/$/rss/@blenderdumbass:f "Blender Dumbass" https://odysee.com/$/rss/@blenderdumbass:f "Blender Dumbass"
https://odysee.com/$/rss/@BrodieRobertson:5 "Brodie Robertson" https://odysee.com/$/rss/@BrodieRobertson:5 "Brodie Robertson"
https://odysee.com/$/rss/@debxp:9 "Debxp" https://odysee.com/$/rss/@debxp:9 "Debxp"
@ -54,12 +51,12 @@ https://odysee.com/$/rss/@slackjeff:1 "S
https://yewtu.be/feed/channel/UCjr2bPAyPV7t35MvcgT3W8Q "The Hated One" https://yewtu.be/feed/channel/UCjr2bPAyPV7t35MvcgT3W8Q "The Hated One"
https://odysee.com/$/rss/@TheLinuxExperiment:e "The Linux Experiment" https://odysee.com/$/rss/@TheLinuxExperiment:e "The Linux Experiment"
@ Enviromental News {720} @ Enviromental News < reload-period 720
https://www.greenpeace.org/brasil/feed/ "Greenpeace - Brasil" https://www.greenpeace.org/brasil/feed/ "Greenpeace - Brasil"
https://www.greenpeace.org/international/feed/ "Greenpeace - International" https://www.greenpeace.org/international/feed/ "Greenpeace - International"
https://revistaforum.com.br/rss/feed.html?r=5 "Revista Fórum - Meio Ambiente" https://revistaforum.com.br/rss/feed.html?r=5 "Revista Fórum - Meio Ambiente"
@ Scheme {720} @ Scheme < reload-period 720
https://www.blogger.com/feeds/7061944/posts/default?alt=atom "(The Scheme Way)" https://www.blogger.com/feeds/7061944/posts/default?alt=atom "(The Scheme Way)"
http://pestilenz.org/~ckeen/blog//scheme.atom "/dev/random" http://pestilenz.org/~ckeen/blog//scheme.atom "/dev/random"
https://www.blogger.com/feeds/8288194986820249216/posts/default/-/scheme "Abstract Heresies" https://www.blogger.com/feeds/8288194986820249216/posts/default/-/scheme "Abstract Heresies"
@ -114,7 +111,7 @@ http://shisaa.be/categories/scheme.xml "s
https://weinholt.se/feed.xml "weinholt.se" https://weinholt.se/feed.xml "weinholt.se"
https://wingolog.org/feed/atom "wingolog" https://wingolog.org/feed/atom "wingolog"
@ Mathematics and Computer Science {60} @ Mathematics and Computer Science < reload-period 60
https://yewtu.be/feed/channel/UCYO_jab_esuFRV4b17AJtAw "3Blue1Brown" https://yewtu.be/feed/channel/UCYO_jab_esuFRV4b17AJtAw "3Blue1Brown"
https://yewtu.be/feed/channel/UCzBjutX2PmitNF4avysL-vg "Aleph 0" https://yewtu.be/feed/channel/UCzBjutX2PmitNF4avysL-vg "Aleph 0"
https://yewtu.be/feed/channel/UC9-y-6csu5WGm29I7JiwpnA "Computerphile" https://yewtu.be/feed/channel/UC9-y-6csu5WGm29I7JiwpnA "Computerphile"
@ -126,7 +123,7 @@ https://yewtu.be/feed/channel/UCoxcjq-8xIDTYp3uz647V5A "N
https://yewtu.be/feed/channel/UCr7lmzIk63PZnBw3bezl-Mg "The Math Sorcerer" https://yewtu.be/feed/channel/UCr7lmzIk63PZnBw3bezl-Mg "The Math Sorcerer"
https://yewtu.be/feed/channel/UCHnyfMqiRRG1u-2MsSQLbXA "Veritasium" https://yewtu.be/feed/channel/UCHnyfMqiRRG1u-2MsSQLbXA "Veritasium"
@ News {60} @ News < reload-period 60
https://agencia.fapesp.br/rss/ "Agência Fapesp" https://agencia.fapesp.br/rss/ "Agência Fapesp"
https://baixacultura.org/feed/ "Baixa Cultura" https://baixacultura.org/feed/ "Baixa Cultura"
https://www.brasildefato.com.br/rss2.xml "Brasil de Fato" https://www.brasildefato.com.br/rss2.xml "Brasil de Fato"
@ -138,13 +135,13 @@ https://nucleo.jor.br/rss/ "N
https://www.phoronix.com/rss.php "Phoronix" https://www.phoronix.com/rss.php "Phoronix"
http://rss.slashdot.org/Slashdot/slashdotMain "Slashdot" http://rss.slashdot.org/Slashdot/slashdotMain "Slashdot"
@ Veganism {600} @ Veganism < reload-period 600
https://yewtu.be/feed/channel/UCYamjJAo9qHUIN1jLYEDN4w "Eduardo Corassa" https://yewtu.be/feed/channel/UCYamjJAo9qHUIN1jLYEDN4w "Eduardo Corassa"
https://yewtu.be/feed/channel/UCZ6JHFBaDUJ9wfo41HSII_w "Fábio Chaves" https://yewtu.be/feed/channel/UCZ6JHFBaDUJ9wfo41HSII_w "Fábio Chaves"
https://yewtu.be/feed/channel/UCvyxOb6wDUGmMZFbV3cJeXg "Giancarlo Eidler" https://yewtu.be/feed/channel/UCvyxOb6wDUGmMZFbV3cJeXg "Giancarlo Eidler"
https://yewtu.be/feed/channel/UCptCWTO2uq6jXcJLEvRhr8g "Dr Eric Slywitch" https://yewtu.be/feed/channel/UCptCWTO2uq6jXcJLEvRhr8g "Dr Eric Slywitch"
@ Calisthenics {600} @ Calisthenics < reload-period 600
https://yewtu.be/feed/channel/UC1CVzH-XVr3E-kTT6D8hhfg "FitnessFAQs" https://yewtu.be/feed/channel/UC1CVzH-XVr3E-kTT6D8hhfg "FitnessFAQs"
https://yewtu.be/feed/channel/UCb9pq9JLs2m5Drn_ftcRkIw "Hemo Calisthenics" https://yewtu.be/feed/channel/UCb9pq9JLs2m5Drn_ftcRkIw "Hemo Calisthenics"
https://yewtu.be/feed/channel/UCUkyyRJdVdXFmBuxPLFYmPw "K. Boges" https://yewtu.be/feed/channel/UCUkyyRJdVdXFmBuxPLFYmPw "K. Boges"
@ -157,5 +154,5 @@ https://yewtu.be/feed/channel/UCpyhJZhJQWKDdJCR07jPY-Q "S
https://yewtu.be/feed/channel/UC41yTzQIzrCr7Edij7Ha4wA "The Jacked Vegan" https://yewtu.be/feed/channel/UC41yTzQIzrCr7Edij7Ha4wA "The Jacked Vegan"
https://yewtu.be/feed/channel/UCAo68fdu-hYfgO0y0n-J8qg "Trainer Winny" https://yewtu.be/feed/channel/UCAo68fdu-hYfgO0y0n-J8qg "Trainer Winny"
@ Ecology {600} @ Ecology < reload-period 600
https://yewtu.be/feed/channel/UCj4Y34OeIG0y_IRGMiiQLCg "Bioconstrução ArteNativamente" https://yewtu.be/feed/channel/UCj4Y34OeIG0y_IRGMiiQLCg "Bioconstrução ArteNativamente"

View File

@ -166,6 +166,9 @@ riverctl map normal Super d spawn "$TERMINAL -e lf"
# btop # btop
riverctl map normal Super b spawn "$TERMINAL -e btop" riverctl map normal Super b spawn "$TERMINAL -e btop"
# senpai
riverctl map normal Super s spawn "$TERMINAL -e senpai"
# application launcher # application launcher
riverctl map normal Super Semicolon spawn fuzzel riverctl map normal Super Semicolon spawn fuzzel

View File

@ -0,0 +1,10 @@
#!/usr/bin/env -S fish
function escape
printf "%s" "$1" | string replace '\\' '\\\\'
end
notify-send --urgency=normal --expire-time=0 --category=Mail "[$BUFFER] $SENDER" "$(escape "$MESSAGE")"
mpv ~/.guix-home/profile/share/sounds/freedesktop/stereo/message.oga

View File

@ -0,0 +1,13 @@
address chat.sr.ht
nickname anemofilia
password-cmd pass show senpai/password
highlight anemofilia: anemofilia, radix saayix cargo2guix misako
channel "#coreboot" "#fossandcrafts" "#fsf" "#gnu" "#guix" "#guile" "#hurd" "#ibmthinkpad" "#kakoune" "#lisp" "#lobsters" "#scheme" "#spritely" "#savannah" "#whereiseveryone"
on-highlight-path /home/radio/.config/senpai/scripts/on-highlight.fish
tls true
typings false
mouse true
pane-widths {
nicknames 20
channels 20
}

View File

@ -23,8 +23,8 @@ link_highlight_color 0.0 0.0 1.0
# Hihglight color for synctex forward search highlights # Hihglight color for synctex forward search highlights
synctex_highlight_color 1.0 0.0 1.0 synctex_highlight_color 1.0 0.0 1.0
# Displays an overview of destination when hovering over a link with mouse. # Displays an overview of destination when hovering over a link with mouse.
hover_overview 1 hover_overview 1
# Urls to use when executing external_search commands # Urls to use when executing external_search commands
search_url_a https://annas-archive.org/search?q= search_url_a https://annas-archive.org/search?q=
@ -107,7 +107,7 @@ ui_font Meslo LG M DZ
font_size 12 font_size 12
## Semicolon-separated list of command to execute upon sioyek startup ## Semicolon-separated list of command to execute upon sioyek startup
startup_commands toggle_highlight startup_commands
## Background color to use when executing `toggle_custom_color` ## Background color to use when executing `toggle_custom_color`
custom_background_color 0.09 0.09 0.09 custom_background_color 0.09 0.09 0.09

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 _)))

View File

@ -26,7 +26,8 @@
#:use-module (gnu packages imagemagick) #:use-module (gnu packages imagemagick)
#:use-module (gnu packages image-viewers) #:use-module (gnu packages image-viewers)
#:use-module (gnu packages irc) #:use-module (gnu packages irc)
#|L|# #:use-module (gnu packages linux) #|L|# #:use-module (gnu packages libcanberra)
#:use-module (gnu packages linux)
#|M|# #:use-module (gnu packages maths) #|M|# #:use-module (gnu packages maths)
#:use-module (gnu packages mail) #:use-module (gnu packages mail)
#:use-module (gnu packages messaging) #:use-module (gnu packages messaging)
@ -34,12 +35,12 @@
#|O|# #:use-module (gnu packages ocr) #|O|# #:use-module (gnu packages ocr)
#|P|# #:use-module (gnu packages password-utils) #|P|# #:use-module (gnu packages password-utils)
#:use-module (gnu packages pdf) #:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
#|R|# #:use-module (gnu packages rust-apps) #|R|# #:use-module (gnu packages rust-apps)
#|S|# #:use-module (gnu packages scheme) #|S|# #:use-module (gnu packages scheme)
#:use-module (gnu packages shells) #:use-module (gnu packages shells)
#:use-module (gnu packages ssh) #:use-module (gnu packages ssh)
#:use-module (gnu packages suckless) #:use-module (gnu packages suckless)
#:use-module (gnu packages syndication)
#|T|# #:use-module (gnu packages telegram) #|T|# #:use-module (gnu packages telegram)
#:use-module (gnu packages terminals) #:use-module (gnu packages terminals)
#:use-module (gnu packages tex) #:use-module (gnu packages tex)
@ -62,10 +63,11 @@
#:use-module (radix packages freedesktop) #:use-module (radix packages freedesktop)
#:use-module (radix packages fonts) #:use-module (radix packages fonts)
#|G|# #:use-module (radix packages games) #|G|# #:use-module (radix packages games)
#|K|# #:use-module (radix packages kak-xyz)
#|M|# #:use-module (radix packages music)
#|P|# #:use-module (radix packages pdf) #|P|# #:use-module (radix packages pdf)
#:use-module (radix packages pulseaudio) #:use-module (radix packages pulseaudio)
#|S|# #:use-module (radix packages seninha) #|S|# #:use-module (radix packages seninha)
#:use-module (radix packages syndication)
#|T|# #:use-module (radix packages text-editors) #|T|# #:use-module (radix packages text-editors)
#:use-module (radix packages toys) #:use-module (radix packages toys)
#|W|# #:use-module (radix packages wm) #|W|# #:use-module (radix packages wm)
@ -87,6 +89,7 @@
haskell haskell
image image
messaging messaging
music
password password
reading reading
scheme scheme
@ -109,9 +112,10 @@
xdg-terminal-exec xdg-terminal-exec
#|glib |# dbus #|glib |# dbus
#|image |# grim slurp #|image |# grim slurp
#|libcanberra|# sound-theme-freedesktop
#|terminals |# foot #|terminals |# foot
#|toys |# wayneko #|toys |# wayneko
#|wm |# fnott rivercarro riverguile river-bnf swww waybar #|wm |# fnott rivercarro swww waybar
#|xdisorg |# fuzzel-lowercase wl-clipboard wlrctl wlsunset #|xdisorg |# fuzzel-lowercase wl-clipboard wlrctl wlsunset
#|zig-xyz |# river)) #|zig-xyz |# river))
@ -119,8 +123,10 @@
(list #|gnupg |# gnupg pinentry (list #|gnupg |# gnupg pinentry
#|math |# libqalculate #|math |# libqalculate
#|ssh |# openssh #|ssh |# openssh
#|perl |# perl ; dep for some kakoune functionality #|text-editors |# kakoune
#|text-editors |# kakoune kak-lsp kak-tree-sitter #|kak-xyz |# kak-auto-pairs kak-board kak-buffers kak-lsp
kak-phantom-selection kak-rainbow kak-state-save
kak-surround kak-tree-sitter
#|tmux |# tmux #|tmux |# tmux
#|vesion-control|# diff-so-fancy git)) #|vesion-control|# diff-so-fancy git))
@ -149,7 +155,7 @@
font-misc-misc font-un font-wqy-zenhei)) font-misc-misc font-un font-wqy-zenhei))
(define games (define games
(list #|games|# minetest #|red-eclipse|# srb2 supertuxkart #|xonotic|#)) (list #|games|# minetest red-eclipse srb2 supertuxkart xonotic))
(define guix-contrib (define guix-contrib
(list #|mail |# mumi (list #|mail |# mumi
@ -161,10 +167,14 @@
(define messaging (define messaging
(list #|telegram |# telegram-desktop (list #|telegram |# telegram-desktop
#|mail |# neomutt)) #|mail |# neomutt
#|messaging|# senpai))
(define music
(list #|music|# kew))
(define password (define password
(list #|password-utils|# keepassxc)) (list #|password-utils|# password-store tessen))
(define reading (define reading
(list #|pdf |# sioyek/wayland (list #|pdf |# sioyek/wayland

View File

@ -0,0 +1,40 @@
(define-module (radio shepherd-services)
#:use-module (guix gexp)
#:use-module (gnu services shepherd)
#:use-module (shepherd service timer)
#:export (repl timer wake-up))
#|Repl|#
(define repl
(shepherd-service
(provision '(repl))
(modules '((shepherd service repl)))
(free-form #~(repl-service))))
#|Timers|#
(define timer
(shepherd-service
(provision '(timer))
(modules '((shepherd service timer)))
(free-form #~(timer-service))))
(define timer-trigger-action
(shepherd-action
(name 'trigger)
(procedure #~trigger-timer)
(documentation
"Trigger the action associated with @var{timer} as if it had reached its
next calendar event.")))
(define wake-up
(shepherd-service
(provision '(wake-up))
(modules '((shepherd service timer)))
(start #~(make-timer-constructor
(calendar-event #:hours '(6) #:minutes '(0))
(lambda ()
(spawn-shell-command "mpv --shuffle ~/media/music/by-artist"))))
(stop #~(make-timer-destructor))
(actions (list timer-trigger-action))))

View File

@ -6,7 +6,7 @@
#|GNU packages|# #|GNU packages|#
#|A|# #:use-module (gnu packages admin) #|A|# #:use-module (gnu packages admin)
#|B|# #:use-module (gnu packages base) #|B|# #:use-module (gnu packages base)
#|S|# #:use-module (gnu packages bash) #:use-module (gnu packages bash)
#|C|# #:use-module (gnu packages certs) #|C|# #:use-module (gnu packages certs)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#|G|# #:use-module (gnu packages gawk) #|G|# #:use-module (gnu packages gawk)
@ -18,26 +18,22 @@
#|P|# #:use-module (gnu packages package-management) #|P|# #:use-module (gnu packages package-management)
#:use-module (gnu packages pciutils) #:use-module (gnu packages pciutils)
#|T|# #:use-module (gnu packages texinfo) #|T|# #:use-module (gnu packages texinfo)
#|V|# #:use-module (gnu packages vpn)
#|GNU services|# #|GNU services|#
#||# #:use-module (gnu services) #||# #:use-module (gnu services)
#|A|# #:use-module (gnu services admin) #|A|# #:use-module (gnu services admin)
#:use-module (gnu services avahi) #|B|# #:use-module ((gnu services base) #:hide (greetd-service-type))
#|B|# #:use-module (gnu services base)
#|D|# #:use-module (gnu services dbus) #|D|# #:use-module (gnu services dbus)
#:use-module (gnu services desktop) #:use-module (gnu services desktop)
#|G|# #:use-module (gnu services guix) #|G|# #:use-module (gnu services guix)
#|M|# #:use-module (gnu services mcron)
#|L|# #:use-module (gnu services linux) #|L|# #:use-module (gnu services linux)
#|N|# #:use-module (gnu services networking) #|N|# #:use-module (gnu services networking)
#|P|# #:use-module (gnu services pm) #|P|# #:use-module (gnu services pm)
#|S|# #:use-module (gnu services sysctl) #|S|# #:use-module (gnu services shepherd)
#:use-module (gnu services sysctl)
#|GNU system|# #|GNU system|#
#||# #:use-module ((gnu system) #||# #:use-module (gnu system)
#:select (operating-system)
#:prefix gnu:)
#|A|# #:use-module (gnu system accounts) #|A|# #:use-module (gnu system accounts)
#|F|# #:use-module (gnu system file-systems) #|F|# #:use-module (gnu system file-systems)
#|K|# #:use-module (gnu system keyboard) #|K|# #:use-module (gnu system keyboard)
@ -49,8 +45,7 @@
#|Home environments|# #|Home environments|#
#|R|# #:use-module ((home-environments radio) #|R|# #:use-module ((home-environments radio)
#:select (home-environment) #:prefix home-environment:)
#:renamer (const 'home-environment:radio))
#|Radix|# #|Radix|#
#|A|# #:use-module (radix artwork) #|A|# #:use-module (radix artwork)
@ -64,6 +59,7 @@
#|Radix services|# #|Radix services|#
#|A|# #:use-module (radix services admin) #|A|# #:use-module (radix services admin)
#|G|# #:use-module (radix services greetd)
#|P|# #:use-module (radix services pm) #|P|# #:use-module (radix services pm)
#|Radix system|# #|Radix system|#
@ -78,11 +74,15 @@
#:prefix channel:) #:prefix channel:)
#|F|# #:use-module ((buer files) #|F|# #:use-module ((buer files)
#:prefix file:) #:prefix file:)
#:use-module ((buer file-systems)
#:prefix file-system:)
#|P|# #:use-module ((buer privilege) #|P|# #:use-module ((buer privilege)
#:prefix privileged-programs:) #:prefix privileged-programs:)
#|R|# #:use-module ((buer rules) #|R|# #:use-module ((buer rules)
#:prefix rules:) #:prefix rules:)
#|S|# #:use-module ((buer substitute-keys) #|S|# #:use-module ((buer shepherd-services)
#:prefix shepherd-service:)
#:use-module ((buer substitute-keys)
#:prefix substitute-key:) #:prefix substitute-key:)
#|U|# #:use-module ((buer users) #|U|# #:use-module ((buer users)
#:prefix user:) #:prefix user:)
@ -90,10 +90,13 @@
#|SRFIs|# #|SRFIs|#
#|1|# #:use-module (srfi srfi-1) #|1|# #:use-module (srfi srfi-1)
#:export (operating-system)) #:export (buer buer.scm))
(define operating-system (define buer.scm
(gnu:operating-system (search-path %load-path (module-filename (current-module))))
(define buer
(operating-system
(host-name "buer") (host-name "buer")
(timezone "America/Sao_Paulo") (timezone "America/Sao_Paulo")
(locale "en_US.utf8") (locale "en_US.utf8")
@ -107,7 +110,7 @@
(bootloader (bootloader
(bootloader-configuration (bootloader-configuration
(bootloader grub-bootloader) (bootloader grub-bootloader)
(targets `("/dev/sda")) (targets `("/dev/disk/by-id/wwn-0x50026b7785a0a591"))
(theme (grub-theme (theme (grub-theme
(color-normal (color-normal
'((fg . light-gray) (bg . black))) '((fg . light-gray) (bg . black)))
@ -117,9 +120,10 @@
"/backgrounds/guix-silver-16-9.svg")) "/backgrounds/guix-silver-16-9.svg"))
(gfxmode `("1280x720x32")))))) (gfxmode `("1280x720x32"))))))
(kernel linux-libre-6.10) (kernel linux-libre-6.11)
(kernel-arguments (kernel-arguments
(cons* "modprobe.blacklist=usbmouse,usbkbd,pcspkr" (cons* "resume=/swap/swapfile"
"modprobe.blacklist=usbmouse,usbkbd,pcspkr"
"thinkpad_acpi.fan_control=1" "thinkpad_acpi.fan_control=1"
(filter (negate ((on disjoin (filter (negate ((on disjoin
(partial partial string-prefix?)) (partial partial string-prefix?))
@ -127,22 +131,19 @@
%kicksecure-kernel-arguments))) %kicksecure-kernel-arguments)))
(file-systems (file-systems
(cons* (file-system (append file-system:volumes
(device (file-system-label "guix-root")) file-system:persistent-directories))
(mount-point "/") (swap-devices
(type "ext4")) (list (swap-space
(file-system (target "/swap/swapfile")
(device (file-system-label "home")) (dependencies
(mount-point "/home") (filter (file-system-mount-point-predicate "/swap")
(type "ext4")) file-systems)))))
%base-file-systems))
(users (users
(cons* user:radio (cons* user:radio
user:root user:root
%base-user-accounts)) %base-user-accounts))
#|System level packages|#
(packages (packages
(list #|admin |# btop inetutils isc-dhcp shadow zzz (list #|admin |# btop inetutils isc-dhcp shadow zzz
#|base |# coreutils diffutils findutils grep patch sed tar which #|base |# coreutils diffutils findutils grep patch sed tar which
@ -152,13 +153,11 @@
#|gawk |# gawk #|gawk |# gawk
#|guile |# guile-next guile-colorized guile-readline #|guile |# guile-next guile-colorized guile-readline
#|less |# less #|less |# less
#|linux |# e2fsprogs iproute kmod procps psmisc usbutils #|linux |# e2fsprogs iproute kmod procps usbutils util-linux
util-linux
#|man |# man-db man-pages #|man |# man-db man-pages
#|pciutils |# pciutils #|pciutils |# pciutils
#|texinfo |# info-reader #|texinfo |# info-reader
#|text-editors|# kakoune #|text-editors|# kakoune))
#|vpn |# wireguard-tools))
#|Do not generate a sudoers file|# #|Do not generate a sudoers file|#
(sudoers-file #f) (sudoers-file #f)
@ -172,7 +171,15 @@
#|Allow resolution of '.local' host names with mDNS|# #|Allow resolution of '.local' host names with mDNS|#
(name-service-switch %mdns-host-lookup-nss) (name-service-switch %mdns-host-lookup-nss)
#|System services|# (essential-services
(modify-services
(operating-system-default-essential-services this-operating-system)
(shepherd-root-service-type
_ => (shepherd-configuration
(shepherd (@ (shepherd-package) shepherd))
(services (list shepherd-service:guix-gc
shepherd-service:snapshot-@home
shepherd-service:timer))))))
(services (services
(list #|TTY services|# (list #|TTY services|#
(service virtual-terminal-service-type) (service virtual-terminal-service-type)
@ -189,10 +196,7 @@
(map (lambda (x) (map (lambda (x)
(greetd-terminal-configuration (greetd-terminal-configuration
(terminal-vt (number->string x)) (terminal-vt (number->string x))
(terminal-switch (= x 1)) (terminal-switch (= x 1))))
(default-session-command
(greetd-agreety-session
(command #~(getenv "SHELL"))))))
(iota 2 1))))) (iota 2 1)))))
#|Home environment services|# #|Home environment services|#
@ -211,41 +215,25 @@
#|IPC services|# #|IPC services|#
(service dbus-root-service-type) (service dbus-root-service-type)
#|Avahi service|#
(service avahi-service-type
(avahi-configuration
(wide-area? #t)))
#|Guix services|# #|Guix services|#
(service guix-service-type (service guix-service-type
(guix-configuration (guix-configuration
(build-accounts 16) (build-accounts 16)
(discover? #t)
(authorized-keys (authorized-keys
(cons* substitute-key:genenetwork.pub (cons* substitute-key:genenetwork.pub
substitute-key:inria.pub
substitute-key:yumiko.pub substitute-key:yumiko.pub
%default-authorized-guix-keys)) %default-authorized-guix-keys))
(substitute-urls (substitute-urls
`("https://ci.guix.gnu.org" `("https://bordeaux.guix.gnu.org"
"https://cuirass.genenetwork.org" "https://cuirass.genenetwork.org"
"https://bordeaux.guix.gnu.org")) "https://ci.guix.gnu.org"
"https://guix.bordeaux.inria.fr"))
(extra-options (extra-options
`("--max-jobs=8" `("--max-jobs=8"
"--cores=4" "--cores=4"
"--gc-keep-derivations=yes" "--gc-keep-derivations=yes"
"--gc-keep-outputs=yes")))) "--gc-keep-outputs=yes"))))
(service guix-publish-service-type
(guix-publish-configuration
(port 8080)
(host "0.0.0.0")
(advertise? #t)
(compression `(("zstd" 3)))))
#|Mcron service|#
(service mcron-service-type
(mcron-configuration
(jobs (list #~(job "* * * * Sun"
"guix gc --optimize --free-space=10G")))))
#|Device management services|# #|Device management services|#
(service udev-service-type (service udev-service-type
@ -295,7 +283,8 @@
#|Memory management services|# #|Memory management services|#
(service zram-device-service-type (service zram-device-service-type
(zram-device-configuration (zram-device-configuration
(size (round/ (ram-total) 2)) (priority 100)
(size (* 2 (ram-total)))
(compression-algorithm 'lz4))) (compression-algorithm 'lz4)))
#|Permission services|# #|Permission services|#
@ -309,7 +298,13 @@
#|Special file services|# #|Special file services|#
(service special-files-service-type (service special-files-service-type
`(("/bin/sh" ,(file-append bash "/bin/bash")) `(("/bin/sh" ,(file-append bash "/bin/bash"))
("/usr/bin/env" ,(file-append coreutils "/bin/env")))) ("/usr/bin/env" ,(file-append coreutils "/bin/env"))
("/etc/config.scm" ,buer.scm)))
(simple-service 'persistent-files
special-files-service-type
(map (juxt identity
(partial string-append "/gnu/persist"))
file-system:persistent-files))
#|Sysctl services|# #|Sysctl services|#
(simple-service 'extra-sysctl-settings sysctl-service-type (simple-service 'extra-sysctl-settings sysctl-service-type
@ -324,5 +319,4 @@
#|Base services|# #|Base services|#
(service urandom-seed-service-type) (service urandom-seed-service-type)
(service nscd-service-type))))) (service nscd-service-type)))))
buer
operating-system

View File

@ -1,104 +1,175 @@
;; based on https://codeberg.org/squishypinkelephant/guix-random-junk
;; how to guix: / as tmpfs
;; /var/guix is REQUIRED to perform rollbacks
;; create the folders /gnu/persist/etc/ssh /gnu/persist/etc/wireguard and
;; the file /gnu/persist/etc/machine-id for dbus
(define-module (buer file-systems) (define-module (buer file-systems)
#:use-module (gnu system file-systems) #:use-module (gnu system file-systems)
#:export (rootfs #:export (partition:guix
bootfs persistent-directories
file-systems)) persistent-files
volumes))
;;; reminder: Send a patch to guix to make file-system-options and ;;; reminder: Send a patch to guix to make file-system-options and
;;; privileged-program-capabitilities receive a list-of-strings ;;; privileged-program-capabitilities receive a list-of-strings
(define rootfs (define partition:guix
(file-system (file-system-label "guix"))
(device (file-system-label "root"))
(mount-point "/")
(type "tmpfs")
(options "mode=755")))
(define bootfs (define volumes
(file-system (list #|base|#
(device (file-system-label "root") %immutable-store
(type "btrfs") %pseudo-terminal-file-system
(mount-point "/boot") %shared-memory-file-system
(dependencies (list rootfs))
(flags '(no-atime))
(options (format #f "compress=zstd:7,~
discard=async,~
ssd,~
subvol=@boot")))))
(define file-systems #|boot|#
(cons* rootfs (file-system
;; /gnu/store (device partition:guix)
(type "btrfs")
(mount-point "/boot")
(check? #f)
(needed-for-boot? #t)
(flags '(no-atime))
(options (format #f "subvol=@boot,~
discard=async,~
ssd")))
#|run|#
(file-system
(device "none")
(type "tmpfs")
(mount-point "/run")
(check? #f)
(needed-for-boot? #t)
(flags '(no-dev strict-atime))
(options (format #f "mode=0755,~
nr_inodes=800k,~
size=20%")))
#|tmp|#
(file-system
(device "none")
(type "tmpfs")
(mount-point "/tmp")
(check? #f)
(needed-for-boot? #f))
#|root|#
(file-system
(device "none")
(type "tmpfs")
(mount-point "/")
(check? #f)
(needed-for-boot? #t)
(options "mode=0755"))
#|gnu|#
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/gnu/persist")
(needed-for-boot? #t)
(flags '(no-atime))
(options (format #f "subvol=@gnu/persist,~
ssd")))
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/gnu/store")
(needed-for-boot? #t)
(flags '(no-atime))
(options (format #f "compress=zstd,~
subvol=@gnu/store,~
ssd")))
#|var|#
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/var/guix")
(needed-for-boot? #t)
(flags '(no-atime))
(options (format #f "compress=zstd,~
subvol=@var/guix,~
ssd")))
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/var/lib")
(needed-for-boot? #t)
(flags '(no-atime))
(options (format #f "compress=zstd,~
subvol=@var/lib,~
ssd")))
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/var/log")
(check? #f)
(needed-for-boot? #t)
(flags '(no-atime))
(options (format #f "compress=zstd,~
subvol=@var/log,~
ssd")))
(file-system
(device "none")
(type "tmpfs")
(mount-point "/var/run")
(check? #f)
(needed-for-boot? #t)
(flags '(no-dev strict-atime))
(options (format #f "mode=0755,~
nr_inodes=800k,~
size=20%")))
#|swap|#
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/swap")
(check? #f)
(needed-for-boot? #t)
(options (format #f "subvol=@swap,~
discard=async,~
ssd")))
#|snapshots|#
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/snapshots")
(check? #f)
(needed-for-boot? #t)
(flags '(no-atime))
(options (format #f "compress=zstd,~
subvol=@snapshots,~
ssd")))
#|home|#
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/root")
(flags '(no-atime))
(options (format #f "subvol=@root,~
discard=async,~
ssd")))
(file-system
(device partition:guix)
(type "btrfs")
(mount-point "/home")
(flags '(no-atime))
(options (format #f "subvol=@home,~
discard=async,~
ssd")))))
(define persistent-directories
(map (lambda (filename)
(file-system (file-system
(device (file-system-label "root")) (mount-point filename)
(type "btrfs") (device (string-append "/gnu/persist" mount-point))
(mount-point "/gnu/store") (type "none")
(needed-for-boot? #t) (check? #f)
(dependencies (list rootfs)) (flags '(no-atime bind-mount))))
(flags '(read-only bind-mount no-atime)) `("/etc/guix"
(options (format #f "compress=zstd:7,~ "/etc/ssh")))
discard=async,~
ssd,~ (define persistent-files
subvol=@gnu/store"))) (list "/etc/machine-id"
;; /gnu/persist "/etc/wpa-supplicant.conf"))
(file-system
(device (file-system-label "root"))
(type "btrfs")
(mount-point "/gnu/persist")
(needed-for-boot? #t)
(dependencies (list rootfs))
(flags '(no-atime bind-mount))
(options (format #f "discard=async,~
ssd,~
subvol=@gnu/persist")))
;; /home
(file-system
(device (file-system-label "root"))
(type "btrfs")
(mount-point "/home")
(dependencies (list rootfs))
(flags '(no-atime bind-mount))
(options (format #f "compress=zstd:7,~
discard=async,~
ssd,~
subvol=@home")))
;; /var/guix
(file-system
(device (file-system-label "root"))
(type "btrfs")
(mount-point "/var/guix")
(dependencies (list rootfs))
(flags '(no-atime))
(options (format #f "compress=zstd:7,~
discard=async,~
ssd,~
subvol=@var/guix")))
;; /var/log
(file-system
(device (file-system-label "root"))
(type "btrfs")
(mount-point "/var/log")
(dependencies (list rootfs))
(flags '(no-atime))
(options (format #f "compress=zstd:7,~
discard=async,~
ssd,~
subvol=@var/log")))
;; /boot
bootfs
(file-system
(device (file-system-label "esp"))
(type "vfat")
(dependencies (list bootfs))
(mount-point "/boot/efi")
(create-mount-point? #t))
%base-file-systems))

View File

@ -0,0 +1,3 @@
guix shell git -- git clone https://codeberg.org/anemofilia/radix
echo "Format your disk and mount the btrfs partition on /mnt."
echo "After that, run 02-create.sh"

View File

@ -0,0 +1,10 @@
cd /mnt
mkdir -p boot home root gnu/store gnu/persist var/log var/lib var/guix
for vol in home root boot gnu gnu/store gnu/persist var var/log var/lib var/guix; do
btrfs subvolume create @$vol
mount --bind @$vol $vol
done
cd @gnu/persist
mkdir -p etc/guix etc/ssh etc/wireguard

View File

@ -0,0 +1,3 @@
herd start cow-store /mnt
export GUILE_LOAD_PATH=/root/radix:/root/zero:/root/zero/home-environments:/root/zero:operating-systems:$GUILE_LOAD_PATH
guix system init /root/zero/operating-systems/buer.scm /mnt

View File

@ -0,0 +1,3 @@
cd /mnt
umount home root boot gnu/store gnu/persist var/log var/lib var/guix
rm -rf home root boot bin etc gnu mnt tmp var

View File

@ -0,0 +1 @@
guix shell dbus -- dbus-uuidgen > /mnt/@gnu/persist/etc/machine-id

View File

@ -0,0 +1,3 @@
chmod 700 /mnt/@root
chmod 644 /mnt/@gnu/persist/etc/machine-id
chmod 600 /mnt/@gnu/persist/etc/{wireguard,ssh,guix}

View File

@ -5,7 +5,7 @@
(define-public linux-libre (define-public linux-libre
(customize-linux (customize-linux
#:name "buer-linux-libre" #:name "buer-linux-libre"
#:linux linux-libre-6.10 #:linux linux-libre-6.11
#:source linux-libre-6.10-source #:source linux-libre-6.11-source
#:defconfig (local-file "defconfig") #:defconfig (local-file "kernel/defconfig")
#:extra-version "buer")) #:extra-version "buer"))

View File

@ -35,6 +35,10 @@
(command "herd") (command "herd")
(args (list action)))) (args (list action))))
`("status" "detailed-status")) `("status" "detailed-status"))
(list (permit (identity ":wheel")
(nopass? #t)
(command "herd")
(args (list "trigger" "snapshot-@home"))))
(flat-map (lambda (service action) (flat-map (lambda (service action)
(permit (identity ":wheel") (permit (identity ":wheel")
(nopass? #t) (nopass? #t)

View File

@ -0,0 +1,54 @@
(define-module (buer shepherd-services)
#:use-module (guix gexp)
#:use-module (gnu services shepherd)
#:use-module (shepherd service repl)
#:use-module (shepherd service timer)
#:export (guix-gc snapshot-@home repl timer))
#|Repl|#
(define repl
(shepherd-service
(provision '(repl))
(modules '((shepherd service repl)))
(free-form #~(repl-service))))
#|Timers|#
(define timer-trigger-action
(shepherd-action
(name 'trigger)
(procedure #~trigger-timer)
(documentation
"Trigger the action associated with @var{timer} as if it had reached its
next calendar event.")))
(define guix-gc
(shepherd-service
(provision '(guix-gc))
(modules '((shepherd service timer)))
(start #~(make-timer-constructor
(calendar-event #:days-of-month '(1 15))
(command '("guix" "gc" "--optimize" "--free-space=10G"))))
(stop #~(make-timer-destructor))
(actions (list timer-trigger-action))))
(define snapshot-@home
(shepherd-service
(provision '(snapshot-@home))
(modules '((shepherd service timer)))
(start #~(make-timer-constructor
(calendar-event #:days-of-month '(1 15))
(lambda ()
(let ((btrfs "/run/current-system/profile/bin/btrfs")
(date (strftime "%Y-%m-%d" (localtime (current-time)))))
(spawn-shell-command
(string-append btrfs " subvolume snapshot"
" /home /snapshots/home/" date))))))
(stop #~(make-timer-destructor))
(actions (list timer-trigger-action))))
(define timer
(shepherd-service
(provision '(timer))
(modules '((shepherd service timer)))
(free-form #~(timer-service))))

View File

@ -2,26 +2,9 @@
#:use-module (gnu) #:use-module (gnu)
#:export (berlin.pub #:export (berlin.pub
genenetwork.pub genenetwork.pub
yuria.pub inria.pub
yumiko.pub)) yumiko.pub
yuria.pub))
(define yuria.pub
(plain-file "yuria.pub"
"(public-key
(ecc
(curve Ed25519)
(q #D5D0C1203D294B410DA106DDC1713B74CBB27353D53F4EE3D9D26972E8687424#)
)
)"))
(define yumiko.pub
(plain-file "yumiko.pub"
"(public-key
(ecc
(curve Ed25519)
(q #EBD4DD318A84F9F0AD13300D8A2ACF022F16088DA59B57E539F6DC3BD9C33A52#)
)
)"))
(define berlin.pub (define berlin.pub
(plain-file "berlin.pub" (plain-file "berlin.pub"
@ -40,3 +23,30 @@
(q #9578AD6CDB23BA51F9C4185D5D5A32A7EEB47ACDD55F1CCB8CEE4E0570FBF961#) (q #9578AD6CDB23BA51F9C4185D5D5A32A7EEB47ACDD55F1CCB8CEE4E0570FBF961#)
) )
)")) )"))
(define inria.pub
(plain-file "inria.pub"
"(public-key
(ecc
(curve Ed25519)
(q #89FBA276A976A8DE2A69774771A92C8C879E0F24614AAAAE23119608707B3F06#)
)
)"))
(define yumiko.pub
(plain-file "yumiko.pub"
"(public-key
(ecc
(curve Ed25519)
(q #EBD4DD318A84F9F0AD13300D8A2ACF022F16088DA59B57E539F6DC3BD9C33A52#)
)
)"))
(define yuria.pub
(plain-file "yuria.pub"
"(public-key
(ecc
(curve Ed25519)
(q #D5D0C1203D294B410DA106DDC1713B74CBB27353D53F4EE3D9D26972E8687424#)
)
)"))