mirror of
https://git.in.rschanz.org/ryan77627/guix-config.git
synced 2024-11-07 07:36:09 -05:00
Added spotify-player and spotifyd service
This commit is contained in:
parent
67bd380ad4
commit
12e3af5758
4 changed files with 81 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
(gnu home services gnupg)
|
||||
(gnu home services)
|
||||
(ryan-services pipewire)
|
||||
(ryan-services spotify)
|
||||
(ryan-packages freedesktop)
|
||||
(ryan-packages mozilla))
|
||||
|
||||
|
@ -128,6 +129,7 @@
|
|||
("sway" ,(local-file "sway" #:recursive? #t))
|
||||
("hypr" ,(local-file "hypr" #:recursive? #t))
|
||||
("foot" ,(local-file "foot" #:recursive? #t))
|
||||
("spotify-player" ,(local-file "spotify-player" #:recursive? #t))
|
||||
("pulse/client.conf" ,(local-file "pulseaudio/client.conf"))
|
||||
("waybar" ,(local-file "waybar" #:recursive? #t))
|
||||
("alacritty" ,(local-file "alacritty" #:recursive? #t))
|
||||
|
@ -142,6 +144,7 @@
|
|||
(".docker/cli-plugins" ,(local-file "docker/cli-plugins" #:recursive? #t))
|
||||
(".nix-channels" ,(local-file "nix-channels"))))
|
||||
(service home-pipewire-service-type)
|
||||
(service home-spotifyd-service-type)
|
||||
(service home-dbus-service-type)
|
||||
(service home-gpg-agent-service-type
|
||||
(home-gpg-agent-configuration
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
gifski
|
||||
waypaper
|
||||
gdu
|
||||
spotify-player
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
|
|
34
home-config/spotify-player/app.toml
Normal file
34
home-config/spotify-player/app.toml
Normal file
|
@ -0,0 +1,34 @@
|
|||
theme = "dracula"
|
||||
client_id = "4b1219bdc29945bc8ca914f80a8a6a47"
|
||||
client_port = 8888
|
||||
playback_format = """
|
||||
{track} • {artists}
|
||||
{album}
|
||||
{metadata}"""
|
||||
tracks_playback_limit = 50
|
||||
app_refresh_duration_in_ms = 32
|
||||
playback_refresh_duration_in_ms = 0
|
||||
cover_image_refresh_duration_in_ms = 2000
|
||||
page_size_in_rows = 20
|
||||
play_icon = "▶"
|
||||
pause_icon = "▌▌"
|
||||
liked_icon = "♥"
|
||||
border_type = "Plain"
|
||||
progress_bar_type = "Rectangle"
|
||||
playback_window_position = "Top"
|
||||
cover_img_length = 9
|
||||
cover_img_width = 5
|
||||
cover_img_scale = 1.0
|
||||
playback_window_width = 6
|
||||
enable_media_control = true
|
||||
enable_streaming = "DaemonOnly"
|
||||
enable_cover_image_cache = true
|
||||
default_device = "RyanThinkpad"
|
||||
|
||||
[copy_command]
|
||||
command = "wlcopy"
|
||||
args = []
|
||||
|
||||
[notify_format]
|
||||
summary = "{track} • {artists}"
|
||||
body = "{album}"
|
43
modules/ryan-services/spotify.scm
Normal file
43
modules/ryan-services/spotify.scm
Normal file
|
@ -0,0 +1,43 @@
|
|||
(define-module (ryan-services spotify)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages rust-apps)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu home services shepherd)
|
||||
#:use-module (guix gexp))
|
||||
|
||||
(define (home-spotifyd-profile-service config)
|
||||
(map specification->package
|
||||
(list "spotifyd")))
|
||||
|
||||
(define (home-spotifyd-shepherd-service config)
|
||||
;; spotifyd daemon
|
||||
(list (shepherd-service
|
||||
(requirement '(pipewire))
|
||||
(provision '(spotifyd))
|
||||
(stop #~(make-kill-destructor))
|
||||
(start #~(make-forkexec-constructor
|
||||
(list #$(file-append spotifyd "/bin/spotifyd")
|
||||
"--volume-normalisation"
|
||||
"-B320"
|
||||
(format #f "--device-name=~a" (gethostname))
|
||||
"--device-type=computer"
|
||||
"--no-daemon")
|
||||
#:log-file (string-append
|
||||
(or (getenv "XDG_LOG_HOME")
|
||||
(format #f "~a/.local/var/log"
|
||||
(getenv "HOME")))
|
||||
"/spotifyd.log"))))))
|
||||
|
||||
(define-public home-spotifyd-service-type
|
||||
(service-type (name 'home-spotifyd)
|
||||
(extensions
|
||||
(list (service-extension
|
||||
home-profile-service-type
|
||||
home-spotifyd-profile-service)
|
||||
(service-extension
|
||||
home-shepherd-service-type
|
||||
home-spotifyd-shepherd-service)))
|
||||
(default-value #f)
|
||||
(description "Provides spotifyd daemon in the background")))
|
Loading…
Reference in a new issue