diff options
-rw-r--r-- | home.nix | 4 | ||||
-rw-r--r-- | platforms/darwin/configuration.nix | 9 | ||||
-rw-r--r-- | platforms/darwin/default.nix | 35 |
3 files changed, 46 insertions, 2 deletions
diff --git a/home.nix b/home.nix index a9df0ce..2b32820 100644 --- a/home.nix +++ b/home.nix @@ -1,6 +1,7 @@ { config, pkgs, ... }: let pnvim = import ./programs/nvim.nix pkgs; + common_packages = import ./platforms/common-packages.nix pkgs; isDarwin = builtins.currentSystem == "x86_64-darwin"; platformSetup = if isDarwin then ./platforms/darwin else ./platforms/linux; @@ -37,7 +38,8 @@ in pandoc texlive.combined.scheme-basic zathura - ]; + ] + ++ common_packages; # This value determines the Home Manager release that your # configuration is compatible with. This helps avoid breakage diff --git a/platforms/darwin/configuration.nix b/platforms/darwin/configuration.nix index bed3593..e168782 100644 --- a/platforms/darwin/configuration.nix +++ b/platforms/darwin/configuration.nix @@ -12,6 +12,15 @@ in ] ++ common_packages; + system.defaults.dock = { + orientation = "left"; + autohide = true; + autohide-time-modifier = "1.0"; + mineffect = "scale"; + minimize-to-application = true; + static-only = true; + }; + # Use a custom configuration.nix location. # $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix environment.darwinConfig = "$HOME/.config/nixpkgs/platforms/darwin/configuration.nix"; 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 + ''; +} |