diff mbox series

[RFC,3/9] conf: Read a host-specific asoundrc

Message ID 20200612095530.3970-3-mark@xwax.org (mailing list archive)
State New, archived
Headers show
Series [RFC,1/9] control: Fix typos in the namehint example | expand

Commit Message

Mark Hills June 12, 2020, 9:55 a.m. UTC
On systems with a network mounted home directory this is thoroughly
useful to allow for a core set of asoundrc settings, but with different
settings on different hosts.

It's not possibly to implement this in our own asoundrc or local
customisation, as it's too late. The installation file must be modified.

This is similar to ~/.Xdefaults-* on some systems.
---
 src/conf/alsa.conf | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf
index 08370108..39195f49 100644
--- a/src/conf/alsa.conf
+++ b/src/conf/alsa.conf
@@ -24,6 +24,17 @@ 
 					"/alsa/asoundrc"
 				]
 			}
+			{
+				@func concat
+				strings [
+					"~/.asoundrc-"
+					{
+						@func getenv
+						vars [ HOSTNAME ]
+						default "localhost"
+					}
+				]
+			}
 		]
 		errors false
 	}