about summary refs log tree commit diff
path: root/platforms/darwin/default.nix
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-09-27 18:14:10 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-09-27 18:14:10 +0200
commita24f50c8a264fd0e42c789f4cf16a8796ab97e47 (patch)
tree5a658324937351d823bebe68f5c1b17500c0aebb /platforms/darwin/default.nix
parentf12da1cfafbf3bc2fe3e0b3e79dae449b0b20041 (diff)
downloaddots-a24f50c8a264fd0e42c789f4cf16a8796ab97e47.tar.gz
dots-a24f50c8a264fd0e42c789f4cf16a8796ab97e47.zip
Darwin config
Diffstat (limited to 'platforms/darwin/default.nix')
-rw-r--r--platforms/darwin/default.nix35
1 files changed, 34 insertions, 1 deletions
diff --git a/platforms/darwin/default.nix b/platforms/darwin/default.nix
index 0967ef4..5b41a4e 100644
--- a/platforms/darwin/default.nix
+++ b/platforms/darwin/default.nix
@@ -1 +1,34 @@
-{}
+{ config, ... }:
+let
+  spotifyUsername = "pboss.n@gmail.com";
+  passwdCmd = "pass show spotify.com | head -n 1";
+in
+{
+  xdg.configFile."spotifyd/spotifyd.conf".text = ''
+    [global]
+    # Fill this in with your Spotify login.
+    username = ${spotifyUsername}
+    password_cmd = "${passwdCmd}"
+
+
+    # How this machine shows up in Spotify Connect.
+    device_name = spotifyd
+    device_type = computer
+
+    # This is the default location of Spotify's cache, so just replace LOGIN_NAME
+    # with your macOS login name (type `whoami` at a Terminal window).
+    cache_path = ${config.home.homeDirectory}/Library/Application Support/Spotify/PersistentCache/Storage
+    no_audio_cache = false
+
+    # Various playback options. Tweak these if Spotify is too quiet.
+    bitrate = 320
+    volume_normalisation = true
+    normalisation_pregain = -10
+
+    # These need to be set, but don't need to be changed.
+    backend = rodio
+    mixer = PCM
+    volume_controller = softvol
+    zeroconf_port = 1234
+  '';
+}