dev.fron.io rc / 4af7252
home(leaf): pipewire services Tony Olagbaiye 11 days ago
1 changed file(s) with 70 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
88 #:use-module (gnu home-services files)
99 #:use-module (gnu home-services gnupg)
1010 #:use-module (gnu home-services shells)
11 #:use-module (gnu home-services shepherd)
1112 #:use-module (gnu home-services ssh)
1213 #:use-module (rc home-services pipewire)
1314 #:use-module (gnu packages admin)
2324 #:use-module (gnu packages web-browsers)
2425 #:use-module (nongnu packages mozilla)
2526 #:use-module (flat packages emacs)
27 #:use-module (rde packages)
2628 #:use-module (rc packages discord)
2729 #:use-module (rc packages pipewire-next)
2830 #:export (env))
7476 (bash-profile '("\
7577 export HISTFILE=$XDG_CACHE_HOME/.bash_history"))))
7678
77 (simple-service 'test-config
79 (simple-service 'pipewire-add-asoundrd
7880 home-files-service-type
79 (list `("config/test.conf"
80 ,(plain-file "tmp-file.txt"
81 "the content of ~/.config/test.conf"))))
81 (list `("config/alsa/asoundrc"
82 ,(mixed-text-file
83 "asoundrc"
84 #~(string-append
85 "<"
86 #$(file-append
87 pipewire-next "/share/alsa/alsa.conf.d/50-pipewire.conf")
88 ">\n<"
89 #$(file-append
90 pipewire-next "/share/alsa/alsa.conf.d/99-pipewire-default.conf")
91 ">\n"
92 "
93 pcm_type.pipewire {
94 lib " #$(file-append pipewire-next
95 "/lib/alsa-lib/libasound_module_pcm_pipewire.so") "
96 }
97 ctl_type.pipewire {
98 lib " #$(file-append pipewire-next
99 "/lib/alsa-lib/libasound_module_ctl_pipewire.so") "
100 }
101 ")))))
102
103 (simple-service 'pipewire-set-some-env-vars
104 home-environment-variables-service-type
105
106 '(("DBUS_SESSION_BUS_ADDRESS"
107 . "unix:path=$XDG_RUNTIME_DIR/dbus.sock")
108 ;; ("RTC_USE_PIPEWIRE" . "true")
109 ))
110 (simple-service
111 'dbus-add-shepherd-daemon
112 home-shepherd-service-type
113 (list
114 (shepherd-service
115 (requirement '(dbus-home))
116 (provision '(pipewire))
117 (start #~(make-forkexec-constructor
118 (list #$(file-append pipewire-next "/bin/pipewire")))))
119 (shepherd-service
120 (requirement '(pipewire))
121 (provision '(pipewire-media-session))
122 (start #~(make-forkexec-constructor
123 (list #$(file-append pipewire-next "/bin/pipewire-media-session")))))
124 (shepherd-service
125 (requirement '(pipewire))
126 (provision '(pipewire-pulse))
127 (start #~(make-forkexec-constructor
128 (list #$(file-append pipewire-next "/bin/pipewire-pulse")))))
129 (shepherd-service
130 (provision '(dbus-home))
131 (start #~(make-forkexec-constructor
132 (list #$(file-append (@@ (gnu packages glib) dbus)
133 "/bin/dbus-daemon")
134 "--session"
135 (string-append
136 "--address="
137 "unix:path="
138 (getenv "XDG_RUNTIME_DIR")
139 "/dbus.sock")))))))
140
141 (simple-service
142 'pipewire-add-packages
143 home-profile-service-type
144 (append
145 ;; TODO: Should be in feature-sway
146 (list xdg-desktop-portal-latest xdg-desktop-portal-wlr-latest)
147 (list pipewire-next)))
82148
83149 ;(service home-ssh-service-type
84150 ; (home-ssh-configuration