about summary refs log tree commit diff
path: root/platforms/darwin/default.nix
blob: 5b41a4e4f2af2285d1033111cde7cc36ad5d1353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
  '';
}