Compare commits

..

10 Commits

Author SHA1 Message Date
Luis Guilherme Coelho 77d40da76f
operating-systems: buer: Setup timer-related shepherd-services 2024-11-24 22:06:13 -03:00
Luis Guilherme Coelho 101f5404eb
home-environments: radio: Add shepherd/modules to GUILE_LOAD_PATH 2024-11-24 21:10:21 -03:00
Luis Guilherme Coelho 715cde6746
radio: files: Add kew 2024-11-24 13:42:51 -03:00
Luis Guilherme Coelho 733bb12361
operating-systems: buer: Use shepherd 1.0.0rc1 2024-11-24 13:42:32 -03:00
Luis Guilherme Coelho f29d809e76
buer: file-systems: Add an @snapshot subvolume 2024-11-24 13:41:46 -03:00
Luis Guilherme Coelho 806e5cb188
home-environments: radio: Use shepherd 1.0.0rc1 2024-11-24 13:40:01 -03:00
Luis Guilherme Coelho 3154e9c042
home-environments: radio: Remove channel:saayix 2024-11-24 13:31:35 -03:00
Luis Guilherme Coelho fdcb39f3ed
radio: files: senpai: Fix on-highlight script 2024-11-24 13:30:43 -03:00
Luis Guilherme Coelho 01527be1d0
home-environments: radio: Add packages:music 2024-11-24 13:27:43 -03:00
Luis Guilherme Coelho 5b75cf2b23
buer: kernel: Refer to right defconfig location an use latest available kernel 2024-11-24 13:26:14 -03:00
11 changed files with 164 additions and 35 deletions

View File

@ -58,7 +58,7 @@
#|F|# packages:file-managing packages:fonts #|F|# packages:file-managing packages:fonts
#|G|# 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
@ -140,11 +140,12 @@
(simple-service 'home-extra-channels (simple-service 'home-extra-channels
home-channels-service-type home-channels-service-type
(list channel:guix (list channel:guix
channel:radix channel:radix))
channel:saayix))
#|Shepherd service|# #|Shepherd services|#
(service home-shepherd-service-type) (service home-shepherd-service-type
(home-shepherd-configuration
(shepherd (@ (shepherd-package) shepherd))))
#|Shell services|# #|Shell services|#
(service home-tty-colorscheme-service-type (service home-tty-colorscheme-service-type
@ -305,6 +306,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)

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

@ -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

@ -1,10 +0,0 @@
#!/bin/sh
escape() {
printf "%s" "$1" | sed 's#\#\\#g'
}
notify-send --urgency=normal --expire-time=0 --category=Mail "[$BUFFER] $SENDER" "$(escape "$MESSAGE")"
mpv ~/.guix-home/profile/share/sounds/freedesktop/stereo/complete.oga

View File

@ -1,3 +0,0 @@
#!/bin/sh
read -p 'senpai password: '

View File

@ -3,7 +3,7 @@ nickname anemofilia
password-cmd pass show senpai/password password-cmd pass show senpai/password
highlight anemofilia: anemofilia, radix saayix cargo2guix misako highlight anemofilia: anemofilia, radix saayix cargo2guix misako
channel "#coreboot" "#fossandcrafts" "#fsf" "#gnu" "#guix" "#guile" "#hurd" "#ibmthinkpad" "#kakoune" "#lisp" "#lobsters" "#scheme" "#spritely" "#savannah" "#whereiseveryone" 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.sh on-highlight-path /home/radio/.config/senpai/scripts/on-highlight.fish
tls true tls true
typings false typings false
mouse true mouse true

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)
@ -63,6 +64,7 @@
#: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) #|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)
@ -72,9 +74,6 @@
#|V|# #:use-module (radix packages video) #|V|# #:use-module (radix packages video)
#|X|# #:use-module (radix packages xdisorg) #|X|# #:use-module (radix packages xdisorg)
#|Saayix packages|#
#|M|# #:use-module (saayix packages messaging)
#:export (blogging #:export (blogging
calendar calendar
databases databases
@ -90,6 +89,7 @@
haskell haskell
image image
messaging messaging
music
password password
reading reading
scheme scheme
@ -112,6 +112,7 @@
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 swww waybar #|wm |# fnott rivercarro swww waybar
@ -169,6 +170,9 @@
#|mail |# neomutt #|mail |# neomutt
#|messaging|# senpai)) #|messaging|# senpai))
(define music
(list #|music|# kew))
(define password (define password
(list #|password-utils|# password-store tessen)) (list #|password-utils|# password-store tessen))

View File

@ -26,11 +26,11 @@
#|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)
@ -80,7 +80,9 @@
#: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:)
@ -169,6 +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)
(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))))))
#|System services|# #|System services|#
(services (services
@ -226,12 +237,6 @@
"--gc-keep-derivations=yes" "--gc-keep-derivations=yes"
"--gc-keep-outputs=yes")))) "--gc-keep-outputs=yes"))))
#|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
(udev-configuration (udev-configuration

View File

@ -129,6 +129,18 @@
discard=async,~ discard=async,~
ssd"))) 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|# #|home|#
(file-system (file-system
(device partition:guix) (device partition: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

@ -0,0 +1,44 @@
(define-module (buer shepherd-services)
#:use-module (guix gexp)
#:use-module (gnu services shepherd)
#:use-module (shepherd service timer)
#:export (guix-gc snapshot-@home timer))
(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)))))
(system* btrfs "subvolume" "snapshot" "/home"
(string-append "/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))))